CURA-5035 Removed all base units

This commit is contained in:
Ian Paschal 2018-04-20 14:08:44 +02:00
parent 668a92952c
commit 9b556e9c86
11 changed files with 35 additions and 30 deletions

View file

@ -57,7 +57,7 @@ Item
font: UM.Theme.getFont("large") font: UM.Theme.getFont("large")
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
width: parent.width width: parent.width
height: UM.Theme.getSize("base_unit") * 2 height: UM.Theme.getSize("toolbox_property_label").height
} }
Label Label
{ {
@ -99,7 +99,6 @@ Item
topMargin: UM.Theme.getSize("default_margin").height topMargin: UM.Theme.getSize("default_margin").height
} }
spacing: Math.floor(UM.Theme.getSize("narrow_margin").height) spacing: Math.floor(UM.Theme.getSize("narrow_margin").height)
// width: UM.Theme.getSize("base_unit").width * 12
Label Label
{ {
text: text:

View file

@ -42,8 +42,8 @@ Item
color: button.hovered ? UM.Theme.getColor("primary") : UM.Theme.getColor("text") color: button.hovered ? UM.Theme.getColor("primary") : UM.Theme.getColor("text")
source: UM.Theme.getIcon("arrow_left") source: UM.Theme.getIcon("arrow_left")
} }
width: UM.Theme.getSize("base_unit").width * 4 width: UM.Theme.getSize("toolbox_back_button").width
height: UM.Theme.getSize("base_unit").height * 2 height: UM.Theme.getSize("toolbox_back_button").height
onClicked: onClicked:
{ {
toolbox.viewPage = "overview" toolbox.viewPage = "overview"

View file

@ -58,7 +58,7 @@ Item
font: UM.Theme.getFont("large") font: UM.Theme.getFont("large")
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
width: parent.width width: parent.width
height: UM.Theme.getSize("base_unit") * 2 height: UM.Theme.getSize("toolbox_property_label").height
} }
Column Column
@ -102,7 +102,6 @@ Item
topMargin: UM.Theme.getSize("default_margin").height topMargin: UM.Theme.getSize("default_margin").height
} }
spacing: Math.floor(UM.Theme.getSize("narrow_margin").height) spacing: Math.floor(UM.Theme.getSize("narrow_margin").height)
// width: UM.Theme.getSize("base_unit").width * 12
Label Label
{ {
text: details.version text: details.version

View file

@ -23,7 +23,7 @@ Item
Label Label
{ {
width: parent.width width: parent.width
height: UM.Theme.getSize("base_unit").height * 2 height: UM.Theme.getSize("toolbox_property_label").height
text: model.name text: model.name
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
color: UM.Theme.getColor("text") color: UM.Theme.getColor("text")

View file

@ -13,7 +13,7 @@ Column
{ {
id: base id: base
height: childrenRect.height height: childrenRect.height
spacing: UM.Theme.getSize("base_unit").height spacing: UM.Theme.getSize("default_margin").height
Label Label
{ {
id: heading id: heading
@ -27,8 +27,8 @@ Column
id: grid id: grid
width: parent.width width: parent.width
columns: 2 columns: 2
columnSpacing: UM.Theme.getSize("base_unit").width columnSpacing: UM.Theme.getSize("default_margin").height
rowSpacing: UM.Theme.getSize("base_unit").height rowSpacing: UM.Theme.getSize("default_margin").width
Repeater Repeater
{ {

View file

@ -26,7 +26,7 @@ Column
Row Row
{ {
height: childrenRect.height height: childrenRect.height
spacing: UM.Theme.getSize("base_unit").width * 2 spacing: UM.Theme.getSize("wide_margin").width
anchors anchors
{ {
horizontalCenter: parent.horizontalCenter horizontalCenter: parent.horizontalCenter

View file

@ -54,7 +54,7 @@ Item
} }
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
height: UM.Theme.getSize("base_unit").width * 4 height: UM.Theme.getSize("toolbox_heading_label").height
width: parent.width width: parent.width
color: UM.Theme.getColor("text") color: UM.Theme.getColor("text")
font: UM.Theme.getFont("medium_bold") font: UM.Theme.getFont("medium_bold")

View file

@ -11,12 +11,12 @@ Item
id: footer id: footer
width: parent.width width: parent.width
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
height: visible ? Math.floor(UM.Theme.getSize("base_unit").height * 5.5) : 0 height: visible ? Math.floor(UM.Theme.getSize("toolbox_footer").height) : 0
Label Label
{ {
visible: toolbox.restartRequired visible: toolbox.restartRequired
text: "You will need to restart Cura before changes in plugins have effect." text: "You will need to restart Cura before changes in plugins have effect."
height: Math.floor(UM.Theme.getSize("base_unit").height * 2.5) height: Math.floor(UM.Theme.getSize("toolbox_footer_button").height)
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
anchors anchors
{ {
@ -45,8 +45,8 @@ Item
{ {
background: Rectangle background: Rectangle
{ {
implicitWidth: UM.Theme.getSize("base_unit").width * 8 implicitWidth: UM.Theme.getSize("toolbox_footer_button").width
implicitHeight: Math.floor(UM.Theme.getSize("base_unit").height * 2.5) implicitHeight: Math.floor(UM.Theme.getSize("toolbox_footer_button").height)
color: control.hovered ? UM.Theme.getColor("primary_hover") : UM.Theme.getColor("primary") color: control.hovered ? UM.Theme.getColor("primary_hover") : UM.Theme.getColor("primary")
} }
label: Text label: Text

View file

@ -9,7 +9,7 @@ Item
{ {
id: header id: header
width: parent.width width: parent.width
height: UM.Theme.getSize("base_unit").height * 4 height: UM.Theme.getSize("toolbox_header").height * 4
Row Row
{ {
id: bar id: bar

View file

@ -11,7 +11,7 @@ Item
id: base id: base
property bool canUpdate: false property bool canUpdate: false
property bool isEnabled: true property bool isEnabled: true
height: UM.Theme.getSize("base_unit").height * 8 height: UM.Theme.getSize("toolbox_installed_tile").height
anchors anchors
{ {
left: parent.left left: parent.left
@ -41,7 +41,7 @@ Item
{ {
text: model.name text: model.name
width: parent.width width: parent.width
height: UM.Theme.getSize("base_unit").height * 2 height: UM.Theme.getSize("toolbox_property_label").height
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
font: UM.Theme.getFont("default_bold") font: UM.Theme.getFont("default_bold")
@ -51,7 +51,7 @@ Item
{ {
text: model.description text: model.description
width: parent.width width: parent.width
height: UM.Theme.getSize("base_unit").height * 3 height: UM.Theme.getSize("toolbox_property_label").height
clip: true clip: true
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
color: pluginInfo.color color: pluginInfo.color
@ -61,7 +61,6 @@ Item
Column Column
{ {
id: authorInfo id: authorInfo
width: UM.Theme.getSize("base_unit").width * 16
height: parent.height height: parent.height
anchors anchors
{ {
@ -84,7 +83,7 @@ Item
} }
} }
width: parent.width width: parent.width
height: UM.Theme.getSize("base_unit").height * 3 height: UM.Theme.getSize("toolbox_property_label").height
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignLeft horizontalAlignment: Text.AlignLeft
@ -122,8 +121,8 @@ Item
{ {
background: Rectangle background: Rectangle
{ {
implicitWidth: UM.Theme.getSize("base_unit").width * 8 implicitWidth: UM.Theme.getSize("toolbox_action_button").width
implicitHeight: Math.floor(UM.Theme.getSize("base_unit").width * 2.5) implicitHeight: UM.Theme.getSize("toolbox_action_button").height
color: "transparent" color: "transparent"
border border
{ {
@ -167,8 +166,8 @@ Item
{ {
background: Rectangle background: Rectangle
{ {
implicitWidth: UM.Theme.getSize("base_unit").width * 8 implicitWidth: UM.Theme.getSize("toolbox_action_button").width
implicitHeight: UM.Theme.getSize("base_unit").width * 2.5 implicitHeight: UM.Theme.getSize("toolbox_action_button").height
color: control.hovered ? UM.Theme.getColor("primary_hover") : UM.Theme.getColor("primary") color: control.hovered ? UM.Theme.getColor("primary_hover") : UM.Theme.getColor("primary")
} }
label: Label label: Label
@ -193,7 +192,7 @@ Item
left: updateButton.left left: updateButton.left
right: updateButton.right right: updateButton.right
top: updateButton.bottom top: updateButton.bottom
topMargin: Math.floor(UM.Theme.getSize("base_unit") / 4) topMargin: Math.floor(UM.Theme.getSize("default_margin") / 4)
} }
value: toolbox.isDownloading ? toolbox.downloadProgress : 0 value: toolbox.isDownloading ? toolbox.downloadProgress : 0
visible: toolbox.isDownloading visible: toolbox.isDownloading
@ -202,7 +201,7 @@ Item
background: Rectangle background: Rectangle
{ {
color: UM.Theme.getColor("lining") color: UM.Theme.getColor("lining")
implicitHeight: Math.floor(UM.Theme.getSize("base_unit").height / 2) implicitHeight: Math.floor(UM.Theme.getSize("toolbox_progress_bar").height)
} }
progress: Rectangle progress: Rectangle
{ {

View file

@ -447,11 +447,19 @@
"toolbox_thumbnail_small": [6.0, 6.0], "toolbox_thumbnail_small": [6.0, 6.0],
"toolbox_thumbnail_medium": [8.0, 8.0], "toolbox_thumbnail_medium": [8.0, 8.0],
"toolbox_thumbnail_large": [12.0, 12.0], "toolbox_thumbnail_large": [12.0, 12.0],
"toolbox_footer": [1.0, 5.0], "toolbox_footer": [1.0, 5.5],
"toolbox_footer_button": [8.0, 2.5],
"toolbox_showcase_spacing": [1.0, 1.0], "toolbox_showcase_spacing": [1.0, 1.0],
"toolbox_header_tab": [8.0, 4.0], "toolbox_header_tab": [8.0, 4.0],
"toolbox_detail_header": [1.0, 12.0], "toolbox_detail_header": [1.0, 12.0],
"toolbox_detail_tile": [1.0, 8.0], "toolbox_detail_tile": [1.0, 8.0],
"toolbox_back_column": [6.0, 1.0] "toolbox_back_column": [6.0, 1.0],
"toolbox_back_button": [4.0, 2.0],
"toolbox_installed_tile": [1.0, 8.0],
"toolbox_property_label": [1.0, 2.0],
"toolbox_heading_label": [1.0, 4.0],
"toolbox_header": [1.0, 4.0],
"toolbox_action_button": [8.0, 2.5],
"toolbox_progress_bar": [8.0, 0.5]
} }
} }