1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

launcher v2: general padding improvements, to more than just launcher v2

but yea
This commit is contained in:
bbedward
2026-01-20 21:46:02 -05:00
parent 80ce6aa19c
commit 553f5257b3
12 changed files with 58 additions and 69 deletions

View File

@@ -9,6 +9,8 @@ import qs.Widgets
Item {
id: root
visible: false
property bool spotlightOpen: false
property bool keyboardActive: false
property bool contentVisible: false
@@ -22,8 +24,8 @@ Item {
readonly property real screenHeight: effectiveScreen?.height ?? 1080
readonly property real dpr: effectiveScreen ? CompositorService.getScreenScale(effectiveScreen) : 1
readonly property int baseWidth: SettingsData.dankLauncherV2Size === "medium" ? 600 : SettingsData.dankLauncherV2Size === "large" ? 720 : 500
readonly property int baseHeight: SettingsData.dankLauncherV2Size === "medium" ? 680 : SettingsData.dankLauncherV2Size === "large" ? 820 : 560
readonly property int baseWidth: SettingsData.dankLauncherV2Size === "medium" ? 720 : SettingsData.dankLauncherV2Size === "large" ? 860 : 620
readonly property int baseHeight: SettingsData.dankLauncherV2Size === "medium" ? 720 : SettingsData.dankLauncherV2Size === "large" ? 860 : 600
readonly property int modalWidth: Math.min(baseWidth, screenWidth - 100)
readonly property int modalHeight: Math.min(baseHeight, screenHeight - 100)
readonly property real modalX: (screenWidth - modalWidth) / 2
@@ -165,6 +167,27 @@ Item {
}
}
Connections {
target: Quickshell
function onScreensChanged() {
if (!launcherWindow.screen)
return;
const currentScreenName = launcherWindow.screen.name;
let screenStillExists = false;
for (let i = 0; i < Quickshell.screens.length; i++) {
if (Quickshell.screens[i].name === currentScreenName) {
screenStillExists = true;
break;
}
}
if (screenStillExists)
return;
const newScreen = CompositorService.getFocusedScreen();
if (newScreen)
launcherWindow.screen = newScreen;
}
}
PanelWindow {
id: launcherWindow
visible: true