From e64698209c22b65bb556a042f935db73fcb2df0f Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Thu, 25 Oct 2018 17:41:35 +0200 Subject: [PATCH] Adjust the minimum size to be something around 1280x1024. Also adjust some colors color for the dark theme. Contributes to CURA-5772. --- plugins/PrepareStage/PrepareMenu.qml | 6 +++--- .../{ProgressAndSaveWidget.qml => ActionPanelWidget.qml} | 6 ++++-- resources/qml/Cura.qml | 3 ++- resources/qml/qmldir | 3 ++- resources/themes/cura-light/theme.json | 2 +- 5 files changed, 12 insertions(+), 8 deletions(-) rename resources/qml/{ProgressAndSaveWidget.qml => ActionPanelWidget.qml} (98%) diff --git a/plugins/PrepareStage/PrepareMenu.qml b/plugins/PrepareStage/PrepareMenu.qml index 8d0f03ec2f..f08de9d317 100644 --- a/plugins/PrepareStage/PrepareMenu.qml +++ b/plugins/PrepareStage/PrepareMenu.qml @@ -46,7 +46,7 @@ Item Cura.MachineSelector { id: machineSelection - width: UM.Theme.getSize("sidebar").width + width: Math.round(0.8 * UM.Theme.getSize("sidebar").width) - configSelection.width height: prepareMenu.height } @@ -54,8 +54,8 @@ Item { id: configSelection visible: isNetworkPrinter && printerConnected - width: visible ? Math.round(machineSelection.width * 0.15) : 0 - panelWidth: machineSelection.width + width: visible ? Math.round(UM.Theme.getSize("sidebar").width * 0.15) : 0 + panelWidth: Math.round(0.8 * UM.Theme.getSize("sidebar").width) height: prepareMenu.height } diff --git a/resources/qml/ProgressAndSaveWidget.qml b/resources/qml/ActionPanelWidget.qml similarity index 98% rename from resources/qml/ProgressAndSaveWidget.qml rename to resources/qml/ActionPanelWidget.qml index 6e8eb59482..02ac154178 100644 --- a/resources/qml/ProgressAndSaveWidget.qml +++ b/resources/qml/ActionPanelWidget.qml @@ -19,7 +19,9 @@ Rectangle signal showTooltip(Item item, point location, string text) signal hideTooltip() - // Also add an extra margin, as we ant some breathing room around the edges. + color: UM.Theme.getColor("sidebar") + + // Also add an extra margin, as we want some breathing room around the edges. height: saveButton.height + UM.Theme.getSize("sidebar_margin").height Label { @@ -231,7 +233,7 @@ Rectangle { id: saveButton width: parent.width - height: 100 + height: 100 * screenScaleFactor anchors.bottom: parent.bottom } } \ No newline at end of file diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 474f93afa4..c5abb0f107 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -291,6 +291,7 @@ UM.MainWindow onActiveViewChanged: viewModeButton.updateItemActiveFlags() } } + Loader { id: viewPanel @@ -307,7 +308,7 @@ UM.MainWindow source: UM.ActiveView.valid ? UM.ActiveView.activeViewPanel : "" } - ProgressAndSaveWidget + Cura.ActionPanelWidget { anchors.right: parent.right anchors.bottom: parent.bottom diff --git a/resources/qml/qmldir b/resources/qml/qmldir index 2681da00e1..0e5e316409 100644 --- a/resources/qml/qmldir +++ b/resources/qml/qmldir @@ -6,4 +6,5 @@ CustomConfigurationSelector 1.0 CustomConfigurationSelector.qml PrintSetupSelector 1.0 PrintSetupSelector.qml ActionButton 1.0 ActionButton.qml MaterialMenu 1.0 MaterialMenu.qml -NozzleMenu 1.0 NozzleMenu.qml \ No newline at end of file +NozzleMenu 1.0 NozzleMenu.qml +ActionPanelWidget 1.0 ActionPanelWidget.qml \ No newline at end of file diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 68ea9b88f8..1820ead338 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -345,7 +345,7 @@ }, "sizes": { - "window_minimum_size": [70, 50], + "window_minimum_size": [106, 85], "main_window_header": [0.0, 4.5], "main_window_header_button": [8, 4],