mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-19 04:37:51 -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("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")
|
||||
|
||||
|
|
|
@ -392,16 +392,16 @@ UM.MainWindow
|
|||
|
||||
function callExpandOrCollapse() {
|
||||
if (collapsed) {
|
||||
sidebar.visible = true
|
||||
sidebar.initialWidth = UM.Theme.getSize("sidebar").width
|
||||
viewportRect = Qt.rect(0, 0, (base.width - sidebar.width) / base.width, 1.0)
|
||||
sidebar.visible = true;
|
||||
sidebar.initialWidth = UM.Theme.getSize("sidebar").width;
|
||||
viewportRect = Qt.rect(0, 0, (base.width - sidebar.width) / base.width, 1.0);
|
||||
expandSidebarAnimation.start();
|
||||
} else {
|
||||
viewportRect = Qt.rect(0, 0, 1, 1.0)
|
||||
collapsSidebarAnimation.start();
|
||||
viewportRect = Qt.rect(0, 0, 1, 1.0);
|
||||
collapseSidebarAnimation.start();
|
||||
}
|
||||
collapsed = !collapsed;
|
||||
UM.Preferences.setValue("general/sidebar_collapse", collapsed);
|
||||
UM.Preferences.setValue("cura/sidebar_collapse", collapsed);
|
||||
}
|
||||
|
||||
anchors
|
||||
|
@ -415,7 +415,7 @@ UM.MainWindow
|
|||
source: UM.Controller.activeStage.sidebarComponent
|
||||
|
||||
NumberAnimation {
|
||||
id: collapsSidebarAnimation
|
||||
id: collapseSidebarAnimation
|
||||
target: sidebar
|
||||
properties: "x"
|
||||
to: base.width
|
||||
|
@ -432,12 +432,12 @@ UM.MainWindow
|
|||
|
||||
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;
|
||||
viewportRect = Qt.rect(0, 0, 1, 1.0)
|
||||
collapsSidebarAnimation.start();
|
||||
collapseSidebarAnimation.start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue