mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-22 18:31:11 -07: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
|
ComboBox
|
||||||
{
|
{
|
||||||
id: viewModeButton
|
id: viewModeButton
|
||||||
|
property int rightMargin: UM.Theme.getSize("sidebar").width + UM.Theme.getSize("default_margin").width;
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
right: parent.right
|
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
|
style: UM.Theme.styles.combobox
|
||||||
|
|
@ -201,6 +211,13 @@ Rectangle
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Expand or collapse sidebar
|
||||||
|
Connections
|
||||||
|
{
|
||||||
|
target: Cura.Actions.expandSidebar
|
||||||
|
onTriggered: viewModeButton.updateMargins()
|
||||||
|
}
|
||||||
|
|
||||||
Loader
|
Loader
|
||||||
{
|
{
|
||||||
id: view_panel
|
id: view_panel
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue