fix #472,support latte applet active indicators

--expose the functionality through the configuration
window. The user can choose no latte type internal
active applets indicators, only show to latte internal
applets and show at all applets
pull/1/head
Michail Vourlakos
parent 8d0b64cd6d
commit 1c76e29b3f

@ -84,6 +84,15 @@
</choices>
<default>2</default>
</entry>
<entry name="activeIndicator" type="Enum">
<label>Show active indicator</label>
<choices>
<choice name="None"/>
<choice name="Internal"/>
<choice name="All"/>
</choices>
<default>1</default>
</entry>
<entry name="maxLength" type="Int">
<default>100</default>
</entry>

@ -320,7 +320,16 @@ Item{
}
}
ActiveIndicator{}
Loader{
anchors.fill: parent
active: root.activeIndicator === Latte.Dock.AllIndicator
|| (root.activeIndicator === Latte.Dock.InternalsIndicator && fakeIconItem)
sourceComponent: Item{
anchors.fill: parent
ActiveIndicator{}
}
}
Item{
id:_wrapperContainer

@ -93,6 +93,8 @@ DragDrop.DropArea {
property alias hoveredIndex: layoutsContainer.hoveredIndex
property int activeIndicator: plasmoid.configuration.activeIndicator
property int actionsBlockHiding: 0 //actions that block hiding
property int animationsNeedBothAxis:0 //animations need space in both axes, e.g zooming a task

@ -84,6 +84,13 @@ public:
CycleThroughTasks
};
Q_ENUM(TaskAction)
enum ActiveAppletIndicator {
NoneIndicator = 0,
InternalsIndicator = 1,
AllIndicator = 2
};
Q_ENUM(ActiveAppletIndicator)
};
}//end of namespace

@ -174,6 +174,73 @@ PlasmaComponents.Page {
}
//! END: Behavior
//! BEGIN: Active Indicator
ColumnLayout {
Layout.fillWidth: true
spacing: units.smallSpacing
visible: plasmoid.configuration.advanced
Header {
text: i18n("Active Applet Indicator")
}
RowLayout{
Layout.fillWidth: true
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
spacing: 2
RowLayout {
Layout.fillWidth: true
spacing: units.smallSpacing
property int activeIndicator: plasmoid.configuration.activeIndicator
ExclusiveGroup {
id: activeIndicatorGroup
onCurrentChanged: {
if (current.checked)
plasmoid.configuration.activeIndicator = current.activeIndicator
}
}
PlasmaComponents.Button {
Layout.fillWidth: true
text: i18nc("active indicator to no applets", "None")
checked: parent.activeIndicator === activeIndicator
checkable: true
exclusiveGroup: activeIndicatorGroup
readonly property int activeIndicator: Latte.Dock.NoneIndicator
}
PlasmaComponents.Button {
Layout.fillWidth: true
text: i18nc("active indicator only to in-house latte applets", "Internals")
checked: parent.activeIndicator === activeIndicator
checkable: true
exclusiveGroup: activeIndicatorGroup
readonly property int activeIndicator: Latte.Dock.InternalsIndicator
}
PlasmaComponents.Button {
Layout.fillWidth: true
text: i18nc("active indicator to all applets", "All")
checked: parent.activeIndicator === activeIndicator
checkable: true
exclusiveGroup: activeIndicatorGroup
readonly property int activeIndicator: Latte.Dock.AllIndicator
}
}
}
}
//! END: Active Indicator
//! BEGIN: Session
ColumnLayout {
spacing: units.smallSpacing

Loading…
Cancel
Save