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

bar ipc change from show to reveal

This commit is contained in:
bbedward
2025-09-04 15:53:54 -04:00
parent e64124cce3
commit 3c3cffd7b6
6 changed files with 17 additions and 23 deletions

View File

@@ -1060,22 +1060,22 @@ Singleton {
} }
IpcHandler { IpcHandler {
function show() { function reveal(): string {
root.setTopBarVisible(true) root.setTopBarVisible(true)
return "BAR_SHOW_SUCCESS" return "BAR_SHOW_SUCCESS"
} }
function hide() { function hide(): string {
root.setTopBarVisible(false) root.setTopBarVisible(false)
return "BAR_HIDE_SUCCESS" return "BAR_HIDE_SUCCESS"
} }
function toggle() { function toggle(): string {
root.toggleTopBarVisible() root.toggleTopBarVisible()
return topBarVisible ? "BAR_SHOW_SUCCESS" : "BAR_HIDE_SUCCESS" return topBarVisible ? "BAR_SHOW_SUCCESS" : "BAR_HIDE_SUCCESS"
} }
function status() { function status(): string {
return topBarVisible ? "visible" : "hidden" return topBarVisible ? "visible" : "hidden"
} }

View File

@@ -119,11 +119,8 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top anchors.top: parent.top
text: { text: {
if (SettingsData.use24HourClock) { const format = SettingsData.use24HourClock ? "HH:mm" : "h:mm AP"
return systemClock.date.toLocaleTimeString(Qt.locale(), "HH:mm") return systemClock.date.toLocaleTimeString(Qt.locale(), format)
} else {
return systemClock.date.toLocaleTimeString(Qt.locale(), "h:mm AP")
}
} }
font.pixelSize: 120 font.pixelSize: 120
font.weight: Font.Light font.weight: Font.Light

View File

@@ -40,11 +40,8 @@ Rectangle {
StyledText { StyledText {
text: { text: {
if (SettingsData.use24HourClock) { const format = SettingsData.use24HourClock ? "HH:mm" : "h:mm AP"
return root.currentDate.toLocaleTimeString(Qt.locale(), "HH:mm") return root.currentDate.toLocaleTimeString(Qt.locale(), format)
} else {
return root.currentDate.toLocaleTimeString(Qt.locale(), "h:mm AP")
}
} }
font.pixelSize: Theme.fontSizeMedium - 1 font.pixelSize: Theme.fontSizeMedium - 1
color: Theme.surfaceText color: Theme.surfaceText

View File

@@ -112,7 +112,7 @@ PanelWindow {
right: true right: true
} }
exclusiveZone: topBarCore.autoHide ? -1 : root.effectiveBarHeight + SettingsData.topBarSpacing - 2 + SettingsData.topBarBottomGap exclusiveZone: (!SettingsData.topBarVisible || topBarCore.autoHide) ? -1 : root.effectiveBarHeight + SettingsData.topBarSpacing - 2 + SettingsData.topBarBottomGap
mask: Region { mask: Region {
item: topBarMouseArea item: topBarMouseArea

View File

@@ -25,9 +25,9 @@ Image {
hashProcess.running = true hashProcess.running = true
} }
onCachePathChanged: { onCachePathChanged: {
if (!imageHash || !cachePath) { if (!imageHash || !cachePath)
return return
}
Paths.mkdir(Paths.imagecache) Paths.mkdir(Paths.imagecache)
source = cachePath source = cachePath
} }
@@ -36,15 +36,15 @@ Image {
source = imagePath source = imagePath
return return
} }
if (source != imagePath || status !== Image.Ready || !imageHash || !cachePath) { if (source != imagePath || status !== Image.Ready || !imageHash || !cachePath)
return return
}
Paths.mkdir(Paths.imagecache) Paths.mkdir(Paths.imagecache)
const grabPath = cachePath const grabPath = cachePath
if (visible && width > 0 && height > 0 && Window.window && Window.window.visible) { if (visible && width > 0 && height > 0 && Window.window && Window.window.visible)
grabToImage(res => res.saveToFile(grabPath)) grabToImage(res => {
} return res.saveToFile(grabPath)
})
} }
Process { Process {

View File

@@ -317,7 +317,7 @@ Top bar visibility control.
### Functions ### Functions
**`show`** **`reveal`**
- Show the top bar - Show the top bar
- Returns: Success confirmation - Returns: Success confirmation