mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-19 12:47:49 -06:00
CURA-4234 rename to cura/sidebar_collapse, fix spelling errors, styling
This commit is contained in:
parent
80afda1912
commit
4519f9b46a
2 changed files with 14 additions and 14 deletions
|
@ -313,7 +313,7 @@ class CuraApplication(QtApplication):
|
||||||
preferences.addPreference("cura/material_settings", "{}")
|
preferences.addPreference("cura/material_settings", "{}")
|
||||||
|
|
||||||
preferences.addPreference("view/invert_zoom", False)
|
preferences.addPreference("view/invert_zoom", False)
|
||||||
preferences.addPreference("general/sidebar_collapse", False)
|
preferences.addPreference("cura/sidebar_collapse", False)
|
||||||
|
|
||||||
self._need_to_show_user_agreement = not Preferences.getInstance().getValue("general/accepted_user_agreement")
|
self._need_to_show_user_agreement = not Preferences.getInstance().getValue("general/accepted_user_agreement")
|
||||||
|
|
||||||
|
|
|
@ -392,16 +392,16 @@ UM.MainWindow
|
||||||
|
|
||||||
function callExpandOrCollapse() {
|
function callExpandOrCollapse() {
|
||||||
if (collapsed) {
|
if (collapsed) {
|
||||||
sidebar.visible = true
|
sidebar.visible = true;
|
||||||
sidebar.initialWidth = UM.Theme.getSize("sidebar").width
|
sidebar.initialWidth = UM.Theme.getSize("sidebar").width;
|
||||||
viewportRect = Qt.rect(0, 0, (base.width - sidebar.width) / base.width, 1.0)
|
viewportRect = Qt.rect(0, 0, (base.width - sidebar.width) / base.width, 1.0);
|
||||||
expandSidebarAnimation.start();
|
expandSidebarAnimation.start();
|
||||||
} else {
|
} else {
|
||||||
viewportRect = Qt.rect(0, 0, 1, 1.0)
|
viewportRect = Qt.rect(0, 0, 1, 1.0);
|
||||||
collapsSidebarAnimation.start();
|
collapseSidebarAnimation.start();
|
||||||
}
|
}
|
||||||
collapsed = !collapsed;
|
collapsed = !collapsed;
|
||||||
UM.Preferences.setValue("general/sidebar_collapse", collapsed);
|
UM.Preferences.setValue("cura/sidebar_collapse", collapsed);
|
||||||
}
|
}
|
||||||
|
|
||||||
anchors
|
anchors
|
||||||
|
@ -415,7 +415,7 @@ UM.MainWindow
|
||||||
source: UM.Controller.activeStage.sidebarComponent
|
source: UM.Controller.activeStage.sidebarComponent
|
||||||
|
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
id: collapsSidebarAnimation
|
id: collapseSidebarAnimation
|
||||||
target: sidebar
|
target: sidebar
|
||||||
properties: "x"
|
properties: "x"
|
||||||
to: base.width
|
to: base.width
|
||||||
|
@ -432,12 +432,12 @@ UM.MainWindow
|
||||||
|
|
||||||
Component.onCompleted:
|
Component.onCompleted:
|
||||||
{
|
{
|
||||||
var sidebarCollaps = UM.Preferences.getValue("general/sidebar_collapse")
|
var sidebarCollapsed = UM.Preferences.getValue("cura/sidebar_collapse");
|
||||||
|
|
||||||
if (sidebarCollaps == true){
|
if (sidebarCollapsed) {
|
||||||
sidebar.collapsed = true;
|
sidebar.collapsed = true;
|
||||||
viewportRect = Qt.rect(0, 0, 1, 1.0)
|
viewportRect = Qt.rect(0, 0, 1, 1.0)
|
||||||
collapsSidebarAnimation.start();
|
collapseSidebarAnimation.start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue