mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 02:19:04 +08:00
After sidebar expanding the builplate stays in center of the screen
CURA-4234
This commit is contained in:
parent
300f29e11b
commit
00529f37d9
@ -17,7 +17,7 @@ UM.MainWindow
|
|||||||
id: base
|
id: base
|
||||||
//: Cura application window title
|
//: Cura application window title
|
||||||
title: catalog.i18nc("@title:window","Ultimaker Cura");
|
title: catalog.i18nc("@title:window","Ultimaker Cura");
|
||||||
//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)
|
||||||
property bool showPrintMonitor: false
|
property bool showPrintMonitor: false
|
||||||
|
|
||||||
// This connection is here to support legacy printer output devices that use the showPrintMonitor signal on Application to switch to the monitor stage
|
// This connection is here to support legacy printer output devices that use the showPrintMonitor signal on Application to switch to the monitor stage
|
||||||
@ -67,15 +67,6 @@ UM.MainWindow
|
|||||||
// This has been fixed for QtQuick Controls 2 since the Shortcut item has a context property.
|
// This has been fixed for QtQuick Controls 2 since the Shortcut item has a context property.
|
||||||
Cura.Actions.parent = backgroundItem
|
Cura.Actions.parent = backgroundItem
|
||||||
CuraApplication.purgeWindows()
|
CuraApplication.purgeWindows()
|
||||||
|
|
||||||
|
|
||||||
var sidebarCollaps = UM.Preferences.getValue("general/sidebar_collaps")
|
|
||||||
|
|
||||||
if (sidebarCollaps == true){
|
|
||||||
sidebar.collapsed = true;
|
|
||||||
collapsSidebarAnimation.start();
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Item
|
Item
|
||||||
@ -403,8 +394,10 @@ UM.MainWindow
|
|||||||
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)
|
||||||
expandSidebarAnimation.start();
|
expandSidebarAnimation.start();
|
||||||
}else{
|
}else{
|
||||||
|
viewportRect = Qt.rect(0, 0, 1, 1.0)
|
||||||
collapsSidebarAnimation.start();
|
collapsSidebarAnimation.start();
|
||||||
}
|
}
|
||||||
collapsed = !collapsed;
|
collapsed = !collapsed;
|
||||||
@ -436,6 +429,17 @@ UM.MainWindow
|
|||||||
to: base.width - sidebar.width
|
to: base.width - sidebar.width
|
||||||
duration: 500
|
duration: 500
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Component.onCompleted:
|
||||||
|
{
|
||||||
|
var sidebarCollaps = UM.Preferences.getValue("general/sidebar_collaps")
|
||||||
|
|
||||||
|
if (sidebarCollaps == true){
|
||||||
|
sidebar.collapsed = true;
|
||||||
|
viewportRect = Qt.rect(0, 0, 1, 1.0)
|
||||||
|
collapsSidebarAnimation.start();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Loader
|
Loader
|
||||||
|
Loading…
x
Reference in New Issue
Block a user