mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-06 05:25:41 -05:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e39465aece | ||
|
|
8fd616b680 | ||
|
|
cc054b27de |
@@ -13,6 +13,8 @@ DankModal {
|
||||
|
||||
layerNamespace: "dms:file-browser"
|
||||
|
||||
keepPopoutsOpen: true
|
||||
|
||||
property string homeDir: StandardPaths.writableLocation(StandardPaths.HomeLocation)
|
||||
property string docsDir: StandardPaths.writableLocation(StandardPaths.DocumentsLocation)
|
||||
property string musicDir: StandardPaths.writableLocation(StandardPaths.MusicLocation)
|
||||
|
||||
@@ -593,13 +593,13 @@ Column {
|
||||
text: {
|
||||
switch (widgetData.id || "") {
|
||||
case "nightMode":
|
||||
return "Night Mode"
|
||||
return I18n.tr("Night Mode")
|
||||
case "darkMode":
|
||||
return SessionData.isLightMode ? "Light Mode" : "Dark Mode"
|
||||
return I18n.tr("Dark Mode")
|
||||
case "doNotDisturb":
|
||||
return "Do Not Disturb"
|
||||
return I18n.tr("Do Not Disturb")
|
||||
case "idleInhibitor":
|
||||
return SessionService.idleInhibited ? "Keeping Awake" : "Keep Awake"
|
||||
return SessionService.idleInhibited ? I18n.tr("Keeping Awake") : I18n.tr("Keep Awake")
|
||||
default:
|
||||
return "Unknown"
|
||||
}
|
||||
@@ -619,7 +619,7 @@ Column {
|
||||
case "nightMode":
|
||||
return DisplayService.nightModeEnabled || false
|
||||
case "darkMode":
|
||||
return SessionData.isLightMode
|
||||
return !SessionData.isLightMode
|
||||
case "doNotDisturb":
|
||||
return SessionData.doNotDisturb || false
|
||||
case "idleInhibitor":
|
||||
@@ -700,7 +700,7 @@ Column {
|
||||
case "nightMode":
|
||||
return DisplayService.nightModeEnabled || false
|
||||
case "darkMode":
|
||||
return SessionData.isLightMode
|
||||
return !SessionData.isLightMode
|
||||
case "doNotDisturb":
|
||||
return SessionData.doNotDisturb || false
|
||||
case "idleInhibitor":
|
||||
|
||||
@@ -69,6 +69,15 @@ Row {
|
||||
valueOverride: actualVolumePercent
|
||||
thumbOutlineColor: Theme.surfaceContainer
|
||||
trackColor: root.sliderTrackColor.a > 0 ? root.sliderTrackColor : Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency)
|
||||
|
||||
onIsDraggingChanged: {
|
||||
if (isDragging) {
|
||||
AudioService.suppressOSD = true
|
||||
} else {
|
||||
Qt.callLater(() => { AudioService.suppressOSD = false })
|
||||
}
|
||||
}
|
||||
|
||||
onSliderValueChanged: function(newValue) {
|
||||
if (defaultSink) {
|
||||
defaultSink.audio.volume = newValue / 100.0
|
||||
|
||||
@@ -143,6 +143,8 @@ Row {
|
||||
}
|
||||
|
||||
DankSlider {
|
||||
id: brightnessSlider
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: parent.width - (Theme.iconSize + Theme.spacingS * 2)
|
||||
enabled: DisplayService.brightnessAvailable && targetDeviceName.length > 0
|
||||
@@ -162,7 +164,7 @@ Row {
|
||||
}
|
||||
return targetDevice.displayMax || 100
|
||||
}
|
||||
value: targetBrightness
|
||||
value: !isDragging ? targetBrightness : value
|
||||
showValue: true
|
||||
unit: {
|
||||
if (!targetDevice) return "%"
|
||||
|
||||
@@ -292,6 +292,7 @@ DankPopout {
|
||||
tabBarItem: tabBar
|
||||
keyForwardTarget: mainContainer
|
||||
targetScreen: root.triggerScreen
|
||||
parentPopout: root
|
||||
}
|
||||
|
||||
WeatherTab {
|
||||
|
||||
@@ -5,6 +5,7 @@ import QtQuick.Controls
|
||||
import QtQuick.Effects
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import qs.Common
|
||||
import qs.Modals.FileBrowser
|
||||
import qs.Services
|
||||
@@ -25,6 +26,7 @@ Item {
|
||||
property Item tabBarItem: null
|
||||
property int gridIndex: 0
|
||||
property Item keyForwardTarget: null
|
||||
property var parentPopout: null
|
||||
property int lastPage: 0
|
||||
property bool enableAnimation: false
|
||||
property string homeDir: StandardPaths.writableLocation(StandardPaths.HomeLocation)
|
||||
@@ -293,6 +295,12 @@ Item {
|
||||
active: false
|
||||
asynchronous: true
|
||||
|
||||
onActiveChanged: {
|
||||
if (active && parentPopout) {
|
||||
parentPopout.WlrLayershell.keyboardFocus = WlrKeyboardFocus.None
|
||||
}
|
||||
}
|
||||
|
||||
sourceComponent: FileBrowserModal {
|
||||
Component.onCompleted: {
|
||||
open()
|
||||
@@ -318,6 +326,13 @@ Item {
|
||||
}
|
||||
|
||||
onDialogClosed: {
|
||||
if (parentPopout) {
|
||||
if (CompositorService.isHyprland) {
|
||||
parentPopout.WlrLayershell.keyboardFocus = WlrKeyboardFocus.OnDemand
|
||||
} else {
|
||||
parentPopout.WlrLayershell.keyboardFocus = WlrKeyboardFocus.Exclusive
|
||||
}
|
||||
}
|
||||
Qt.callLater(() => wallpaperBrowserLoader.active = false)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -412,7 +412,7 @@ Singleton {
|
||||
interval: 50
|
||||
repeat: false
|
||||
onTriggered: {
|
||||
if (!root.suppressOSD && SettingsData.soundsEnabled && SettingsData.soundVolumeChanged) {
|
||||
if (SettingsData.soundsEnabled && SettingsData.soundVolumeChanged) {
|
||||
root.playVolumeChangeSound()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
v0.6.1
|
||||
v0.6.2
|
||||
|
||||
Reference in New Issue
Block a user