Changeset View
Changeset View
Standalone View
Standalone View
src/kcm/package/contents/ui/MuteButton.qml
Show All 19 Lines | |||||
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | import QtQuick 2.0 | 22 | import QtQuick 2.0 | ||
23 | import QtQuick.Controls 2.5 as QQC2 | 23 | import QtQuick.Controls 2.5 as QQC2 | ||
24 | import "../code/icon.js" as Icon | 24 | import "../code/icon.js" as Icon | ||
25 | 25 | | |||
26 | QQC2.ToolButton { | 26 | QQC2.ToolButton { | ||
27 | property bool muted: true | 27 | property bool muted: true | ||
28 | property var toolTipText | ||||
28 | 29 | | |||
29 | icon.name: Icon.name(Volume, Muted, isPlayback ? "audio-volume" : "microphone-sensitivity") | 30 | icon.name: Icon.name(Volume, Muted, isPlayback ? "audio-volume" : "microphone-sensitivity") | ||
30 | checkable: true | 31 | checkable: true | ||
31 | checked: muted | 32 | checked: muted | ||
32 | onMutedChanged: checked = muted | 33 | onMutedChanged: checked = muted | ||
33 | 34 | | |||
34 | QQC2.ToolTip { | 35 | QQC2.ToolTip { | ||
35 | text: i18ndc("kcm_pulseaudio", "Mute audio stream", "Mute %1", inputText.text) // a little hacky | 36 | text: i18ndc("kcm_pulseaudio", "Mute audio stream", "Mute %1", toolTipText) | ||
36 | } | 37 | } | ||
37 | } | 38 | } |