improve Latte indicator options accessibility

pull/5/head
Michail Vourlakos 6 years ago
parent 423f4b8bc9
commit 4f9d41cec8

@ -144,7 +144,6 @@
</entry>
<entry name="showGlow" type="Bool">
<default>false</default>
<label>deprecated, glowOption:None is used from v0.9 </label>
</entry>
<entry name="glowOption" type="Enum">
<label>Glow for active indicators</label>
@ -163,10 +162,10 @@
</entry>
<entry name="indicatorsEnabled" type="Bool">
<default>true</default>
</entry>
</entry>
<entry name="indicatorsForApplets" type="Bool">
<default>false</default>
</entry>
</entry>
<entry name="indicatorStyle" type="Enum">
<label>Indicator style</label>
<choices>

@ -377,7 +377,7 @@ DragDrop.DropArea {
property bool groupTasksByDefault: plasmoid.configuration.groupTasksByDefault
property bool dotsOnActive: plasmoid.configuration.dotsOnActive
property bool reverseLinesPosition: plasmoid.configuration.reverseLinesPosition
property bool showGlow: plasmoid.configuration.showGlow || plasmoid.configuration.glowOption!==Latte.Types.GlowNone
property bool showGlow: plasmoid.configuration.showGlow
property bool glow3D: plasmoid.configuration.glow3D
property bool showInfoBadge: plasmoid.configuration.showInfoBadge

@ -454,94 +454,78 @@ PlasmaComponents.Page {
}
LatteExtraControls.SubHeader {
Layout.topMargin: units.smallSpacing * 4
Layout.topMargin: units.smallSpacing * 3
isFirstSubCategory: true
text: i18n("Placement")
}
LatteExtraControls.HeaderSwitch {
Layout.fillWidth: true
Layout.minimumHeight: implicitHeight
text: i18n("Reverse position")
tooltip: i18n("Reverse indicators position e.g. from bottom to top")
checked: plasmoid.configuration.reverseLinesPosition
level: 3
onPressed: {
plasmoid.configuration.reverseLinesPosition = !plasmoid.configuration.reverseLinesPosition;
}
}
LatteExtraControls.HeaderSwitch {
Layout.fillWidth: true
Layout.minimumHeight: implicitHeight
text: i18n("Show indicators for applets")
tooltip: i18n("Show or hide indicators for applets")
checked: plasmoid.configuration.indicatorsForApplets
level: 3
onPressed: {
plasmoid.configuration.indicatorsForApplets = !plasmoid.configuration.indicatorsForApplets;
}
}
LatteExtraControls.SubHeader {
text: i18nc("active indicator style","Style For Active")
visible: plasmoid.configuration.indicatorStyle === Latte.Types.LatteIndicator
}
RowLayout {
Layout.fillWidth: true
spacing: 2
visible: plasmoid.configuration.indicatorStyle === Latte.Types.LatteIndicator
visible: dialog.expertLevel
property int indicatorType: plasmoid.configuration.activeIndicatorType
PlasmaComponents.Button {
Layout.fillWidth: true
text: i18nc("reversed indicators", "Reverse")
checked: plasmoid.configuration.reverseLinesPosition
checkable: true
tooltip: i18n("Reverse indicators position e.g. from bottom to top")
ExclusiveGroup {
id: activeIndicatorTypeGroup
onCurrentChanged: {
if (current.checked) {
plasmoid.configuration.activeIndicatorType = current.indicatorType;
}
onClicked: {
plasmoid.configuration.reverseLinesPosition = !plasmoid.configuration.reverseLinesPosition;
}
}
PlasmaComponents.Button {
Layout.fillWidth: true
text: i18nc("line indicator","Line")
checked: parent.indicatorType === indicatorType
text: i18n("Applets")
checked: plasmoid.configuration.indicatorsForApplets
checkable: true
exclusiveGroup: activeIndicatorTypeGroup
tooltip: i18n("Show a line indicator for active items")
tooltip: i18n("Show or hide indicators for applets")
readonly property int indicatorType: Latte.Types.LineIndicator
onClicked: {
plasmoid.configuration.indicatorsForApplets = !plasmoid.configuration.indicatorsForApplets;
}
}
}
PlasmaComponents.Button {
Layout.fillWidth: true
text: i18nc("dot indicator", "Dot")
checked: parent.indicatorType === indicatorType
checkable: true
exclusiveGroup: activeIndicatorTypeGroup
tooltip: i18n("Show a dot indicator for active items")
Item {
Layout.fillWidth: true
Layout.topMargin: units.smallSpacing * 4
visible: plasmoid.configuration.indicatorStyle === Latte.Types.LatteIndicator
readonly property int indicatorType: Latte.Types.DotIndicator
Rectangle{
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width * 0.35
height: 1
color: theme.textColor
opacity: 0.3
}
}
LatteExtraControls.SubHeader {
enabled: plasmoid.configuration.glowOption!==Latte.Types.GlowNone
text: i18n("Glow")
LatteExtraControls.HeaderSwitch {
id: showGlow
Layout.fillWidth: true
Layout.minimumHeight: implicitHeight
Layout.topMargin: units.smallSpacing * 3
Layout.bottomMargin: units.smallSpacing
visible: plasmoid.configuration.indicatorStyle === Latte.Types.LatteIndicator
checked: plasmoid.configuration.showGlow
level: 2
text: i18n("Glow")
tooltip: i18n("Enable/disable thickness margins")
onPressed: {
plasmoid.configuration.showGlow = !plasmoid.configuration.showGlow;
}
}
RowLayout {
Layout.fillWidth: true
spacing: 2
visible: plasmoid.configuration.indicatorStyle === Latte.Types.LatteIndicator
enabled: plasmoid.configuration.showGlow
property int option: plasmoid.configuration.glowOption
@ -553,17 +537,6 @@ PlasmaComponents.Page {
}
}
PlasmaComponents.Button {
Layout.fillWidth: true
text: i18nc("none glow", "None")
checked: parent.option === option
checkable: true
exclusiveGroup: glowGroup
tooltip: i18n("Do not show any glow for task/applet indicators")
readonly property int option: Latte.Types.GlowNone
}
PlasmaComponents.Button {
Layout.fillWidth: true
text: i18nc("glow only to active task/applet indicators","On Active")
@ -592,7 +565,7 @@ PlasmaComponents.Page {
Layout.topMargin: units.smallSpacing
spacing: 2
visible: plasmoid.configuration.indicatorStyle === Latte.Types.LatteIndicator
enabled: plasmoid.configuration.glowOption !== Latte.Types.GlowNone
enabled: plasmoid.configuration.showGlow
PlasmaComponents.Label {
Layout.minimumWidth: implicitWidth
@ -638,6 +611,52 @@ PlasmaComponents.Page {
}
}
LatteExtraControls.SubHeader {
text: i18nc("active indicator style","Style For Active")
visible: plasmoid.configuration.indicatorStyle === Latte.Types.LatteIndicator
}
RowLayout {
Layout.fillWidth: true
spacing: 2
visible: plasmoid.configuration.indicatorStyle === Latte.Types.LatteIndicator
property int indicatorType: plasmoid.configuration.activeIndicatorType
ExclusiveGroup {
id: activeIndicatorTypeGroup
onCurrentChanged: {
if (current.checked) {
plasmoid.configuration.activeIndicatorType = current.indicatorType;
}
}
}
PlasmaComponents.Button {
Layout.fillWidth: true
text: i18nc("line indicator","Line")
checked: parent.indicatorType === indicatorType
checkable: true
exclusiveGroup: activeIndicatorTypeGroup
tooltip: i18n("Show a line indicator for active items")
readonly property int indicatorType: Latte.Types.LineIndicator
}
PlasmaComponents.Button {
Layout.fillWidth: true
text: i18nc("dot indicator", "Dot")
checked: parent.indicatorType === indicatorType
checkable: true
exclusiveGroup: activeIndicatorTypeGroup
tooltip: i18n("Show a dot indicator for active items")
readonly property int indicatorType: Latte.Types.DotIndicator
}
}
LatteExtraControls.SubHeader {
enabled: plasmoid.configuration.glowOption!==Latte.Types.GlowNone
text: i18n("Improvements")

Loading…
Cancel
Save