1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-05 21:15:38 -05:00

dash: fix IPC positioning

This commit is contained in:
bbedward
2025-10-29 10:42:39 -04:00
parent 5e36b1454a
commit 76b168020c
4 changed files with 12 additions and 14 deletions

View File

@@ -965,7 +965,7 @@ Singleton {
}
return {
"x": relativeX,
"y": barThickness + dankBarSpacing + dankBarBottomGap + Theme.popupDistance,
"y": barThickness + dankBarSpacing + Theme.popupDistance,
"width": widgetWidth
}
}

View File

@@ -135,24 +135,22 @@ Item {
}
function toggle(tab: string): string {
root.dankDashPopoutLoader.active = true
if (root.dankBarLoader.item && root.dankBarLoader.item.triggerWallpaperBrowserOnFocusedScreen()) {
if (root.dankDashPopoutLoader.item) {
if (root.dankDashPopoutLoader.item.dashVisible) {
root.dankDashPopoutLoader.item.dashVisible = false
} else {
switch (tab.toLowerCase()) {
case "media":
root.dankDashPopoutLoader.item.currentTabIndex = 1
break
case "wallpaper":
root.dankDashPopoutLoader.item.currentTabIndex = 2
break
case "weather":
root.dankDashPopoutLoader.item.currentTabIndex = SettingsData.weatherEnabled ? 2 : 0
root.dankDashPopoutLoader.item.currentTabIndex = SettingsData.weatherEnabled ? 3 : 0
break
default:
root.dankDashPopoutLoader.item.currentTabIndex = 0
break
}
root.dankDashPopoutLoader.item.setTriggerPosition(Screen.width / 2, Theme.barHeight + Theme.spacingS, 100, "center", Screen)
root.dankDashPopoutLoader.item.dashVisible = true
}
return "DASH_TOGGLE_SUCCESS"
}

View File

@@ -110,9 +110,9 @@ Item {
return
}
if (clockButtonRef && dankDashPopoutLoader.item.setTriggerPosition) {
const globalPos = clockButtonRef.mapToGlobal(0, 0)
const pos = SettingsData.getPopupTriggerPosition(globalPos, barWindow.screen, barWindow.effectiveBarThickness, clockButtonRef.width)
if (clockButtonRef && clockButtonRef.visualContent && dankDashPopoutLoader.item.setTriggerPosition) {
const globalPos = clockButtonRef.visualContent.mapToGlobal(0, 0)
const pos = SettingsData.getPopupTriggerPosition(globalPos, barWindow.screen, barWindow.effectiveBarThickness, clockButtonRef.visualWidth)
const section = clockButtonRef.section || "center"
dankDashPopoutLoader.item.setTriggerPosition(pos.x, pos.y, pos.width, section, barWindow.screen)
} else {

View File

@@ -508,12 +508,12 @@ Dashboard popup control with tab selection for overview, media, and weather info
**Functions:**
- `open [tab]` - Show dashboard popup with optional tab selection
- Parameters: `tab` - Optional tab to open: "" (default), "overview", "media", or "weather"
- Parameters: `tab` - Tab to open: "", "overview", "media", or "weather"
- Returns: Success/failure message
- `close` - Hide dashboard popup
- Returns: Success/failure message
- `toggle [tab]` - Toggle dashboard popup visibility with optional tab selection
- Parameters: `tab` - Optional tab to open when showing: "" (default), "overview", "media", or "weather"
- Parameters: `tab` - Tab to open when showing: "", "overview", "media", or "weather"
- Returns: Success/failure message
### Target: `dankdash`