improve Latte indicator options accessibility

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

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

@ -377,7 +377,7 @@ DragDrop.DropArea {
property bool groupTasksByDefault: plasmoid.configuration.groupTasksByDefault property bool groupTasksByDefault: plasmoid.configuration.groupTasksByDefault
property bool dotsOnActive: plasmoid.configuration.dotsOnActive property bool dotsOnActive: plasmoid.configuration.dotsOnActive
property bool reverseLinesPosition: plasmoid.configuration.reverseLinesPosition 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 glow3D: plasmoid.configuration.glow3D
property bool showInfoBadge: plasmoid.configuration.showInfoBadge property bool showInfoBadge: plasmoid.configuration.showInfoBadge

@ -454,94 +454,78 @@ PlasmaComponents.Page {
} }
LatteExtraControls.SubHeader { LatteExtraControls.SubHeader {
Layout.topMargin: units.smallSpacing * 4 Layout.topMargin: units.smallSpacing * 3
isFirstSubCategory: true isFirstSubCategory: true
text: i18n("Placement") 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 { RowLayout {
Layout.fillWidth: true Layout.fillWidth: true
spacing: 2 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 { onClicked: {
id: activeIndicatorTypeGroup plasmoid.configuration.reverseLinesPosition = !plasmoid.configuration.reverseLinesPosition;
onCurrentChanged: {
if (current.checked) {
plasmoid.configuration.activeIndicatorType = current.indicatorType;
}
} }
} }
PlasmaComponents.Button { PlasmaComponents.Button {
Layout.fillWidth: true Layout.fillWidth: true
text: i18n("Applets")
text: i18nc("line indicator","Line") checked: plasmoid.configuration.indicatorsForApplets
checked: parent.indicatorType === indicatorType
checkable: true checkable: true
exclusiveGroup: activeIndicatorTypeGroup tooltip: i18n("Show or hide indicators for applets")
tooltip: i18n("Show a line indicator for active items")
readonly property int indicatorType: Latte.Types.LineIndicator onClicked: {
plasmoid.configuration.indicatorsForApplets = !plasmoid.configuration.indicatorsForApplets;
}
} }
}
PlasmaComponents.Button { Item {
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: units.smallSpacing * 4
text: i18nc("dot indicator", "Dot") visible: plasmoid.configuration.indicatorStyle === Latte.Types.LatteIndicator
checked: parent.indicatorType === indicatorType
checkable: true
exclusiveGroup: activeIndicatorTypeGroup
tooltip: i18n("Show a dot indicator for active items")
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 { LatteExtraControls.HeaderSwitch {
enabled: plasmoid.configuration.glowOption!==Latte.Types.GlowNone id: showGlow
text: i18n("Glow") Layout.fillWidth: true
Layout.minimumHeight: implicitHeight
Layout.topMargin: units.smallSpacing * 3
Layout.bottomMargin: units.smallSpacing
visible: plasmoid.configuration.indicatorStyle === Latte.Types.LatteIndicator 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 { RowLayout {
Layout.fillWidth: true Layout.fillWidth: true
spacing: 2 spacing: 2
visible: plasmoid.configuration.indicatorStyle === Latte.Types.LatteIndicator visible: plasmoid.configuration.indicatorStyle === Latte.Types.LatteIndicator
enabled: plasmoid.configuration.showGlow
property int option: plasmoid.configuration.glowOption 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 { PlasmaComponents.Button {
Layout.fillWidth: true Layout.fillWidth: true
text: i18nc("glow only to active task/applet indicators","On Active") text: i18nc("glow only to active task/applet indicators","On Active")
@ -592,7 +565,7 @@ PlasmaComponents.Page {
Layout.topMargin: units.smallSpacing Layout.topMargin: units.smallSpacing
spacing: 2 spacing: 2
visible: plasmoid.configuration.indicatorStyle === Latte.Types.LatteIndicator visible: plasmoid.configuration.indicatorStyle === Latte.Types.LatteIndicator
enabled: plasmoid.configuration.glowOption !== Latte.Types.GlowNone enabled: plasmoid.configuration.showGlow
PlasmaComponents.Label { PlasmaComponents.Label {
Layout.minimumWidth: implicitWidth 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 { LatteExtraControls.SubHeader {
enabled: plasmoid.configuration.glowOption!==Latte.Types.GlowNone enabled: plasmoid.configuration.glowOption!==Latte.Types.GlowNone
text: i18n("Improvements") text: i18n("Improvements")

Loading…
Cancel
Save