mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 22:13:58 -06:00
CURA-4234 view mode button now also moves with the sidebar
This commit is contained in:
parent
4519f9b46a
commit
63eec848fc
1 changed files with 18 additions and 1 deletions
|
@ -153,11 +153,21 @@ Rectangle
|
|||
ComboBox
|
||||
{
|
||||
id: viewModeButton
|
||||
property int rightMargin: UM.Theme.getSize("sidebar").width + UM.Theme.getSize("default_margin").width;
|
||||
|
||||
anchors {
|
||||
verticalCenter: parent.verticalCenter
|
||||
right: parent.right
|
||||
rightMargin: UM.Theme.getSize("sidebar").width + UM.Theme.getSize("default_margin").width
|
||||
rightMargin: rightMargin
|
||||
}
|
||||
|
||||
function updateMargins() {
|
||||
CuraApplication.log("update margin");
|
||||
if (UM.Preferences.getValue("cura/sidebar_collapse")) {
|
||||
rightMargin = UM.Theme.getSize("default_margin").width;
|
||||
} else {
|
||||
rightMargin = UM.Theme.getSize("sidebar").width + UM.Theme.getSize("default_margin").width;
|
||||
}
|
||||
}
|
||||
|
||||
style: UM.Theme.styles.combobox
|
||||
|
@ -201,6 +211,13 @@ Rectangle
|
|||
}
|
||||
}
|
||||
|
||||
// Expand or collapse sidebar
|
||||
Connections
|
||||
{
|
||||
target: Cura.Actions.expandSidebar
|
||||
onTriggered: viewModeButton.updateMargins()
|
||||
}
|
||||
|
||||
Loader
|
||||
{
|
||||
id: view_panel
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue