Browse Source

Move default margin by default to Cura's action buttons

So we don't have to repeat that every time you create a new button.

Contributes to issue CURA-5876.
Ghostkeeper 6 years ago
parent
commit
42d73836f4

+ 3 - 0
resources/qml/ActionButton.qml

@@ -29,6 +29,9 @@ Button
     // we elide the text to the right so the text will be cut off with the three dots at the end.
     property var fixedWidthMode: false
 
+    leftPadding: UM.Theme.getSize("default_margin").width
+    rightPadding: UM.Theme.getSize("default_margin").width
+
     contentItem: Row
     {
         UM.RecolorImage

+ 2 - 0
resources/qml/ActionPanel/OutputDevicesActionButton.qml

@@ -48,6 +48,8 @@ Item
             right: parent.right
         }
 
+        leftPadding: UM.Theme.getSize("narrow_margin").width //Need more space than usual here for wide text.
+        rightPadding: UM.Theme.getSize("narrow_margin").width
         tooltip: catalog.i18nc("@info:tooltip", "Select the active output device")
         iconSource: popup.opened ? UM.Theme.getIcon("arrow_top") : UM.Theme.getIcon("arrow_bottom")
         color: UM.Theme.getColor("action_panel_secondary")

+ 0 - 2
resources/qml/ActionPanel/OutputProcessWidget.qml

@@ -104,8 +104,6 @@ Column
         {
             id: previewStageShortcut
 
-            leftPadding: UM.Theme.getSize("default_margin").width
-            rightPadding: UM.Theme.getSize("default_margin").width
             height: UM.Theme.getSize("action_panel_button").height
             text: catalog.i18nc("@button", "Preview")
             color: UM.Theme.getColor("secondary")

+ 0 - 2
resources/qml/MainWindow/MainWindowHeader.qml

@@ -81,8 +81,6 @@ Rectangle
             rightMargin: UM.Theme.getSize("default_margin").width
             verticalCenter: parent.verticalCenter
         }
-        leftPadding: UM.Theme.getSize("default_margin").width
-        rightPadding: UM.Theme.getSize("default_margin").width
         text: catalog.i18nc("@action:button", "Marketplace")
         height: Math.round(0.5 * UM.Theme.getSize("main_window_header").height)
         color: UM.Theme.getColor("main_window_header_secondary_button_background_active")

+ 0 - 4
resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml

@@ -172,8 +172,6 @@ Cura.ExpandableComponent
                 textColor: UM.Theme.getColor("primary")
                 textHoverColor: UM.Theme.getColor("text")
                 height: UM.Theme.getSize("action_panel_button").height
-                leftPadding: UM.Theme.getSize("default_margin").width
-                rightPadding: UM.Theme.getSize("default_margin").width
 
                 onClicked: popupItem.configuration_method = "custom"
             }
@@ -195,8 +193,6 @@ Cura.ExpandableComponent
                 textColor: UM.Theme.getColor("primary")
                 textHoverColor: UM.Theme.getColor("text")
                 height: UM.Theme.getSize("action_panel_button").height
-                leftPadding: UM.Theme.getSize("default_margin").width
-                rightPadding: UM.Theme.getSize("default_margin").width
 
                 onClicked: popupItem.configuration_method = "auto"
             }