mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-30 16:32:50 -05:00
Update Topbar Autohide Fullscreen Edgecase
This commit is contained in:
@@ -150,10 +150,28 @@ PanelWindow {
|
|||||||
|
|
||||||
property real backgroundTransparency: SettingsData.topBarTransparency
|
property real backgroundTransparency: SettingsData.topBarTransparency
|
||||||
property bool autoHide: SettingsData.topBarAutoHide
|
property bool autoHide: SettingsData.topBarAutoHide
|
||||||
|
property bool isFullscreenWindow: {
|
||||||
|
const activeWindow = ToplevelManager.activeToplevel
|
||||||
|
if (!activeWindow || !root.screen) return false
|
||||||
|
|
||||||
|
if (activeWindow.fullscreen !== undefined) {
|
||||||
|
return activeWindow.fullscreen
|
||||||
|
}
|
||||||
|
|
||||||
|
const screenGeometry = root.screen.geometry
|
||||||
|
if (!screenGeometry || !activeWindow.geometry) return false
|
||||||
|
|
||||||
|
return activeWindow.geometry.width >= screenGeometry.width &&
|
||||||
|
activeWindow.geometry.height >= screenGeometry.height
|
||||||
|
}
|
||||||
property bool reveal: {
|
property bool reveal: {
|
||||||
if (CompositorService.isNiri && NiriService.inOverview) {
|
if (CompositorService.isNiri && NiriService.inOverview) {
|
||||||
return SettingsData.topBarOpenOnOverview
|
return SettingsData.topBarOpenOnOverview
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isFullscreenWindow) {
|
||||||
|
return topBarMouseArea.containsMouse || hasActivePopout
|
||||||
|
}
|
||||||
return SettingsData.topBarVisible && (!autoHide || topBarMouseArea.containsMouse || hasActivePopout)
|
return SettingsData.topBarVisible && (!autoHide || topBarMouseArea.containsMouse || hasActivePopout)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user