Align the buttons in the output process widget

The menu in the output device selector has now a rounded corner.
This commit is contained in:
Diego Prado Gesto 2018-12-06 13:42:29 +01:00
parent 47626f6033
commit 4b79770d58
4 changed files with 21 additions and 5 deletions

View File

@ -7,6 +7,7 @@ import QtQuick.Controls 2.1
import QtGraphicalEffects 1.0 // For the dropshadow import QtGraphicalEffects 1.0 // For the dropshadow
import UM 1.1 as UM import UM 1.1 as UM
import Cura 1.0 as Cura
Button Button
{ {
@ -16,6 +17,7 @@ Button
property alias textFont: buttonText.font property alias textFont: buttonText.font
property alias cornerRadius: backgroundRect.radius property alias cornerRadius: backgroundRect.radius
property alias tooltip: tooltip.text property alias tooltip: tooltip.text
property alias cornerSide: backgroundRect.cornerSide
property color color: UM.Theme.getColor("primary") property color color: UM.Theme.getColor("primary")
property color hoverColor: UM.Theme.getColor("primary_hover") property color hoverColor: UM.Theme.getColor("primary_hover")
@ -82,9 +84,10 @@ Button
} }
} }
background: Rectangle background: Cura.RoundedRectangle
{ {
id: backgroundRect id: backgroundRect
cornerSide: Cura.RoundedRectangle.Direction.All
color: button.enabled ? (button.hovered ? button.hoverColor : button.color) : button.disabledColor color: button.enabled ? (button.hovered ? button.hoverColor : button.color) : button.disabledColor
radius: UM.Theme.getSize("action_button_radius").width radius: UM.Theme.getSize("action_button_radius").width
border.width: UM.Theme.getSize("default_lining").width border.width: UM.Theme.getSize("default_lining").width

View File

@ -17,6 +17,7 @@ Item
id: saveToButton id: saveToButton
height: parent.height height: parent.height
fixedWidthMode: true fixedWidthMode: true
cornerSide: deviceSelectionMenu.visible ? Cura.RoundedRectangle.Direction.Left : Cura.RoundedRectangle.Direction.All
anchors anchors
{ {
@ -44,6 +45,7 @@ Item
shadowEnabled: true shadowEnabled: true
shadowColor: UM.Theme.getColor("primary_shadow") shadowColor: UM.Theme.getColor("primary_shadow")
cornerSide: Cura.RoundedRectangle.Direction.Right
anchors anchors
{ {

View File

@ -101,16 +101,24 @@ Column
} }
} }
Row Item
{ {
id: buttonRow id: buttonRow
spacing: UM.Theme.getSize("default_margin").width anchors.right: parent.right
width: parent.width anchors.left: parent.left
height: UM.Theme.getSize("action_button").height
Cura.SecondaryButton Cura.SecondaryButton
{ {
id: previewStageShortcut id: previewStageShortcut
anchors
{
left: parent.left
right: outputDevicesButton.left
rightMargin: UM.Theme.getSize("default_margin").width
}
height: UM.Theme.getSize("action_button").height height: UM.Theme.getSize("action_button").height
leftPadding: UM.Theme.getSize("default_margin").width leftPadding: UM.Theme.getSize("default_margin").width
rightPadding: UM.Theme.getSize("default_margin").width rightPadding: UM.Theme.getSize("default_margin").width
@ -125,6 +133,9 @@ Column
Cura.OutputDevicesActionButton Cura.OutputDevicesActionButton
{ {
id: outputDevicesButton
anchors.right: parent.right
width: previewStageShortcut.visible ? UM.Theme.getSize("action_button").width : parent.width width: previewStageShortcut.visible ? UM.Theme.getSize("action_button").width : parent.width
height: UM.Theme.getSize("action_button").height height: UM.Theme.getSize("action_button").height
} }

View File

@ -145,7 +145,7 @@ QtObject
text: control.text text: control.text
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
font: UM.Theme.getFont("medium_bold") font: UM.Theme.getFont("medium")
color: color:
{ {
if (control.checked) if (control.checked)