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

View File

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

View File

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

View File

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