Add rounded corners to stage menus

CURA-5785
This commit is contained in:
Jaime van Kessel 2018-11-13 16:31:48 +01:00
parent 20e2f317de
commit b83175a380
2 changed files with 117 additions and 85 deletions

View File

@ -23,7 +23,7 @@ Item
Item Item
{ {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
width: openFileButton.width + UM.Theme.getSize("default_margin").width + itemRow.width width: openFileButton.width + itemRowBackground.width
height: parent.height height: parent.height
Button Button
@ -36,15 +36,28 @@ Item
action: Cura.Actions.open action: Cura.Actions.open
} }
RowLayout Rectangle
{ {
id: itemRow id: itemRowBackground
radius: UM.Theme.getSize("default_radius").width
border.width: UM.Theme.getSize("default_lining").width
border.color: UM.Theme.getColor("lining")
color: UM.Theme.getColor("toolbar_background")
width: itemRow.width + UM.Theme.getSize("default_margin").width
height: parent.height
anchors.left: openFileButton.right anchors.left: openFileButton.right
anchors.leftMargin: UM.Theme.getSize("default_margin").width anchors.leftMargin: UM.Theme.getSize("default_margin").width
RowLayout
{
id: itemRow
anchors.centerIn: parent
width: 0.9 * prepareMenu.width width: 0.9 * prepareMenu.width
height: parent.height height: parent.height - 2 * UM.Theme.getSize("default_lining").width
Cura.MachineSelector Cura.MachineSelector
{ {
@ -79,3 +92,4 @@ Item
} }
} }
} }
}

View File

@ -15,21 +15,38 @@ Item
signal showTooltip(Item item, point location, string text) signal showTooltip(Item item, point location, string text)
signal hideTooltip() signal hideTooltip()
property real itemHeight: height - 2 * UM.Theme.getSize("default_lining").width
UM.I18nCatalog UM.I18nCatalog
{ {
id: catalog id: catalog
name: "cura" name: "cura"
} }
Row
{
anchors.horizontalCenter: parent.horizontalCenter
spacing: UM.Theme.getSize("default_margin").width
height: parent.height
Rectangle Rectangle
{ {
color: UM.Theme.getColor("tool_panel_background") anchors.fill: stageMenu
anchors.leftMargin: -radius
radius: UM.Theme.getSize("default_radius").width
border.width: UM.Theme.getSize("default_lining").width
border.color: UM.Theme.getColor("lining")
color: UM.Theme.getColor("toolbar_background")
}
Item
{
id: stageMenu
height: parent.height
width: childrenRect.width + UM.Theme.getSize("default_margin").width
anchors.horizontalCenter: parent.horizontalCenter
Row
{
anchors.centerIn: parent
spacing: UM.Theme.getSize("default_margin").width
height: parent.height - 2 * UM.Theme.getSize("default_lining").width
Item
{
width: viewModeButton.width + 2 * UM.Theme.getSize("default_margin").width width: viewModeButton.width + 2 * UM.Theme.getSize("default_margin").width
height: parent.height height: parent.height
ComboBox ComboBox
@ -100,3 +117,4 @@ Item
} }
} }
} }
}