mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-28 23:42:51 -05:00
Compare commits
11 Commits
v0.6.0
...
2ed6c33c83
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2ed6c33c83 | ||
|
|
7ad532ed17 | ||
|
|
92fe8c5b14 | ||
|
|
8e95572589 | ||
|
|
62da862a66 | ||
|
|
993e34f548 | ||
|
|
e39465aece | ||
|
|
8fd616b680 | ||
|
|
cc054b27de | ||
|
|
dfdaa82245 | ||
|
|
99a307e0ad |
@@ -19,10 +19,12 @@ func init() {
|
|||||||
Register("fedora-asahi-remix", "#0B57A4", FamilyFedora, func(config DistroConfig, logChan chan<- string) Distribution {
|
Register("fedora-asahi-remix", "#0B57A4", FamilyFedora, func(config DistroConfig, logChan chan<- string) Distribution {
|
||||||
return NewFedoraDistribution(config, logChan)
|
return NewFedoraDistribution(config, logChan)
|
||||||
})
|
})
|
||||||
|
|
||||||
Register("bluefin", "#0B57A4", FamilyFedora, func(config DistroConfig, logChan chan<- string) Distribution {
|
Register("bluefin", "#0B57A4", FamilyFedora, func(config DistroConfig, logChan chan<- string) Distribution {
|
||||||
return NewFedoraDistribution(config, logChan)
|
return NewFedoraDistribution(config, logChan)
|
||||||
})
|
})
|
||||||
|
Register("ultramarine", "#00078b", FamilyFedora, func(config DistroConfig, logChan chan<- string) Distribution {
|
||||||
|
return NewFedoraDistribution(config, logChan)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
type FedoraDistribution struct {
|
type FedoraDistribution struct {
|
||||||
@@ -506,6 +508,14 @@ func (f *FedoraDistribution) installDNFPackages(ctx context.Context, packages []
|
|||||||
f.log(fmt.Sprintf("Installing DNF packages: %s", strings.Join(packages, ", ")))
|
f.log(fmt.Sprintf("Installing DNF packages: %s", strings.Join(packages, ", ")))
|
||||||
|
|
||||||
args := []string{"dnf", "install", "-y"}
|
args := []string{"dnf", "install", "-y"}
|
||||||
|
|
||||||
|
for _, pkg := range packages {
|
||||||
|
if pkg == "niri" || pkg == "niri-git" {
|
||||||
|
args = append(args, "--setopt=install_weak_deps=False")
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
args = append(args, packages...)
|
args = append(args, packages...)
|
||||||
|
|
||||||
progressChan <- InstallProgressMsg{
|
progressChan <- InstallProgressMsg{
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
|
import Quickshell
|
||||||
|
import Quickshell.Hyprland
|
||||||
import qs.Common
|
import qs.Common
|
||||||
import qs.Modals.Common
|
import qs.Modals.Common
|
||||||
import qs.Services
|
import qs.Services
|
||||||
@@ -9,6 +11,11 @@ DankModal {
|
|||||||
|
|
||||||
layerNamespace: "dms:bluetooth-pairing"
|
layerNamespace: "dms:bluetooth-pairing"
|
||||||
|
|
||||||
|
HyprlandFocusGrab {
|
||||||
|
windows: [root]
|
||||||
|
active: CompositorService.isHyprland && root.shouldHaveFocus
|
||||||
|
}
|
||||||
|
|
||||||
property string deviceName: ""
|
property string deviceName: ""
|
||||||
property string deviceAddress: ""
|
property string deviceAddress: ""
|
||||||
property string requestType: ""
|
property string requestType: ""
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ pragma ComponentBehavior: Bound
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import Quickshell
|
import Quickshell
|
||||||
|
import Quickshell.Hyprland
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
import qs.Common
|
import qs.Common
|
||||||
import qs.Modals.Common
|
import qs.Modals.Common
|
||||||
@@ -14,6 +15,11 @@ DankModal {
|
|||||||
|
|
||||||
layerNamespace: "dms:clipboard"
|
layerNamespace: "dms:clipboard"
|
||||||
|
|
||||||
|
HyprlandFocusGrab {
|
||||||
|
windows: [clipboardHistoryModal]
|
||||||
|
active: CompositorService.isHyprland && clipboardHistoryModal.shouldHaveFocus
|
||||||
|
}
|
||||||
|
|
||||||
property int totalCount: 0
|
property int totalCount: 0
|
||||||
property var clipboardEntries: []
|
property var clipboardEntries: []
|
||||||
property string searchText: ""
|
property string searchText: ""
|
||||||
|
|||||||
@@ -95,11 +95,6 @@ PanelWindow {
|
|||||||
return WlrKeyboardFocus.Exclusive
|
return WlrKeyboardFocus.Exclusive
|
||||||
}
|
}
|
||||||
|
|
||||||
HyprlandFocusGrab {
|
|
||||||
windows: [root]
|
|
||||||
active: CompositorService.isHyprland && shouldHaveFocus
|
|
||||||
}
|
|
||||||
|
|
||||||
onVisibleChanged: {
|
onVisibleChanged: {
|
||||||
if (root.visible) {
|
if (root.visible) {
|
||||||
opened()
|
opened()
|
||||||
@@ -245,7 +240,7 @@ PanelWindow {
|
|||||||
clip: false
|
clip: false
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
layer.smooth: false
|
layer.smooth: false
|
||||||
layer.textureSize: Qt.size(width * root.dpr, height * root.dpr)
|
layer.textureSize: Qt.size(Math.round(width * root.dpr), Math.round(height * root.dpr))
|
||||||
opacity: root.shouldBeVisible ? 1 : 0
|
opacity: root.shouldBeVisible ? 1 : 0
|
||||||
scale: modalContainer.scaleValue
|
scale: modalContainer.scaleValue
|
||||||
x: Theme.snap(modalContainer.animX + (parent.width - width) * (1 - modalContainer.scaleValue) * 0.5, root.dpr)
|
x: Theme.snap(modalContainer.animX + (parent.width - width) * (1 - modalContainer.scaleValue) * 0.5, root.dpr)
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import Quickshell
|
import Quickshell
|
||||||
|
import Quickshell.Hyprland
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
import qs.Common
|
import qs.Common
|
||||||
import qs.Modals.Common
|
import qs.Modals.Common
|
||||||
@@ -12,6 +13,11 @@ DankModal {
|
|||||||
|
|
||||||
layerNamespace: "dms:color-picker"
|
layerNamespace: "dms:color-picker"
|
||||||
|
|
||||||
|
HyprlandFocusGrab {
|
||||||
|
windows: [root]
|
||||||
|
active: CompositorService.isHyprland && root.shouldHaveFocus
|
||||||
|
}
|
||||||
|
|
||||||
property string pickerTitle: "Choose Color"
|
property string pickerTitle: "Choose Color"
|
||||||
property color selectedColor: SessionData.recentColors.length > 0 ? SessionData.recentColors[0] : Theme.primary
|
property color selectedColor: SessionData.recentColors.length > 0 ? SessionData.recentColors[0] : Theme.primary
|
||||||
property var onColorSelectedCallback: null
|
property var onColorSelectedCallback: null
|
||||||
|
|||||||
@@ -2,10 +2,13 @@ import Qt.labs.folderlistmodel
|
|||||||
import QtCore
|
import QtCore
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
|
import Quickshell
|
||||||
|
import Quickshell.Hyprland
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
import qs.Common
|
import qs.Common
|
||||||
import qs.Modals.Common
|
import qs.Modals.Common
|
||||||
import qs.Modals.FileBrowser
|
import qs.Modals.FileBrowser
|
||||||
|
import qs.Services
|
||||||
import qs.Widgets
|
import qs.Widgets
|
||||||
|
|
||||||
DankModal {
|
DankModal {
|
||||||
@@ -13,6 +16,13 @@ DankModal {
|
|||||||
|
|
||||||
layerNamespace: "dms:file-browser"
|
layerNamespace: "dms:file-browser"
|
||||||
|
|
||||||
|
HyprlandFocusGrab {
|
||||||
|
windows: [fileBrowserModal]
|
||||||
|
active: CompositorService.isHyprland && fileBrowserModal.shouldHaveFocus
|
||||||
|
}
|
||||||
|
|
||||||
|
keepPopoutsOpen: true
|
||||||
|
|
||||||
property string homeDir: StandardPaths.writableLocation(StandardPaths.HomeLocation)
|
property string homeDir: StandardPaths.writableLocation(StandardPaths.HomeLocation)
|
||||||
property string docsDir: StandardPaths.writableLocation(StandardPaths.DocumentsLocation)
|
property string docsDir: StandardPaths.writableLocation(StandardPaths.DocumentsLocation)
|
||||||
property string musicDir: StandardPaths.writableLocation(StandardPaths.MusicLocation)
|
property string musicDir: StandardPaths.writableLocation(StandardPaths.MusicLocation)
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
|
import Quickshell
|
||||||
|
import Quickshell.Hyprland
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
import qs.Common
|
import qs.Common
|
||||||
import qs.Modals.Common
|
import qs.Modals.Common
|
||||||
@@ -11,6 +13,11 @@ DankModal {
|
|||||||
|
|
||||||
layerNamespace: "dms:notification-center-modal"
|
layerNamespace: "dms:notification-center-modal"
|
||||||
|
|
||||||
|
HyprlandFocusGrab {
|
||||||
|
windows: [notificationModal]
|
||||||
|
active: CompositorService.isHyprland && notificationModal.shouldHaveFocus
|
||||||
|
}
|
||||||
|
|
||||||
property bool notificationModalOpen: false
|
property bool notificationModalOpen: false
|
||||||
property var notificationListRef: null
|
property var notificationListRef: null
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
|
import Quickshell
|
||||||
|
import Quickshell.Hyprland
|
||||||
import qs.Common
|
import qs.Common
|
||||||
import qs.Modals.Common
|
import qs.Modals.Common
|
||||||
import qs.Services
|
import qs.Services
|
||||||
@@ -9,6 +11,11 @@ DankModal {
|
|||||||
|
|
||||||
layerNamespace: "dms:polkit"
|
layerNamespace: "dms:polkit"
|
||||||
|
|
||||||
|
HyprlandFocusGrab {
|
||||||
|
windows: [root]
|
||||||
|
active: CompositorService.isHyprland && root.shouldHaveFocus
|
||||||
|
}
|
||||||
|
|
||||||
property string passwordInput: ""
|
property string passwordInput: ""
|
||||||
property var currentFlow: PolkitService.agent?.flow
|
property var currentFlow: PolkitService.agent?.flow
|
||||||
property bool isLoading: false
|
property bool isLoading: false
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import Quickshell
|
import Quickshell
|
||||||
|
import Quickshell.Hyprland
|
||||||
import qs.Common
|
import qs.Common
|
||||||
import qs.Modals.Common
|
import qs.Modals.Common
|
||||||
import qs.Services
|
import qs.Services
|
||||||
@@ -10,6 +11,11 @@ DankModal {
|
|||||||
|
|
||||||
layerNamespace: "dms:power-menu"
|
layerNamespace: "dms:power-menu"
|
||||||
|
|
||||||
|
HyprlandFocusGrab {
|
||||||
|
windows: [root]
|
||||||
|
active: CompositorService.isHyprland && root.shouldHaveFocus
|
||||||
|
}
|
||||||
|
|
||||||
property int selectedIndex: 0
|
property int selectedIndex: 0
|
||||||
property int selectedRow: 0
|
property int selectedRow: 0
|
||||||
property int selectedCol: 0
|
property int selectedCol: 0
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Effects
|
import QtQuick.Effects
|
||||||
|
import Quickshell
|
||||||
|
import Quickshell.Hyprland
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
import qs.Common
|
import qs.Common
|
||||||
import qs.Modals.Common
|
import qs.Modals.Common
|
||||||
@@ -13,6 +15,11 @@ DankModal {
|
|||||||
|
|
||||||
layerNamespace: "dms:settings"
|
layerNamespace: "dms:settings"
|
||||||
|
|
||||||
|
HyprlandFocusGrab {
|
||||||
|
windows: [settingsModal]
|
||||||
|
active: CompositorService.isHyprland && settingsModal.shouldHaveFocus
|
||||||
|
}
|
||||||
|
|
||||||
property Component settingsContent
|
property Component settingsContent
|
||||||
property alias profileBrowser: profileBrowser
|
property alias profileBrowser: profileBrowser
|
||||||
property int currentTabIndex: 0
|
property int currentTabIndex: 0
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import Quickshell
|
import Quickshell
|
||||||
|
import Quickshell.Hyprland
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
import Quickshell.Widgets
|
import Quickshell.Widgets
|
||||||
import qs.Common
|
import qs.Common
|
||||||
@@ -14,6 +15,11 @@ DankModal {
|
|||||||
|
|
||||||
layerNamespace: "dms:spotlight"
|
layerNamespace: "dms:spotlight"
|
||||||
|
|
||||||
|
HyprlandFocusGrab {
|
||||||
|
windows: [spotlightModal]
|
||||||
|
active: CompositorService.isHyprland && spotlightModal.shouldHaveFocus
|
||||||
|
}
|
||||||
|
|
||||||
property bool spotlightOpen: false
|
property bool spotlightOpen: false
|
||||||
property alias spotlightContent: spotlightContentInstance
|
property alias spotlightContent: spotlightContentInstance
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
|
import Quickshell
|
||||||
|
import Quickshell.Hyprland
|
||||||
import qs.Common
|
import qs.Common
|
||||||
import qs.Modals.Common
|
import qs.Modals.Common
|
||||||
import qs.Services
|
import qs.Services
|
||||||
@@ -9,6 +11,11 @@ DankModal {
|
|||||||
|
|
||||||
layerNamespace: "dms:wifi-password"
|
layerNamespace: "dms:wifi-password"
|
||||||
|
|
||||||
|
HyprlandFocusGrab {
|
||||||
|
windows: [root]
|
||||||
|
active: CompositorService.isHyprland && root.shouldHaveFocus
|
||||||
|
}
|
||||||
|
|
||||||
property string wifiPasswordSSID: ""
|
property string wifiPasswordSSID: ""
|
||||||
property string wifiPasswordInput: ""
|
property string wifiPasswordInput: ""
|
||||||
property string wifiUsernameInput: ""
|
property string wifiUsernameInput: ""
|
||||||
|
|||||||
@@ -593,13 +593,13 @@ Column {
|
|||||||
text: {
|
text: {
|
||||||
switch (widgetData.id || "") {
|
switch (widgetData.id || "") {
|
||||||
case "nightMode":
|
case "nightMode":
|
||||||
return "Night Mode"
|
return I18n.tr("Night Mode")
|
||||||
case "darkMode":
|
case "darkMode":
|
||||||
return SessionData.isLightMode ? "Light Mode" : "Dark Mode"
|
return I18n.tr("Dark Mode")
|
||||||
case "doNotDisturb":
|
case "doNotDisturb":
|
||||||
return "Do Not Disturb"
|
return I18n.tr("Do Not Disturb")
|
||||||
case "idleInhibitor":
|
case "idleInhibitor":
|
||||||
return SessionService.idleInhibited ? "Keeping Awake" : "Keep Awake"
|
return SessionService.idleInhibited ? I18n.tr("Keeping Awake") : I18n.tr("Keep Awake")
|
||||||
default:
|
default:
|
||||||
return "Unknown"
|
return "Unknown"
|
||||||
}
|
}
|
||||||
@@ -619,7 +619,7 @@ Column {
|
|||||||
case "nightMode":
|
case "nightMode":
|
||||||
return DisplayService.nightModeEnabled || false
|
return DisplayService.nightModeEnabled || false
|
||||||
case "darkMode":
|
case "darkMode":
|
||||||
return SessionData.isLightMode
|
return !SessionData.isLightMode
|
||||||
case "doNotDisturb":
|
case "doNotDisturb":
|
||||||
return SessionData.doNotDisturb || false
|
return SessionData.doNotDisturb || false
|
||||||
case "idleInhibitor":
|
case "idleInhibitor":
|
||||||
@@ -700,7 +700,7 @@ Column {
|
|||||||
case "nightMode":
|
case "nightMode":
|
||||||
return DisplayService.nightModeEnabled || false
|
return DisplayService.nightModeEnabled || false
|
||||||
case "darkMode":
|
case "darkMode":
|
||||||
return SessionData.isLightMode
|
return !SessionData.isLightMode
|
||||||
case "doNotDisturb":
|
case "doNotDisturb":
|
||||||
return SessionData.doNotDisturb || false
|
return SessionData.doNotDisturb || false
|
||||||
case "idleInhibitor":
|
case "idleInhibitor":
|
||||||
|
|||||||
@@ -69,6 +69,15 @@ Row {
|
|||||||
valueOverride: actualVolumePercent
|
valueOverride: actualVolumePercent
|
||||||
thumbOutlineColor: Theme.surfaceContainer
|
thumbOutlineColor: Theme.surfaceContainer
|
||||||
trackColor: root.sliderTrackColor.a > 0 ? root.sliderTrackColor : Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency)
|
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) {
|
onSliderValueChanged: function(newValue) {
|
||||||
if (defaultSink) {
|
if (defaultSink) {
|
||||||
defaultSink.audio.volume = newValue / 100.0
|
defaultSink.audio.volume = newValue / 100.0
|
||||||
|
|||||||
@@ -143,6 +143,8 @@ Row {
|
|||||||
}
|
}
|
||||||
|
|
||||||
DankSlider {
|
DankSlider {
|
||||||
|
id: brightnessSlider
|
||||||
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
width: parent.width - (Theme.iconSize + Theme.spacingS * 2)
|
width: parent.width - (Theme.iconSize + Theme.spacingS * 2)
|
||||||
enabled: DisplayService.brightnessAvailable && targetDeviceName.length > 0
|
enabled: DisplayService.brightnessAvailable && targetDeviceName.length > 0
|
||||||
@@ -162,7 +164,7 @@ Row {
|
|||||||
}
|
}
|
||||||
return targetDevice.displayMax || 100
|
return targetDevice.displayMax || 100
|
||||||
}
|
}
|
||||||
value: targetBrightness
|
value: !isDragging ? targetBrightness : value
|
||||||
showValue: true
|
showValue: true
|
||||||
unit: {
|
unit: {
|
||||||
if (!targetDevice) return "%"
|
if (!targetDevice) return "%"
|
||||||
|
|||||||
@@ -635,7 +635,7 @@ Item {
|
|||||||
id: systemTrayComponent
|
id: systemTrayComponent
|
||||||
|
|
||||||
SystemTrayBar {
|
SystemTrayBar {
|
||||||
parentWindow: rootWindow
|
parentWindow: barWindow
|
||||||
parentScreen: barWindow.screen
|
parentScreen: barWindow.screen
|
||||||
widgetThickness: barWindow.widgetThickness
|
widgetThickness: barWindow.widgetThickness
|
||||||
isAtBottom: SettingsData.dankBarPosition === SettingsData.Position.Bottom
|
isAtBottom: SettingsData.dankBarPosition === SettingsData.Position.Bottom
|
||||||
@@ -981,7 +981,7 @@ Item {
|
|||||||
section: topBarContent.getWidgetSection(parent) || "right"
|
section: topBarContent.getWidgetSection(parent) || "right"
|
||||||
parentScreen: barWindow.screen
|
parentScreen: barWindow.screen
|
||||||
onColorPickerRequested: {
|
onColorPickerRequested: {
|
||||||
rootWindow.colorPickerRequested()
|
barWindow.colorPickerRequested()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -530,6 +530,7 @@ Item {
|
|||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: menuContainer
|
id: menuContainer
|
||||||
|
objectName: "overflowMenuContainer"
|
||||||
|
|
||||||
readonly property real rawWidth: {
|
readonly property real rawWidth: {
|
||||||
const itemCount = root.hiddenBarItems.length
|
const itemCount = root.hiddenBarItems.length
|
||||||
@@ -724,8 +725,7 @@ Item {
|
|||||||
|
|
||||||
if (!trayItem.hasMenu) return
|
if (!trayItem.hasMenu) return
|
||||||
|
|
||||||
root.menuOpen = false
|
root.showForTrayItem(trayItem, menuContainer, parentScreen, root.isAtBottom, root.isVertical, root.axis)
|
||||||
root.showForTrayItem(trayItem, parent, parentScreen, root.isAtBottom, root.isVertical, root.axis)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -911,10 +911,10 @@ Item {
|
|||||||
|
|
||||||
onVisibleChanged: {
|
onVisibleChanged: {
|
||||||
if (visible) {
|
if (visible) {
|
||||||
|
updatePosition()
|
||||||
root.menuOpen = false
|
root.menuOpen = false
|
||||||
PopoutManager.closeAllPopouts()
|
PopoutManager.closeAllPopouts()
|
||||||
ModalManager.closeAllModalsExcept(null)
|
ModalManager.closeAllModalsExcept(null)
|
||||||
updatePosition()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -954,11 +954,20 @@ Item {
|
|||||||
|
|
||||||
function updatePosition() {
|
function updatePosition() {
|
||||||
const targetItem = (typeof menuRoot !== "undefined" && menuRoot.anchorItem) ? menuRoot.anchorItem : root
|
const targetItem = (typeof menuRoot !== "undefined" && menuRoot.anchorItem) ? menuRoot.anchorItem : root
|
||||||
const globalPos = targetItem.mapToGlobal(0, 0)
|
|
||||||
const screenX = screen.x || 0
|
const isFromOverflowMenu = targetItem.objectName === "overflowMenuContainer"
|
||||||
const screenY = screen.y || 0
|
|
||||||
const relativeX = globalPos.x - screenX
|
let relativeX, relativeY
|
||||||
const relativeY = globalPos.y - screenY
|
if (isFromOverflowMenu) {
|
||||||
|
relativeX = targetItem.x
|
||||||
|
relativeY = targetItem.y
|
||||||
|
} else {
|
||||||
|
const globalPos = targetItem.mapToGlobal(0, 0)
|
||||||
|
const screenX = screen.x || 0
|
||||||
|
const screenY = screen.y || 0
|
||||||
|
relativeX = globalPos.x - screenX
|
||||||
|
relativeY = globalPos.y - screenY
|
||||||
|
}
|
||||||
|
|
||||||
const widgetThickness = Math.max(20, 26 + SettingsData.dankBarInnerPadding * 0.6)
|
const widgetThickness = Math.max(20, 26 + SettingsData.dankBarInnerPadding * 0.6)
|
||||||
const effectiveBarThickness = Math.max(widgetThickness + SettingsData.dankBarInnerPadding + 4, Theme.barHeight - 4 - (8 - SettingsData.dankBarInnerPadding))
|
const effectiveBarThickness = Math.max(widgetThickness + SettingsData.dankBarInnerPadding + 4, Theme.barHeight - 4 - (8 - SettingsData.dankBarInnerPadding))
|
||||||
|
|||||||
@@ -292,6 +292,7 @@ DankPopout {
|
|||||||
tabBarItem: tabBar
|
tabBarItem: tabBar
|
||||||
keyForwardTarget: mainContainer
|
keyForwardTarget: mainContainer
|
||||||
targetScreen: root.triggerScreen
|
targetScreen: root.triggerScreen
|
||||||
|
parentPopout: root
|
||||||
}
|
}
|
||||||
|
|
||||||
WeatherTab {
|
WeatherTab {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import QtQuick.Controls
|
|||||||
import QtQuick.Effects
|
import QtQuick.Effects
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import Quickshell
|
import Quickshell
|
||||||
|
import Quickshell.Wayland
|
||||||
import qs.Common
|
import qs.Common
|
||||||
import qs.Modals.FileBrowser
|
import qs.Modals.FileBrowser
|
||||||
import qs.Services
|
import qs.Services
|
||||||
@@ -25,6 +26,7 @@ Item {
|
|||||||
property Item tabBarItem: null
|
property Item tabBarItem: null
|
||||||
property int gridIndex: 0
|
property int gridIndex: 0
|
||||||
property Item keyForwardTarget: null
|
property Item keyForwardTarget: null
|
||||||
|
property var parentPopout: null
|
||||||
property int lastPage: 0
|
property int lastPage: 0
|
||||||
property bool enableAnimation: false
|
property bool enableAnimation: false
|
||||||
property string homeDir: StandardPaths.writableLocation(StandardPaths.HomeLocation)
|
property string homeDir: StandardPaths.writableLocation(StandardPaths.HomeLocation)
|
||||||
@@ -293,6 +295,12 @@ Item {
|
|||||||
active: false
|
active: false
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
|
|
||||||
|
onActiveChanged: {
|
||||||
|
if (active && parentPopout) {
|
||||||
|
parentPopout.WlrLayershell.keyboardFocus = WlrKeyboardFocus.None
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sourceComponent: FileBrowserModal {
|
sourceComponent: FileBrowserModal {
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
open()
|
open()
|
||||||
@@ -318,6 +326,13 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onDialogClosed: {
|
onDialogClosed: {
|
||||||
|
if (parentPopout) {
|
||||||
|
if (CompositorService.isHyprland) {
|
||||||
|
parentPopout.WlrLayershell.keyboardFocus = WlrKeyboardFocus.OnDemand
|
||||||
|
} else {
|
||||||
|
parentPopout.WlrLayershell.keyboardFocus = WlrKeyboardFocus.Exclusive
|
||||||
|
}
|
||||||
|
}
|
||||||
Qt.callLater(() => wallpaperBrowserLoader.active = false)
|
Qt.callLater(() => wallpaperBrowserLoader.active = false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -412,7 +412,7 @@ Singleton {
|
|||||||
interval: 50
|
interval: 50
|
||||||
repeat: false
|
repeat: false
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
if (!root.suppressOSD && SettingsData.soundsEnabled && SettingsData.soundVolumeChanged) {
|
if (SettingsData.soundsEnabled && SettingsData.soundVolumeChanged) {
|
||||||
root.playVolumeChangeSound()
|
root.playVolumeChangeSound()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
v0.6.0
|
v0.6.2
|
||||||
|
|||||||
Reference in New Issue
Block a user