Browse Source

Merge branch 'ui_rework_4_0' of github.com:Ultimaker/Cura into CURA-5785-Restyle_stage_menu

Jaime van Kessel 6 years ago
parent
commit
f14687a749

+ 3 - 7
plugins/SimulationView/LayerSlider.qml

@@ -21,15 +21,12 @@ Item
     property color lowerHandleColor: UM.Theme.getColor("slider_handle")
     property color rangeHandleColor: UM.Theme.getColor("slider_groove_fill")
     property color handleActiveColor: UM.Theme.getColor("slider_handle_active")
-    property real handleLabelWidth: UM.Theme.getSize("slider_layerview_background").width
     property var activeHandle: upperHandle
 
     // Track properties
     property real trackThickness: UM.Theme.getSize("slider_groove").width // width of the slider track
-    property real trackRadius: trackThickness / 2
+    property real trackRadius: UM.Theme.getSize("slider_groove_radius").width
     property color trackColor: UM.Theme.getColor("slider_groove")
-    property real trackBorderWidth: 1
-    property color trackBorderColor: UM.Theme.getColor("slider_groove_border")
 
     // value properties
     property real maximumValue: 100
@@ -90,8 +87,6 @@ Item
         radius: sliderRoot.trackRadius
         anchors.centerIn: sliderRoot
         color: sliderRoot.trackColor
-        border.width: sliderRoot.trackBorderWidth
-        border.color: sliderRoot.trackBorderColor
         visible: sliderRoot.layersVisible
     }
 
@@ -140,9 +135,10 @@ Item
 
         Rectangle
         {
-            width: sliderRoot.trackThickness - 2 * sliderRoot.trackBorderWidth
+            width: sliderRoot.trackThickness
             height: parent.height + sliderRoot.handleSize
             anchors.centerIn: parent
+            radius: sliderRoot.trackRadius
             color: sliderRoot.rangeHandleColor
         }
 

+ 3 - 6
plugins/SimulationView/PathSlider.qml

@@ -23,10 +23,8 @@ Item
 
     // track properties
     property real trackThickness: UM.Theme.getSize("slider_groove").width
-    property real trackRadius: trackThickness / 2
+    property real trackRadius: UM.Theme.getSize("slider_groove_radius").width
     property color trackColor: UM.Theme.getColor("slider_groove")
-    property real trackBorderWidth: 1 // width of the slider track border
-    property color trackBorderColor: UM.Theme.getColor("slider_groove_border")
 
     // value properties
     property real maximumValue: 100
@@ -68,8 +66,6 @@ Item
         radius: sliderRoot.trackRadius
         anchors.centerIn: sliderRoot
         color: sliderRoot.trackColor
-        border.width: sliderRoot.trackBorderWidth
-        border.color: sliderRoot.trackBorderColor
         visible: sliderRoot.pathsVisible
     }
 
@@ -86,9 +82,10 @@ Item
 
         Rectangle
         {
-            height: sliderRoot.trackThickness - 2 * sliderRoot.trackBorderWidth
+            height: sliderRoot.trackThickness
             width: parent.width + sliderRoot.handleSize
             anchors.centerIn: parent
+            radius: sliderRoot.trackRadius
             color: sliderRoot.rangeColor
         }
     }

+ 2 - 2
plugins/SimulationView/SimulationViewMainComponent.qml

@@ -18,7 +18,7 @@ Item
     {
         id: pathSlider
         height: UM.Theme.getSize("slider_handle").width
-        width: UM.Theme.getSize("layerview_menu_size").width
+        width: UM.Theme.getSize("slider_layerview_size").height
 
         anchors.bottom: parent.bottom
         anchors.bottomMargin: UM.Theme.getSize("default_margin").height
@@ -166,7 +166,7 @@ Item
         id: layerSlider
 
         width: UM.Theme.getSize("slider_handle").width
-        height: UM.Theme.getSize("layerview_menu_size").height
+        height: UM.Theme.getSize("slider_layerview_size").height
 
         anchors
         {

+ 3 - 2
resources/qml/Account/AccountWidget.qml

@@ -51,6 +51,9 @@ Button
 
         closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent
 
+        opacity: opened ? 1 : 0
+        Behavior on opacity { NumberAnimation { duration: 100 } }
+
         contentItem: AccountDetails
         {
             id: panel
@@ -61,8 +64,6 @@ Button
 
         background: UM.PointingRectangle
         {
-            opacity: visible ? 1 : 0
-            Behavior on opacity { NumberAnimation { duration: 100 } }
             color: UM.Theme.getColor("tool_panel_background")
             borderColor: UM.Theme.getColor("lining")
             borderWidth: UM.Theme.getSize("default_lining").width

+ 0 - 1
resources/qml/ActionPanel/ActionPanelWidget.qml

@@ -23,7 +23,6 @@ Rectangle
     border.width: UM.Theme.getSize("default_lining").width
     border.color: UM.Theme.getColor("lining")
     radius: UM.Theme.getSize("default_radius").width
-    visible: CuraApplication.platformActivity
 
     property bool outputAvailable: UM.Backend.state == UM.Backend.Done || UM.Backend.state == UM.Backend.Disabled
 

+ 4 - 1
resources/qml/ActionPanel/OutputProcessWidget.qml

@@ -102,6 +102,8 @@ Column
 
         Cura.ActionButton
         {
+            id: previewStageShortcut
+
             leftPadding: UM.Theme.getSize("default_margin").width
             rightPadding: UM.Theme.getSize("default_margin").width
             height: UM.Theme.getSize("action_panel_button").height
@@ -111,11 +113,12 @@ Column
             textColor: UM.Theme.getColor("primary")
             textHoverColor: UM.Theme.getColor("text")
             onClicked: UM.Controller.setActiveStage("PreviewStage")
+            visible: UM.Controller.activeStage != null && UM.Controller.activeStage.stageId != "PreviewStage"
         }
 
         Cura.OutputDevicesActionButton
         {
-            width: UM.Theme.getSize("action_panel_button").width
+            width: previewStageShortcut.visible ? UM.Theme.getSize("action_panel_button").width : parent.width
             height: UM.Theme.getSize("action_panel_button").height
         }
     }

+ 18 - 16
resources/qml/ActionPanel/PrintInformationWidget.qml

@@ -7,29 +7,30 @@ import QtQuick.Controls 2.1
 import UM 1.1 as UM
 import Cura 1.0 as Cura
 
-Button
+UM.RecolorImage
 {
     id: widget
 
-    implicitHeight: UM.Theme.getSize("section_icon").height
-    implicitWidth: UM.Theme.getSize("section_icon").width
+    //implicitHeight: UM.Theme.getSize("section_icon").height
+    //implicitWidth: UM.Theme.getSize("section_icon").width
 
-    background: UM.RecolorImage
-    {
-        id: moreInformationIcon
+    source: UM.Theme.getIcon("info")
+    width: UM.Theme.getSize("section_icon").width
+    height: UM.Theme.getSize("section_icon").height
 
-        source: UM.Theme.getIcon("info")
-        width: UM.Theme.getSize("section_icon").width
-        height: UM.Theme.getSize("section_icon").height
+    sourceSize.width: width
+    sourceSize.height: height
 
-        sourceSize.width: width
-        sourceSize.height: height
+    color: popup.opened ? UM.Theme.getColor("primary") : UM.Theme.getColor("text_medium")
 
-        color: widget.hovered ? UM.Theme.getColor("primary") : UM.Theme.getColor("text_medium")
+    MouseArea
+    {
+        anchors.fill: parent
+        hoverEnabled: true
+        onEntered: popup.open()
+        onExited: popup.close()
     }
 
-    onClicked: popup.opened ? popup.close() : popup.open()
-
     Popup
     {
         id: popup
@@ -39,6 +40,9 @@ Button
 
         closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent
 
+        opacity: opened ? 1 : 0
+        Behavior on opacity { NumberAnimation { duration: 100 } }
+
         contentItem: PrintJobInformation
         {
             id: printJobInformation
@@ -47,8 +51,6 @@ Button
 
         background: UM.PointingRectangle
         {
-            opacity: visible ? 1 : 0
-            Behavior on opacity { NumberAnimation { duration: 100 } }
             color: UM.Theme.getColor("tool_panel_background")
             borderColor: UM.Theme.getColor("lining")
             borderWidth: UM.Theme.getSize("default_lining").width

+ 2 - 0
resources/qml/Cura.qml

@@ -186,6 +186,7 @@ UM.MainWindow
                     verticalCenter: parent.verticalCenter
                     left: parent.left
                 }
+                visible: CuraApplication.platformActivity
             }
 
             ObjectsList
@@ -235,6 +236,7 @@ UM.MainWindow
                 anchors.bottom: parent.bottom
                 anchors.rightMargin: UM.Theme.getSize("thick_margin").width
                 anchors.bottomMargin: UM.Theme.getSize("thick_margin").height
+                visible: CuraApplication.platformActivity
             }
 
             Loader

+ 17 - 18
resources/qml/ExtruderButton.qml

@@ -15,37 +15,36 @@ Button
 
     text: catalog.i18ncp("@label %1 is filled in with the name of an extruder", "Print Selected Model with %1", "Print Selected Models with %1", UM.Selection.selectionCount).arg(extruder.name)
 
-    style: UM.Theme.styles.tool_button;
+    style: UM.Theme.styles.toolbar_button
     iconSource: UM.Theme.getIcon("extruder_button")
 
     checked: Cura.ExtruderManager.selectedObjectExtruders.indexOf(extruder.id) != -1
     enabled: UM.Selection.hasSelection && extruder.stack.isEnabled
 
-    property color customColor: base.hovered ? UM.Theme.getColor("button_hover") : UM.Theme.getColor("button");
-
-    Rectangle
-    {
-        anchors.fill: parent
-        anchors.margins: UM.Theme.getSize("default_lining").width;
-
-        color: "transparent"
-
-        border.width: base.checked ? UM.Theme.getSize("default_lining").width : 0;
-        border.color: UM.Theme.getColor("button_text")
-    }
-
     Item
     {
         anchors.centerIn: parent
         width: UM.Theme.getSize("default_margin").width
         height: UM.Theme.getSize("default_margin").height
+        opacity: !base.enabled ? 0.2 : 1.0
 
         Label
         {
-            anchors.centerIn: parent;
-            text: index + 1;
-            color: parent.enabled ? UM.Theme.getColor("button_text") : UM.Theme.getColor("button_disabled_text")
-            font: UM.Theme.getFont("default_bold");
+            anchors.centerIn: parent
+            text: index + 1
+            color:
+            {
+                if (base.checked)
+                {
+                    return UM.Theme.getColor("toolbar_button_text_active")
+                }
+                else if(base.hovered)
+                {
+                    return UM.Theme.getColor("toolbar_button_text_hover")
+                }
+                return UM.Theme.getColor("toolbar_button_text")
+            }
+            font: UM.Theme.getFont("default_bold")
         }
     }
 

+ 1 - 1
resources/qml/MainWindow/ApplicationMenu.qml

@@ -86,7 +86,7 @@ Item
         Menu
         {
             id: plugin_menu
-            title: catalog.i18nc("@title:menu menubar:toplevel", "&Toolbox")
+            title: catalog.i18nc("@title:menu menubar:toplevel", "&Marketplace")
 
             MenuItem { action: Cura.Actions.browsePackages }
         }

Some files were not shown because too many files changed in this diff