mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-14 15:53:12 +08:00
Tweak layer slider appearance
This commit is contained in:
parent
bc24a3c95b
commit
5cb1e9e2a6
@ -8,12 +8,12 @@ import QtQuick.Controls.Styles 1.1
|
|||||||
|
|
||||||
import UM 1.0 as UM
|
import UM 1.0 as UM
|
||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
width: UM.Theme.getSize("button").width
|
width: UM.Theme.getSize("button").width
|
||||||
height: UM.Theme.getSize("slider_layerview_size").height
|
height: UM.Theme.getSize("slider_layerview_size").height
|
||||||
|
|
||||||
Slider
|
Slider
|
||||||
{
|
{
|
||||||
id: slider
|
id: slider
|
||||||
width: UM.Theme.getSize("slider_layerview_size").width
|
width: UM.Theme.getSize("slider_layerview_size").width
|
||||||
@ -34,11 +34,11 @@ Item
|
|||||||
|
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
x: parent.width + UM.Theme.getSize("default_margin").width;
|
x: parent.width + UM.Theme.getSize("slider_layerview_background").width / 2;
|
||||||
y: parent.height - (parent.value * parent.pixelsPerStep) - UM.Theme.getSize("slider_handle").height * 1.25;
|
y: parent.height - (parent.value * parent.pixelsPerStep) - UM.Theme.getSize("slider_handle").height * 1.25;
|
||||||
|
|
||||||
height: UM.Theme.getSize("slider_handle").height + UM.Theme.getSize("default_margin").height
|
height: UM.Theme.getSize("slider_handle").height + UM.Theme.getSize("default_margin").height
|
||||||
width: valueLabel.width + (busyIndicator.visible ? busyIndicator.width : 0) + UM.Theme.getSize("default_margin").width
|
width: valueLabel.width + UM.Theme.getSize("default_margin").width
|
||||||
Behavior on height { NumberAnimation { duration: 50; } }
|
Behavior on height { NumberAnimation { duration: 50; } }
|
||||||
|
|
||||||
border.width: UM.Theme.getSize("default_lining").width;
|
border.width: UM.Theme.getSize("default_lining").width;
|
||||||
@ -78,8 +78,8 @@ Item
|
|||||||
BusyIndicator
|
BusyIndicator
|
||||||
{
|
{
|
||||||
id: busyIndicator;
|
id: busyIndicator;
|
||||||
anchors.right: parent.right;
|
anchors.left: parent.right;
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width / 2;
|
anchors.leftMargin: UM.Theme.getSize("default_margin").width / 2;
|
||||||
anchors.verticalCenter: parent.verticalCenter;
|
anchors.verticalCenter: parent.verticalCenter;
|
||||||
|
|
||||||
width: UM.Theme.getSize("slider_handle").height;
|
width: UM.Theme.getSize("slider_handle").height;
|
||||||
|
@ -368,6 +368,7 @@ QtObject {
|
|||||||
width: Theme.getSize("slider_handle").width;
|
width: Theme.getSize("slider_handle").width;
|
||||||
height: Theme.getSize("slider_handle").height;
|
height: Theme.getSize("slider_handle").height;
|
||||||
color: control.hovered ? Theme.getColor("slider_handle_hover") : Theme.getColor("slider_handle");
|
color: control.hovered ? Theme.getColor("slider_handle_hover") : Theme.getColor("slider_handle");
|
||||||
|
radius: Theme.getSize("slider_handle").width/2;
|
||||||
Behavior on color { ColorAnimation { duration: 50; } }
|
Behavior on color { ColorAnimation { duration: 50; } }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user