Skip to content

Commit 8fd616b

Browse files
committed
osd: suppression fix from cc
1 parent cc054b2 commit 8fd616b

File tree

6 files changed

+35
-8
lines changed

6 files changed

+35
-8
lines changed

quickshell/Modules/ControlCenter/Components/DragDropGrid.qml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -593,13 +593,13 @@ Column {
593593
text: {
594594
switch (widgetData.id || "") {
595595
case "nightMode":
596-
return "Night Mode"
596+
return I18n.tr("Night Mode")
597597
case "darkMode":
598-
return SessionData.isLightMode ? "Light Mode" : "Dark Mode"
598+
return I18n.tr("Dark Mode")
599599
case "doNotDisturb":
600-
return "Do Not Disturb"
600+
return I18n.tr("Do Not Disturb")
601601
case "idleInhibitor":
602-
return SessionService.idleInhibited ? "Keeping Awake" : "Keep Awake"
602+
return SessionService.idleInhibited ? I18n.tr("Keeping Awake") : I18n.tr("Keep Awake")
603603
default:
604604
return "Unknown"
605605
}
@@ -619,7 +619,7 @@ Column {
619619
case "nightMode":
620620
return DisplayService.nightModeEnabled || false
621621
case "darkMode":
622-
return SessionData.isLightMode
622+
return !SessionData.isLightMode
623623
case "doNotDisturb":
624624
return SessionData.doNotDisturb || false
625625
case "idleInhibitor":
@@ -700,7 +700,7 @@ Column {
700700
case "nightMode":
701701
return DisplayService.nightModeEnabled || false
702702
case "darkMode":
703-
return SessionData.isLightMode
703+
return !SessionData.isLightMode
704704
case "doNotDisturb":
705705
return SessionData.doNotDisturb || false
706706
case "idleInhibitor":

quickshell/Modules/ControlCenter/Widgets/AudioSliderRow.qml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,15 @@ Row {
6969
valueOverride: actualVolumePercent
7070
thumbOutlineColor: Theme.surfaceContainer
7171
trackColor: root.sliderTrackColor.a > 0 ? root.sliderTrackColor : Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency)
72+
73+
onIsDraggingChanged: {
74+
if (isDragging) {
75+
AudioService.suppressOSD = true
76+
} else {
77+
Qt.callLater(() => { AudioService.suppressOSD = false })
78+
}
79+
}
80+
7281
onSliderValueChanged: function(newValue) {
7382
if (defaultSink) {
7483
defaultSink.audio.volume = newValue / 100.0

quickshell/Modules/ControlCenter/Widgets/BrightnessSliderRow.qml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ Row {
143143
}
144144

145145
DankSlider {
146+
id: brightnessSlider
147+
146148
anchors.verticalCenter: parent.verticalCenter
147149
width: parent.width - (Theme.iconSize + Theme.spacingS * 2)
148150
enabled: DisplayService.brightnessAvailable && targetDeviceName.length > 0
@@ -162,7 +164,7 @@ Row {
162164
}
163165
return targetDevice.displayMax || 100
164166
}
165-
value: targetBrightness
167+
value: !isDragging ? targetBrightness : value
166168
showValue: true
167169
unit: {
168170
if (!targetDevice) return "%"

quickshell/Modules/DankDash/DankDashPopout.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ DankPopout {
292292
tabBarItem: tabBar
293293
keyForwardTarget: mainContainer
294294
targetScreen: root.triggerScreen
295+
parentPopout: root
295296
}
296297

297298
WeatherTab {

quickshell/Modules/DankDash/WallpaperTab.qml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import QtQuick.Controls
55
import QtQuick.Effects
66
import QtQuick.Layouts
77
import Quickshell
8+
import Quickshell.Wayland
89
import qs.Common
910
import qs.Modals.FileBrowser
1011
import qs.Services
@@ -25,6 +26,7 @@ Item {
2526
property Item tabBarItem: null
2627
property int gridIndex: 0
2728
property Item keyForwardTarget: null
29+
property var parentPopout: null
2830
property int lastPage: 0
2931
property bool enableAnimation: false
3032
property string homeDir: StandardPaths.writableLocation(StandardPaths.HomeLocation)
@@ -293,6 +295,12 @@ Item {
293295
active: false
294296
asynchronous: true
295297

298+
onActiveChanged: {
299+
if (active && parentPopout) {
300+
parentPopout.WlrLayershell.keyboardFocus = WlrKeyboardFocus.None
301+
}
302+
}
303+
296304
sourceComponent: FileBrowserModal {
297305
Component.onCompleted: {
298306
open()
@@ -318,6 +326,13 @@ Item {
318326
}
319327

320328
onDialogClosed: {
329+
if (parentPopout) {
330+
if (CompositorService.isHyprland) {
331+
parentPopout.WlrLayershell.keyboardFocus = WlrKeyboardFocus.OnDemand
332+
} else {
333+
parentPopout.WlrLayershell.keyboardFocus = WlrKeyboardFocus.Exclusive
334+
}
335+
}
321336
Qt.callLater(() => wallpaperBrowserLoader.active = false)
322337
}
323338
}

quickshell/Services/AudioService.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ Singleton {
412412
interval: 50
413413
repeat: false
414414
onTriggered: {
415-
if (!root.suppressOSD && SettingsData.soundsEnabled && SettingsData.soundVolumeChanged) {
415+
if (SettingsData.soundsEnabled && SettingsData.soundVolumeChanged) {
416416
root.playVolumeChangeSound()
417417
}
418418
}

0 commit comments

Comments
 (0)