Merge branch 'feature_material_marketplace' into feature_cura_package_api

Contributes to CURA-5137
This commit is contained in:
Diego Prado Gesto 2018-04-03 17:13:36 +02:00
commit 007529c9ec
4 changed files with 117 additions and 24 deletions

View File

@ -34,7 +34,7 @@ Window
{ {
id: mainView id: mainView
width: parent.width width: parent.width
color: "red" color: "transparent"
anchors anchors
{ {
top: topBar.bottom top: topBar.bottom

View File

@ -60,7 +60,13 @@ Rectangle {
} }
base.close(); base.close();
} }
anchors.right: parent.right anchors
{
top: parent.top
topMargin: UM.Theme.getSize("default_margin").height
right: parent.right
rightMargin: UM.Theme.getSize("default_margin").height
}
style: ButtonStyle { style: ButtonStyle {
background: Rectangle { background: Rectangle {
color: "transparent" color: "transparent"

View File

@ -15,7 +15,7 @@ Item
anchors.fill: parent anchors.fill: parent
Item Item
{ {
id: backMargin id: sidebar
height: parent.height height: parent.height
width: UM.Theme.getSize("base_unit").width * 6 width: UM.Theme.getSize("base_unit").width * 6
anchors anchors
@ -29,44 +29,130 @@ Item
Button Button
{ {
text: "Back" text: "Back"
UM.RecolorImage
{
id: backArrow
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.rightMargin: UM.Theme.getSize("default_margin").width
width: UM.Theme.getSize("standard_arrow").width
height: UM.Theme.getSize("standard_arrow").height
sourceSize.width: width
sourceSize.height: height
color: UM.Theme.getColor("text")
source: UM.Theme.getIcon("arrow_left")
}
width: UM.Theme.getSize("base_unit").width * 4
height: UM.Theme.getSize("base_unit").height * 2
onClicked: manager.detailView = false onClicked: manager.detailView = false
style: ButtonStyle
{
background: Rectangle
{
color: "transparent"
}
label: Label
{
text: control.text
color: UM.Theme.getColor("text")
font: UM.Theme.getFont("default_bold")
horizontalAlignment: Text.AlignRight
width: control.width
} }
} }
ScrollView
{
id: scroll
frameVisible: false
anchors.right: base.right
anchors.left: backMargin.right
height: parent.height
style: UM.Theme.styles.scrollview
Column
{
width: scroll.width
spacing: UM.Theme.getSize("base_unit").height
height: childrenRect.height + (UM.Theme.getSize("double_margin").height * 2)
anchors
{
fill: parent
topMargin: UM.Theme.getSize("double_margin").height
bottomMargin: UM.Theme.getSize("double_margin").height
leftMargin: UM.Theme.getSize("double_margin").width
rightMargin: UM.Theme.getSize("double_margin").width
} }
}
Rectangle Rectangle
{ {
width: parent.width id: header
anchors
{
left: sidebar.right
right: parent.right
}
height: UM.Theme.getSize("base_unit").height * 12 height: UM.Theme.getSize("base_unit").height * 12
color: "transparent"
Rectangle Rectangle
{ {
id: thumbnail id: thumbnail
width: UM.Theme.getSize("toolbox_thumbnail_medium").width width: UM.Theme.getSize("toolbox_thumbnail_medium").width
height: UM.Theme.getSize("toolbox_thumbnail_medium").height height: UM.Theme.getSize("toolbox_thumbnail_medium").height
color: "white" color: "grey"
border.width: 1 anchors
{
top: parent.top
left: parent.left
leftMargin: UM.Theme.getSize("double_margin").width
topMargin: UM.Theme.getSize("double_margin").height
} }
} }
Column
{
anchors
{
top: thumbnail.top
left: thumbnail.right
leftMargin: UM.Theme.getSize("default_margin").width
right: parent.right
rightMargin: UM.Theme.getSize("double_margin").width
}
spacing: Math.floor(UM.Theme.getSize("default_margin").height/2)
Label
{
text: "DSM"
font: UM.Theme.getFont("large")
wrapMode: Text.WordWrap
width: parent.width
}
Label
{
text: "Sets the horizontal and vertical alignment of the text within the Text items width and height. By default, the text is vertically aligned to the top."
font: UM.Theme.getFont("default")
wrapMode: Text.WordWrap
width: parent.width
}
Label
{
text: "Author: " + "DSM"
font: UM.Theme.getFont("small")
wrapMode: Text.WordWrap
width: parent.width
// TODO: Add mail icon.
}
}
}
ScrollView
{
id: scroll
frameVisible: true
anchors
{
right: header.right
top: header.bottom
left: header.left
bottom: base.bottom
}
height: parent.height
style: UM.Theme.styles.scrollview
/*
ListView
{
id: contentColumn
spacing: UM.Theme.getSize("base_unit").height
height: childrenRect.height + (UM.Theme.getSize("double_margin").height * 2)
anchors
{
left: scroll.left
right: scroll.right
top: scroll.top
topMargin: UM.Theme.getSize("double_margin").height
bottomMargin: UM.Theme.getSize("double_margin").height
leftMargin: UM.Theme.getSize("double_margin").width
rightMargin: UM.Theme.getSize("double_margin").width
}
ToolboxDetailTile {} ToolboxDetailTile {}
ToolboxDetailTile {} ToolboxDetailTile {}
ToolboxDetailTile {} ToolboxDetailTile {}
@ -79,5 +165,6 @@ Item
ToolboxDetailTile {} ToolboxDetailTile {}
ToolboxDetailTile {} ToolboxDetailTile {}
} }
*/
} }
} }

View File

@ -442,7 +442,7 @@
"objects_menu_button": [0.3, 2.7], "objects_menu_button": [0.3, 2.7],
"toolbox_thumbnail_small": [6.0, 6.0], "toolbox_thumbnail_small": [6.0, 6.0],
"toolbox_thumbnail_medium": [9.0, 9.0], "toolbox_thumbnail_medium": [8.0, 8.0],
"toolbox_thumbnail_large": [12.0, 12.0] "toolbox_thumbnail_large": [12.0, 12.0]
} }
} }