mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 14:34:01 -06:00
Fix style for the open file button in the prepare menu.
Contributes to CURA-5942.
This commit is contained in:
parent
0a1c0e18d1
commit
84f263f111
1 changed files with 24 additions and 17 deletions
|
@ -3,7 +3,7 @@
|
|||
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls 2.3
|
||||
|
||||
import UM 1.3 as UM
|
||||
import Cura 1.1 as Cura
|
||||
|
@ -27,14 +27,14 @@ Item
|
|||
Item
|
||||
{
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
width: openFileButtonBackground.width + itemRow.width + UM.Theme.getSize("default_margin").width
|
||||
width: openFileButton.width + itemRow.width + UM.Theme.getSize("default_margin").width
|
||||
height: parent.height
|
||||
|
||||
RowLayout
|
||||
{
|
||||
id: itemRow
|
||||
|
||||
anchors.left: openFileButtonBackground.right
|
||||
anchors.left: openFileButton.right
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
|
||||
width: Math.round(0.9 * prepareMenu.width)
|
||||
|
@ -44,7 +44,7 @@ Item
|
|||
Cura.MachineSelector
|
||||
{
|
||||
id: machineSelection
|
||||
z: openFileButtonBackground.z - 1 //Ensure that the tooltip of the open file button stays above the item row.
|
||||
z: openFileButton.z - 1 //Ensure that the tooltip of the open file button stays above the item row.
|
||||
headerCornerSide: Cura.RoundedRectangle.Direction.Left
|
||||
Layout.minimumWidth: UM.Theme.getSize("machine_selector_widget").width
|
||||
Layout.maximumWidth: UM.Theme.getSize("machine_selector_widget").width
|
||||
|
@ -86,24 +86,31 @@ Item
|
|||
}
|
||||
}
|
||||
|
||||
Rectangle
|
||||
Button
|
||||
{
|
||||
id: openFileButtonBackground
|
||||
id: openFileButton
|
||||
height: UM.Theme.getSize("stage_menu").height
|
||||
width: UM.Theme.getSize("stage_menu").height
|
||||
onClicked: Cura.Actions.open.trigger()
|
||||
|
||||
radius: UM.Theme.getSize("default_radius").width
|
||||
color: UM.Theme.getColor("toolbar_background")
|
||||
|
||||
Button
|
||||
contentItem: UM.RecolorImage
|
||||
{
|
||||
id: openFileButton
|
||||
text: catalog.i18nc("@action:button", "Open File")
|
||||
iconSource: UM.Theme.getIcon("load")
|
||||
style: UM.Theme.styles.toolbar_button
|
||||
tooltip: ""
|
||||
action: Cura.Actions.open
|
||||
anchors.centerIn: parent
|
||||
id: buttonIcon
|
||||
source: UM.Theme.getIcon("load")
|
||||
width: UM.Theme.getSize("button_icon").width
|
||||
height: UM.Theme.getSize("button_icon").height
|
||||
color: UM.Theme.getColor("toolbar_button_text")
|
||||
|
||||
sourceSize: UM.Theme.getSize("button_icon")
|
||||
}
|
||||
|
||||
background: Rectangle
|
||||
{
|
||||
height: UM.Theme.getSize("stage_menu").height
|
||||
width: UM.Theme.getSize("stage_menu").height
|
||||
|
||||
radius: UM.Theme.getSize("default_radius").width
|
||||
color: openFileButton.hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue