Unity: support reversedEnabled

pull/5/head
Michail Vourlakos
parent e30ee3abba
commit 1c2df50380

@ -89,6 +89,27 @@ Item{
} }
GradientStop { position: 0.6; color: "transparent" } GradientStop { position: 0.6; color: "transparent" }
} }
//! States
states: [
State {
name: "top"
when: !parentItem.reversedEnabled
AnchorChanges {
target: glowGradient
anchors{horizontalCenter:parent.horizontalCenter; verticalCenter:parent.top}
}
},
State {
name: "bottom"
when: parentItem.reversedEnabled
AnchorChanges {
target: glowGradient
anchors{horizontalCenter:parent.horizontalCenter; verticalCenter:parent.bottom}
}
}
]
} }
Item { Item {
@ -96,11 +117,40 @@ Item{
anchors.fill: glowGradient anchors.fill: glowGradient
Rectangle { Rectangle {
anchors.top: gradientMask.verticalCenter id: glowMaskRect
anchors.topMargin: unityRect.anchors.margins
width: glowGradient.width width: glowGradient.width
height: glowGradient.height / 2 height: glowGradient.height / 2
radius: unityRect.radius radius: unityRect.radius
//! States
states: [
State {
name: "top"
when: !parentItem.reversedEnabled
AnchorChanges {
target: glowMaskRect
anchors{bottom: undefined; top: parent.verticalCenter;}
}
PropertyChanges{
target: gradientMask
anchors{bottomMargin: undefined; topMargin: unityRect.anchors.margins}
}
},
State {
name: "bottom"
when: parentItem.reversedEnabled
AnchorChanges {
target: glowMaskRect
anchors{bottom: parent.verticalCenter; top: undefined;}
}
PropertyChanges{
target: gradientMask
anchors{bottomMargin: unityRect.anchors.margins; topMargin: undefined}
}
}
]
} }
visible: false visible: false

@ -580,9 +580,9 @@ PlasmaComponents.Page {
} }
PlasmaComponents.CheckBox { PlasmaComponents.CheckBox {
text: i18n("Reverse indicators position") text: i18n("Reverse indicator style")
checked: plasmoid.configuration.reverseLinesPosition checked: plasmoid.configuration.reverseLinesPosition
tooltip: i18n("Reverse indicators position e.g. from bottom to top") tooltip: i18n("Reverse indicator style e.g. from bottom to top")
onClicked: { onClicked: {
plasmoid.configuration.reverseLinesPosition = !plasmoid.configuration.reverseLinesPosition; plasmoid.configuration.reverseLinesPosition = !plasmoid.configuration.reverseLinesPosition;

Loading…
Cancel
Save