mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 15:44:04 -06:00
Reorient LayerView slider
Fix toolbar tooltip collisions Refactor use of colors.text_default
This commit is contained in:
parent
a1123655ff
commit
2477617155
7 changed files with 40 additions and 45 deletions
|
@ -10,14 +10,14 @@ import UM 1.0 as UM
|
|||
|
||||
Item
|
||||
{
|
||||
width: 250
|
||||
height: 250
|
||||
width: UM.Theme.sizes.button.width
|
||||
height: UM.Theme.sizes.slider_layerview_size.height
|
||||
|
||||
Slider
|
||||
{
|
||||
id: slider
|
||||
width: 10
|
||||
height: 250
|
||||
width: UM.Theme.sizes.slider_layerview_size.width
|
||||
height: UM.Theme.sizes.slider_layerview_size.height
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.sizes.slider_layerview_margin.width/2
|
||||
orientation: Qt.Vertical
|
||||
|
@ -30,14 +30,6 @@ Item
|
|||
|
||||
style: UM.Theme.styles.layerViewSlider
|
||||
}
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
y: -UM.Theme.sizes.slider_layerview_background_extension.height
|
||||
z: slider.z - 1
|
||||
width: UM.Theme.sizes.button.width
|
||||
height: UM.Theme.sizes.slider_layerview_background_extension.height
|
||||
color: UM.Theme.colors.slider_text_background
|
||||
}
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
|
|
@ -81,7 +81,7 @@ Item{
|
|||
text: catalog.i18nc("@label","Global Profile:");
|
||||
width: parent.width/100*45
|
||||
font: UM.Theme.fonts.default;
|
||||
color: UM.Theme.colors.text_default;
|
||||
color: UM.Theme.colors.text;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ Item
|
|||
anchors.leftMargin: UM.Theme.sizes.default_margin.width
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
font: UM.Theme.fonts.default;
|
||||
color: UM.Theme.colors.text_default;
|
||||
color: UM.Theme.colors.text;
|
||||
}
|
||||
|
||||
ToolButton {
|
||||
|
|
|
@ -33,7 +33,7 @@ Item
|
|||
//: Infill selection label
|
||||
text: catalog.i18nc("@label","Infill:");
|
||||
font: UM.Theme.fonts.default;
|
||||
color: UM.Theme.colors.text_default;
|
||||
color: UM.Theme.colors.text;
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: UM.Theme.sizes.default_margin.height
|
||||
anchors.left: parent.left
|
||||
|
@ -168,7 +168,7 @@ Item
|
|||
//: Helpers selection label
|
||||
text: catalog.i18nc("@label:listbox","Helpers:");
|
||||
font: UM.Theme.fonts.default;
|
||||
color: UM.Theme.colors.text_default;
|
||||
color: UM.Theme.colors.text;
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
|
|
|
@ -47,6 +47,6 @@ Rectangle {
|
|||
}
|
||||
wrapMode: Text.Wrap;
|
||||
font: UM.Theme.fonts.default;
|
||||
color: UM.Theme.colors.text_default;
|
||||
color: UM.Theme.colors.text;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,18 +59,22 @@ QtObject {
|
|||
implicitWidth: UM.Theme.sizes.button.width;
|
||||
implicitHeight: UM.Theme.sizes.button.height;
|
||||
Rectangle {
|
||||
anchors.left: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: UM.Theme.colors.button_text
|
||||
width: control.hovered ? openFileLabel.width : 0;
|
||||
height: openFileLabel.height
|
||||
Behavior on width { NumberAnimation { duration: 100; } }
|
||||
id: tool_button_background
|
||||
anchors.top: parent.verticalCenter;
|
||||
|
||||
width: parent.width;
|
||||
height: control.hovered ? parent.height / 2 + label.height : 0;
|
||||
Behavior on height { NumberAnimation { duration: 100; } }
|
||||
|
||||
opacity: control.hovered ? 1.0 : 0.0;
|
||||
Behavior on opacity { NumberAnimation { duration: 100; } }
|
||||
|
||||
Label {
|
||||
id: openFileLabel
|
||||
id: label
|
||||
anchors.bottom: parent.bottom
|
||||
text: control.text
|
||||
width: UM.Theme.sizes.button.width;
|
||||
wrapMode: Text.WordWrap
|
||||
font: UM.Theme.fonts.button_tooltip;
|
||||
color: UM.Theme.colors.button_tooltip_text;
|
||||
}
|
||||
|
@ -357,12 +361,14 @@ QtObject {
|
|||
|
||||
scrollBarBackground: Rectangle {
|
||||
implicitWidth: UM.Theme.sizes.scrollbar.width
|
||||
radius: implicitWidth / 2
|
||||
color: UM.Theme.colors.scrollbar_background;
|
||||
}
|
||||
|
||||
handle: Rectangle {
|
||||
id: scrollViewHandle
|
||||
implicitWidth: UM.Theme.sizes.scrollbar.width;
|
||||
radius: implicitWidth / 2
|
||||
|
||||
color: styleData.pressed ? UM.Theme.colors.scrollbar_handle_down : styleData.hovered ? UM.Theme.colors.scrollbar_handle_hover : UM.Theme.colors.scrollbar_handle;
|
||||
Behavior on color { ColorAnimation { duration: 50; } }
|
||||
|
@ -463,9 +469,10 @@ QtObject {
|
|||
id: layerSliderGroove
|
||||
implicitWidth: control.width;
|
||||
implicitHeight: UM.Theme.sizes.slider_groove.height;
|
||||
radius: width/2;
|
||||
|
||||
color: UM.Theme.colors.slider_groove;
|
||||
border.width: 1;
|
||||
border.width: UM.Theme.sizes.default_lining;
|
||||
border.color: UM.Theme.colors.slider_groove_border;
|
||||
Rectangle {
|
||||
anchors {
|
||||
|
@ -475,6 +482,7 @@ QtObject {
|
|||
}
|
||||
color: UM.Theme.colors.slider_groove_fill;
|
||||
width: (control.value / (control.maximumValue - control.minimumValue)) * parent.width;
|
||||
radius: width/2
|
||||
}
|
||||
}
|
||||
handle: Rectangle {
|
||||
|
@ -485,7 +493,6 @@ QtObject {
|
|||
Behavior on color { ColorAnimation { duration: 50; } }
|
||||
TextField {
|
||||
id: valueLabel
|
||||
property int unremovableSpacing: 5
|
||||
property string maxValue: control.maximumValue + 1
|
||||
placeholderText: control.value + 1
|
||||
onEditingFinished: {
|
||||
|
@ -498,19 +505,16 @@ QtObject {
|
|||
}
|
||||
validator: IntValidator {bottom: 1; top: control.maximumValue + 1;}
|
||||
visible: UM.LayerView.getLayerActivity && Printer.getPlatformActivity ? true : false
|
||||
anchors.bottom: layerSliderControl.bottom
|
||||
anchors.right: layerSliderControl.left
|
||||
anchors.rightMargin: valueLabel.unremovableSpacing / 2
|
||||
anchors.bottomMargin: parent.width + (UM.Theme.sizes.default_margin.width / 2)
|
||||
transformOrigin: Item.BottomRight
|
||||
anchors.top: layerSliderControl.bottom
|
||||
anchors.topMargin: UM.Theme.sizes.default_margin.width
|
||||
anchors.horizontalCenter: layerSliderControl.horizontalCenter
|
||||
rotation: 90
|
||||
style: TextFieldStyle{
|
||||
textColor: UM.Theme.colors.setting_control_text;
|
||||
font: UM.Theme.fonts.default;
|
||||
background: Rectangle {
|
||||
radius: 0
|
||||
implicitWidth: control.maxValue.length * valueLabel.font.pixelSize
|
||||
implicitHeight: UM.Theme.sizes.slider_handle.height + valueLabel.unremovableSpacing
|
||||
implicitHeight: UM.Theme.sizes.slider_handle.height + UM.Theme.sizes.default_margin.width
|
||||
border.width: 1;
|
||||
border.color: UM.Theme.colors.slider_groove_border;
|
||||
}
|
||||
|
|
|
@ -45,21 +45,20 @@
|
|||
},
|
||||
|
||||
"colors": {
|
||||
"text_default": [0, 0, 0, 255],
|
||||
"sidebar": [255, 255, 255, 255],
|
||||
"lining": [208, 210, 211, 255],
|
||||
"lining": [127, 127, 127, 255],
|
||||
|
||||
"primary": [12, 169, 227, 255],
|
||||
"primary_hover": [34, 150, 190, 255],
|
||||
"primary_hover": [48, 182, 231, 255],
|
||||
"primary_text": [255, 255, 255, 255],
|
||||
"border": [127, 127, 127, 255],
|
||||
"secondary": [205, 202, 201, 255],
|
||||
"secondary": [245, 245, 245, 255],
|
||||
|
||||
"text": [24, 41, 77, 255],
|
||||
"text_inactive": [174, 174, 174, 255],
|
||||
"text_white": [255, 255, 255, 255],
|
||||
"text_hover": [35, 35, 35, 255],
|
||||
"text_pressed": [12, 169, 227, 255],
|
||||
"text_white": [255, 255, 255, 255],
|
||||
"text_subtext": [127, 127, 127, 255],
|
||||
|
||||
"error": [255, 140, 0, 255],
|
||||
|
@ -118,10 +117,10 @@
|
|||
"setting_control_border": [127, 127, 127, 255],
|
||||
"setting_control_text": [24,41,77, 255],
|
||||
"setting_control_depth_line": [162, 192, 227, 255],
|
||||
"setting_control_hover": [139, 143, 153, 255],
|
||||
"setting_control_hover": [127, 127, 127, 255],
|
||||
"setting_control_selected": [35, 35, 35, 255],
|
||||
"setting_control_revert": [127, 127, 127, 255],
|
||||
"setting_unit": [174, 174, 174, 255],
|
||||
"setting_unit": [127, 127, 127, 255],
|
||||
"setting_validation_error": [255, 57, 14, 255],
|
||||
"setting_validation_warning": [255, 186, 15, 255],
|
||||
"setting_validation_ok": [255, 255, 255, 255],
|
||||
|
@ -130,8 +129,8 @@
|
|||
"progressbar_control": [24, 41, 77, 255],
|
||||
|
||||
"slider_groove": [245, 245, 245, 255],
|
||||
"slider_groove_border": [139, 143, 153, 255],
|
||||
"slider_groove_fill": [139, 143, 153, 255],
|
||||
"slider_groove_border": [127, 127, 127, 255],
|
||||
"slider_groove_fill": [127, 127, 127, 255],
|
||||
"slider_handle": [32, 166, 219, 255],
|
||||
"slider_handle_hover": [77, 182, 226, 255],
|
||||
"slider_text_background": [255, 255, 255, 255],
|
||||
|
@ -146,12 +145,12 @@
|
|||
|
||||
"message_background": [255, 255, 255, 255],
|
||||
"message_text": [32, 166, 219, 255],
|
||||
"message_dismiss": [139, 143, 153, 255],
|
||||
"message_dismiss": [127, 127, 127, 255],
|
||||
|
||||
"tool_panel_background": [255, 255, 255, 255],
|
||||
|
||||
"per_object_settings_panel_background": [255, 255, 255, 255],
|
||||
"per_object_settings_panel_border": [208, 210, 211, 255]
|
||||
"per_object_settings_panel_border": [127, 127, 127, 255]
|
||||
},
|
||||
|
||||
"sizes": {
|
||||
|
@ -198,9 +197,9 @@
|
|||
|
||||
"slider_groove": [0.5, 0.5],
|
||||
"slider_handle": [1.5, 1.5],
|
||||
"slider_layerview_size": [1.0, 20.0],
|
||||
"slider_layerview_background": [4.0, 0.0],
|
||||
"slider_layerview_smalltext_margin": [0.3, 0.00],
|
||||
"slider_layerview_background_extension": [0.0, 2.2],
|
||||
"slider_layerview_margin": [3.0, 3.0],
|
||||
|
||||
"checkbox": [2.0, 2.0],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue