mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 13:32:50 -05:00
bar ipc change from show to reveal
This commit is contained in:
@@ -1060,22 +1060,22 @@ Singleton {
|
||||
}
|
||||
|
||||
IpcHandler {
|
||||
function show() {
|
||||
function reveal(): string {
|
||||
root.setTopBarVisible(true)
|
||||
return "BAR_SHOW_SUCCESS"
|
||||
}
|
||||
|
||||
function hide() {
|
||||
function hide(): string {
|
||||
root.setTopBarVisible(false)
|
||||
return "BAR_HIDE_SUCCESS"
|
||||
}
|
||||
|
||||
function toggle() {
|
||||
function toggle(): string {
|
||||
root.toggleTopBarVisible()
|
||||
return topBarVisible ? "BAR_SHOW_SUCCESS" : "BAR_HIDE_SUCCESS"
|
||||
}
|
||||
|
||||
function status() {
|
||||
function status(): string {
|
||||
return topBarVisible ? "visible" : "hidden"
|
||||
}
|
||||
|
||||
|
||||
@@ -119,11 +119,8 @@ Item {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
text: {
|
||||
if (SettingsData.use24HourClock) {
|
||||
return systemClock.date.toLocaleTimeString(Qt.locale(), "HH:mm")
|
||||
} else {
|
||||
return systemClock.date.toLocaleTimeString(Qt.locale(), "h:mm AP")
|
||||
}
|
||||
const format = SettingsData.use24HourClock ? "HH:mm" : "h:mm AP"
|
||||
return systemClock.date.toLocaleTimeString(Qt.locale(), format)
|
||||
}
|
||||
font.pixelSize: 120
|
||||
font.weight: Font.Light
|
||||
|
||||
@@ -40,11 +40,8 @@ Rectangle {
|
||||
|
||||
StyledText {
|
||||
text: {
|
||||
if (SettingsData.use24HourClock) {
|
||||
return root.currentDate.toLocaleTimeString(Qt.locale(), "HH:mm")
|
||||
} else {
|
||||
return root.currentDate.toLocaleTimeString(Qt.locale(), "h:mm AP")
|
||||
}
|
||||
const format = SettingsData.use24HourClock ? "HH:mm" : "h:mm AP"
|
||||
return root.currentDate.toLocaleTimeString(Qt.locale(), format)
|
||||
}
|
||||
font.pixelSize: Theme.fontSizeMedium - 1
|
||||
color: Theme.surfaceText
|
||||
|
||||
@@ -112,7 +112,7 @@ PanelWindow {
|
||||
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 {
|
||||
item: topBarMouseArea
|
||||
|
||||
@@ -25,9 +25,9 @@ Image {
|
||||
hashProcess.running = true
|
||||
}
|
||||
onCachePathChanged: {
|
||||
if (!imageHash || !cachePath) {
|
||||
if (!imageHash || !cachePath)
|
||||
return
|
||||
}
|
||||
|
||||
Paths.mkdir(Paths.imagecache)
|
||||
source = cachePath
|
||||
}
|
||||
@@ -36,15 +36,15 @@ Image {
|
||||
source = imagePath
|
||||
return
|
||||
}
|
||||
if (source != imagePath || status !== Image.Ready || !imageHash || !cachePath) {
|
||||
if (source != imagePath || status !== Image.Ready || !imageHash || !cachePath)
|
||||
return
|
||||
}
|
||||
|
||||
Paths.mkdir(Paths.imagecache)
|
||||
const grabPath = cachePath
|
||||
if (visible && width > 0 && height > 0 && Window.window && Window.window.visible) {
|
||||
grabToImage(res => res.saveToFile(grabPath))
|
||||
}
|
||||
if (visible && width > 0 && height > 0 && Window.window && Window.window.visible)
|
||||
grabToImage(res => {
|
||||
return res.saveToFile(grabPath)
|
||||
})
|
||||
}
|
||||
|
||||
Process {
|
||||
|
||||
@@ -317,7 +317,7 @@ Top bar visibility control.
|
||||
|
||||
### Functions
|
||||
|
||||
**`show`**
|
||||
**`reveal`**
|
||||
- Show the top bar
|
||||
- Returns: Success confirmation
|
||||
|
||||
|
||||
Reference in New Issue
Block a user