mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-21 10:50:30 +03:00
support configuration of audio indicator
This commit is contained in:
parent
4441a8471e
commit
fc6c4222e1
@ -175,5 +175,8 @@
|
||||
<entry name="hasInternalSeparator" type="Bool">
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="indicateAudioStreams" type="Bool">
|
||||
<default>true</default>
|
||||
</entry>
|
||||
</group>
|
||||
</kcfg>
|
||||
|
@ -61,6 +61,7 @@ DragDrop.DropArea {
|
||||
property bool exposeAltSession: globalSettings ? globalSettings.exposeAltSession : false
|
||||
|
||||
property bool immutable: plasmoid.immutable
|
||||
property bool indicateAudioStreams: plasmoid.configuration.indicateAudioStreams
|
||||
property bool inStartup: true
|
||||
property bool isHorizontal: plasmoid.formFactor === PlasmaCore.Types.Horizontal
|
||||
property bool isVertical: !isHorizontal
|
||||
|
@ -138,7 +138,7 @@ MouseArea{
|
||||
////// Audio streams //////
|
||||
property Item audioStreamOverlay
|
||||
property var audioStreams: []
|
||||
readonly property bool hasAudioStream: plasmoid.configuration.indicateAudioStreams && audioStreams.length > 0
|
||||
readonly property bool hasAudioStream: root.indicateAudioStreams && audioStreams.length > 0
|
||||
readonly property bool playingAudio: hasAudioStream && audioStreams.some(function (item) {
|
||||
return !item.corked
|
||||
})
|
||||
|
@ -131,6 +131,7 @@ Item {
|
||||
property bool dockIsHidden: latteDock ? latteDock.dockIsHidden : false
|
||||
property bool exposeAltSession: latteDock ? latteDock.exposeAltSession : false
|
||||
property bool highlightWindows: latteDock ? latteDock.highlightWindows: plasmoid.configuration.highlightWindows
|
||||
property bool indicateAudioStreams: latteDock ? latteDock.indicateAudioStreams : plasmoid.configuration.indicateAudioStreams
|
||||
property bool reverseLinesPosition: latteDock ? latteDock.reverseLinesPosition : plasmoid.configuration.reverseLinesPosition
|
||||
property bool dotsOnActive: latteDock ? latteDock.dotsOnActive : plasmoid.configuration.dotsOnActive
|
||||
property bool showGlow: latteDock ? latteDock.showGlow : plasmoid.configuration.showGlow
|
||||
@ -667,7 +668,7 @@ Item {
|
||||
Loader {
|
||||
id: pulseAudio
|
||||
source: "PulseAudio.qml"
|
||||
active: plasmoid.configuration.indicateAudioStreams
|
||||
active: root.indicateAudioStreams
|
||||
}
|
||||
|
||||
/* IconsModel{
|
||||
|
@ -149,6 +149,18 @@ PlasmaComponents.Page {
|
||||
}
|
||||
}
|
||||
|
||||
PlasmaComponents.CheckBox {
|
||||
id: audioIndicatorChk
|
||||
Layout.leftMargin: units.smallSpacing * 2
|
||||
text: i18n("Show indicator for audio streams")
|
||||
checked: plasmoid.configuration.indicateAudioStreams
|
||||
// tooltip: i18n("Show an audio indicator for the user to mute/unmute an app")
|
||||
|
||||
onClicked: {
|
||||
plasmoid.configuration.indicateAudioStreams = checked
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.leftMargin: units.smallSpacing * 2
|
||||
visible: plasmoid.configuration.advanced
|
||||
|
Loading…
x
Reference in New Issue
Block a user