Remove layer view slider style from Cura theme's style file

Since it is a plugin, it should not be in the main theme.

Contributes to CURA-957
This commit is contained in:
Arjen Hiemstra 2016-03-01 02:10:21 +01:00
parent 110c3fa754
commit 363fb0c4dd

View File

@ -351,6 +351,8 @@ QtObject {
border.width: Theme.getSize("default_lining").width;
border.color: Theme.getColor("slider_groove_border");
radius: width / 2;
Rectangle {
anchors {
left: parent.left;
@ -359,6 +361,7 @@ QtObject {
}
color: Theme.getColor("slider_groove_fill");
width: (control.value / (control.maximumValue - control.minimumValue)) * parent.width;
radius: width / 2;
}
}
handle: Rectangle {
@ -370,65 +373,6 @@ QtObject {
}
}
property Component layerViewSlider: Component {
SliderStyle {
groove: Rectangle {
id: layerSliderGroove
implicitWidth: control.width;
implicitHeight: Theme.getSize("slider_groove").height;
radius: width/2;
color: Theme.getColor("slider_groove");
border.width: Theme.getSize("default_lining").width;
border.color: Theme.getColor("slider_groove_border");
Rectangle {
anchors {
left: parent.left;
top: parent.top;
bottom: parent.bottom;
}
color: Theme.getColor("slider_groove_fill");
width: (control.value / (control.maximumValue - control.minimumValue)) * parent.width;
radius: width/2
}
}
handle: Rectangle {
id: layerSliderControl
width: Theme.getSize("slider_handle").width;
height: Theme.getSize("slider_handle").height;
color: control.hovered ? Theme.getColor("slider_handle_hover") : Theme.getColor("slider_handle");
Behavior on color { ColorAnimation { duration: 50; } }
TextField {
id: valueLabel
property string maxValue: control.maximumValue + 1
text: control.value + 1
horizontalAlignment: TextInput.AlignHCenter
onEditingFinished: {
if (valueLabel.text != ''){
control.value = valueLabel.text - 1
}
}
validator: IntValidator {bottom: 1; top: control.maximumValue + 1;}
visible: UM.LayerView.getLayerActivity && Printer.getPlatformActivity ? true : false
anchors.top: layerSliderControl.bottom
anchors.topMargin: width/2 - Theme.getSize("default_margin").width/2
anchors.horizontalCenter: layerSliderControl.horizontalCenter
rotation: 90
style: TextFieldStyle{
textColor: Theme.getColor("setting_control_text");
font: Theme.getFont("default");
background: Rectangle {
implicitWidth: control.maxValue.length * valueLabel.font.pixelSize + Theme.getSize("default_margin").width
implicitHeight: Theme.getSize("slider_handle").height + Theme.getSize("default_margin").width
border.width: Theme.getSize("default_lining").width;
border.color: Theme.getColor("slider_groove_border");
}
}
}
}
}
}
property Component text_field: Component {
TextFieldStyle {
textColor: Theme.getColor("setting_control_text");