mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 17:48:59 +08:00
Use the checkbox/slider styles from the theme and add some other missing styling
This commit is contained in:
parent
224387aefc
commit
4f9258e951
@ -10,6 +10,8 @@ Item {
|
|||||||
anchors.leftMargin: UM.Theme.sizes.default_margin.width;
|
anchors.leftMargin: UM.Theme.sizes.default_margin.width;
|
||||||
anchors.rightMargin: UM.Theme.sizes.default_margin.width;
|
anchors.rightMargin: UM.Theme.sizes.default_margin.width;
|
||||||
|
|
||||||
|
property Action configureSettings;
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
|
|
||||||
@ -24,7 +26,7 @@ Item {
|
|||||||
font: UM.Theme.fonts.timeslider_time;
|
font: UM.Theme.fonts.timeslider_time;
|
||||||
color: UM.Theme.colors.primary;
|
color: UM.Theme.colors.primary;
|
||||||
}
|
}
|
||||||
Label { anchors.centerIn: parent; text: "Estimated Print Time"; color: UM.Theme.colors.text; }
|
Label { anchors.centerIn: parent; text: "Estimated Print Time"; color: UM.Theme.colors.text; font: UM.Theme.fonts.default; }
|
||||||
Label {
|
Label {
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
anchors.verticalCenter: parent.verticalCenter;
|
anchors.verticalCenter: parent.verticalCenter;
|
||||||
@ -41,31 +43,7 @@ Item {
|
|||||||
minimumValue: 0;
|
minimumValue: 0;
|
||||||
maximumValue: 100;
|
maximumValue: 100;
|
||||||
|
|
||||||
style: SliderStyle {
|
style: UM.Theme.styles.slider;
|
||||||
groove: Rectangle {
|
|
||||||
implicitWidth: control.width;
|
|
||||||
implicitHeight: UM.Theme.sizes.slider_groove.height;
|
|
||||||
|
|
||||||
color: UM.Theme.colors.slider_groove;
|
|
||||||
border.width: 1;
|
|
||||||
border.color: UM.Theme.colors.slider_groove_border;
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
anchors {
|
|
||||||
left: parent.left;
|
|
||||||
top: parent.top;
|
|
||||||
bottom: parent.bottom;
|
|
||||||
}
|
|
||||||
color: UM.Theme.colors.slider_groove_fill;
|
|
||||||
width: (control.value / (control.maximumValue - control.minimumValue)) * parent.width;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
handle: Rectangle {
|
|
||||||
width: UM.Theme.sizes.slider_handle.width;
|
|
||||||
height: UM.Theme.sizes.slider_handle.height;
|
|
||||||
color: UM.Theme.colors.slider_handle;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
@ -77,6 +55,7 @@ Item {
|
|||||||
anchors.verticalCenter: parent.verticalCenter;
|
anchors.verticalCenter: parent.verticalCenter;
|
||||||
text: "Minimum\nDraft";
|
text: "Minimum\nDraft";
|
||||||
color: UM.Theme.colors.text;
|
color: UM.Theme.colors.text;
|
||||||
|
font: UM.Theme.fonts.default;
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
@ -85,6 +64,7 @@ Item {
|
|||||||
text: "Maximum\nQuality";
|
text: "Maximum\nQuality";
|
||||||
horizontalAlignment: Text.AlignRight;
|
horizontalAlignment: Text.AlignRight;
|
||||||
color: UM.Theme.colors.text;
|
color: UM.Theme.colors.text;
|
||||||
|
font: UM.Theme.fonts.default;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,32 +74,7 @@ Item {
|
|||||||
|
|
||||||
text: "Enable Support";
|
text: "Enable Support";
|
||||||
|
|
||||||
style: CheckBoxStyle {
|
style: UM.Theme.styles.checkbox;
|
||||||
background: Item { }
|
|
||||||
indicator: Rectangle {
|
|
||||||
implicitWidth: UM.Theme.sizes.checkbox.width;
|
|
||||||
implicitHeight: UM.Theme.sizes.checkbox.height;
|
|
||||||
|
|
||||||
color: control.hovered ? UM.Theme.colors.checkbox_hover : UM.Theme.colors.checkbox;
|
|
||||||
border.width: 1
|
|
||||||
border.color: UM.Theme.colors.checkbox_border;
|
|
||||||
|
|
||||||
Label {
|
|
||||||
anchors.centerIn: parent;
|
|
||||||
color: UM.Theme.colors.checkbox_mark;
|
|
||||||
// font: itemStyle.controlFont;
|
|
||||||
|
|
||||||
text: "✓";
|
|
||||||
|
|
||||||
opacity: control.checked ? 1 : 0;
|
|
||||||
Behavior on opacity { NumberAnimation { duration: 100; } }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
label: Label {
|
|
||||||
text: control.text;
|
|
||||||
color: UM.Theme.colors.checkbox_text;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Item { Layout.fillWidth: true; Layout.fillHeight: true; }
|
Item { Layout.fillWidth: true; Layout.fillHeight: true; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user