Ian Paschal 6 лет назад
Родитель
Сommit
668a92952c

+ 1 - 1
plugins/Toolbox/resources/qml/Toolbox.qml

@@ -70,7 +70,7 @@ Window
         {
             id: footer
             visible: toolbox.restartRequired
-            height: toolbox.restartRequired ? UM.Theme.getSize("base_unit").height * 5 : 0
+            height: toolbox.restartRequired ? UM.Theme.getSize("toolbox_footer").height : 0
         }
         // TODO: Clean this up:
         Connections

+ 8 - 8
plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml

@@ -22,9 +22,9 @@ Item
         {
             left: sidebar.right
             right: parent.right
-            rightMargin: UM.Theme.getSize("double_margin").width
+            rightMargin: UM.Theme.getSize("wide_margin").width
         }
-        height: UM.Theme.getSize("base_unit").height * 12
+        height: UM.Theme.getSize("toolbox_detail_header").height
         Image
         {
             id: thumbnail
@@ -36,8 +36,8 @@ Item
             {
                 top: parent.top
                 left: parent.left
-                leftMargin: UM.Theme.getSize("double_margin").width
-                topMargin: UM.Theme.getSize("double_margin").height
+                leftMargin: UM.Theme.getSize("wide_margin").width
+                topMargin: UM.Theme.getSize("wide_margin").height
             }
         }
 
@@ -50,7 +50,7 @@ Item
                 left: thumbnail.right
                 leftMargin: UM.Theme.getSize("default_margin").width
                 right: parent.right
-                rightMargin: UM.Theme.getSize("double_margin").width
+                rightMargin: UM.Theme.getSize("wide_margin").width
                 bottomMargin: UM.Theme.getSize("default_margin").height
             }
             text: details.name
@@ -79,7 +79,7 @@ Item
                 left: description.left
                 topMargin: UM.Theme.getSize("default_margin").height
             }
-            spacing: Math.floor(UM.Theme.getSize("default_margin").height / 2)
+            spacing: Math.floor(UM.Theme.getSize("narrow_margin").height)
             width: childrenRect.width
             Label
             {
@@ -98,8 +98,8 @@ Item
                 leftMargin: UM.Theme.getSize("default_margin").width
                 topMargin: UM.Theme.getSize("default_margin").height
             }
-            spacing: Math.floor(UM.Theme.getSize("default_margin").height/2)
-            width: UM.Theme.getSize("base_unit").width * 12
+            spacing: Math.floor(UM.Theme.getSize("narrow_margin").height)
+            // width: UM.Theme.getSize("base_unit").width * 12
             Label
             {
                 text:

+ 2 - 2
plugins/Toolbox/resources/qml/ToolboxBackColumn.qml

@@ -10,12 +10,12 @@ Item
 {
     id: sidebar
     height: parent.height
-    width: UM.Theme.getSize("base_unit").width * 6
+    width: UM.Theme.getSize("toolbox_back_column").width
     anchors
     {
         top: parent.top
         left: parent.left
-        topMargin: UM.Theme.getSize("double_margin").height
+        topMargin: UM.Theme.getSize("wide_margin").height
         leftMargin: UM.Theme.getSize("default_margin").width
         rightMargin: UM.Theme.getSize("default_margin").width
     }

+ 2 - 2
plugins/Toolbox/resources/qml/ToolboxDetailList.qml

@@ -19,8 +19,8 @@ Item
             anchors
             {
                 right: base.right
-                topMargin: UM.Theme.getSize("double_margin").height
-                bottomMargin: UM.Theme.getSize("double_margin").height
+                topMargin: UM.Theme.getSize("wide_margin").height
+                bottomMargin: UM.Theme.getSize("wide_margin").height
                 top: parent.top
             }
             height: childrenRect.height

+ 13 - 9
plugins/Toolbox/resources/qml/ToolboxDetailPage.qml

@@ -23,9 +23,9 @@ Item
         {
             left: sidebar.right
             right: parent.right
-            rightMargin: UM.Theme.getSize("double_margin").width
+            rightMargin: UM.Theme.getSize("wide_margin").width
         }
-        height: UM.Theme.getSize("base_unit").height * 12
+        height: UM.Theme.getSize("toolbox_detail_header").height
         Image
         {
             id: thumbnail
@@ -37,8 +37,8 @@ Item
             {
                 top: parent.top
                 left: parent.left
-                leftMargin: UM.Theme.getSize("double_margin").width
-                topMargin: UM.Theme.getSize("double_margin").height
+                leftMargin: UM.Theme.getSize("wide_margin").width
+                topMargin: UM.Theme.getSize("wide_margin").height
             }
         }
 
@@ -51,7 +51,7 @@ Item
                 left: thumbnail.right
                 leftMargin: UM.Theme.getSize("default_margin").width
                 right: parent.right
-                rightMargin: UM.Theme.getSize("double_margin").width
+                rightMargin: UM.Theme.getSize("wide_margin").width
                 bottomMargin: UM.Theme.getSize("default_margin").height
             }
             text: details.name
@@ -70,7 +70,7 @@ Item
                 left: title.left
                 topMargin: UM.Theme.getSize("default_margin").height
             }
-            spacing: Math.floor(UM.Theme.getSize("default_margin").height / 2)
+            spacing: Math.floor(UM.Theme.getSize("narrow_margin").height)
             width: childrenRect.width
             Label
             {
@@ -101,8 +101,8 @@ Item
                 leftMargin: UM.Theme.getSize("default_margin").width
                 topMargin: UM.Theme.getSize("default_margin").height
             }
-            spacing: Math.floor(UM.Theme.getSize("default_margin").height/2)
-            width: UM.Theme.getSize("base_unit").width * 12
+            spacing: Math.floor(UM.Theme.getSize("narrow_margin").height)
+            // width: UM.Theme.getSize("base_unit").width * 12
             Label
             {
                 text: details.version
@@ -111,7 +111,11 @@ Item
             }
             Label
             {
-                text: Qt.formatDateTime(details.last_updated, "dd MMM yyyy")
+                text:
+                {
+                    var date = new Date(details.last_updated)
+                    return date.toLocaleString(Qt.locale())
+                }
                 font: UM.Theme.getFont("very_small")
                 color: UM.Theme.getColor("text")
             }

+ 2 - 2
plugins/Toolbox/resources/qml/ToolboxDetailTile.qml

@@ -9,8 +9,8 @@ import UM 1.1 as UM
 Item
 {
     property bool installed: toolbox.isInstalled(model.id)
-    width: base.width - UM.Theme.getSize("double_margin").width
-    height: UM.Theme.getSize("base_unit").height * 8
+    width: base.width - UM.Theme.getSize("wide_margin").width
+    height: UM.Theme.getSize("toolbox_detail_tile").height
     Column
     {
         anchors

+ 2 - 2
plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml

@@ -23,7 +23,7 @@ Item
     {
         width: parent.width
         height: childrenRect.height
-        spacing: Math.floor(UM.Theme.getSize("base_unit").width / 2)
+        spacing: Math.floor(UM.Theme.getSize("narrow_margin").width)
         Rectangle
         {
             id: thumbnail
@@ -44,7 +44,7 @@ Item
         Column
         {
             width: parent.width - thumbnail.width - parent.spacing
-            spacing: Math.floor(UM.Theme.getSize("base_unit").width / 2)
+            spacing: Math.floor(UM.Theme.getSize("narrow_margin").width)
             Label
             {
                 id: name

+ 1 - 1
plugins/Toolbox/resources/qml/ToolboxDownloadsPage.qml

@@ -18,7 +18,7 @@ ScrollView
     {
         width: base.width
         spacing: UM.Theme.getSize("default_margin").height
-        padding: UM.Theme.getSize("double_margin").height
+        padding: UM.Theme.getSize("wide_margin").height
         height: childrenRect.height + 2 * padding
         ToolboxDownloadsShowcase
         {

+ 1 - 1
plugins/Toolbox/resources/qml/ToolboxDownloadsShowcase.qml

@@ -14,7 +14,7 @@ Column
 {
     id: base
     height: childrenRect.height
-    spacing: UM.Theme.getSize("base_unit").height
+    spacing: UM.Theme.getSize("toolbox_showcase_spacing").width
     Label
     {
         id: heading

+ 2 - 2
plugins/Toolbox/resources/qml/ToolboxFooter.qml

@@ -22,7 +22,7 @@ Item
         {
             top: restartButton.top
             left: parent.left
-            leftMargin: UM.Theme.getSize("double_margin").width
+            leftMargin: UM.Theme.getSize("wide_margin").width
             right: restartButton.right
             rightMargin: UM.Theme.getSize("default_margin").width
         }
@@ -36,7 +36,7 @@ Item
             top: parent.top
             topMargin: UM.Theme.getSize("default_margin").height
             right: parent.right
-            rightMargin: UM.Theme.getSize("double_margin").width
+            rightMargin: UM.Theme.getSize("wide_margin").width
         }
         visible: toolbox.restartRequired
         iconName: "dialog-restart"

Некоторые файлы не были показаны из-за большого количества измененных файлов