mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
Adjust notifications position if panel is at top with intellihide enabled
This commit is contained in:
@@ -800,7 +800,8 @@ export const Panel = GObject.registerClass(
|
||||
dockMode = !!dynamic || sideMargins > 0 || w < this.monitor.width
|
||||
fixedPadding = topBottomPadding * scaleFactor
|
||||
varPadding = sidePadding * scaleFactor
|
||||
outerSize += topBottomMargins
|
||||
outerSize +=
|
||||
topBottomMargins - (position == St.Side.TOP ? gsTopPanelHeight : 0)
|
||||
}
|
||||
|
||||
if (position == St.Side.TOP) {
|
||||
|
||||
@@ -183,6 +183,27 @@ export const PanelManager = class {
|
||||
LookingGlass.LookingGlass.prototype.open
|
||||
LookingGlass.LookingGlass.prototype.open = _newLookingGlassOpen
|
||||
|
||||
Main.messageTray._bannerBin.ease = (params) => {
|
||||
if (params.y === 0) {
|
||||
let panelOnPrimary = this.allPanels.find(
|
||||
(p) => p.monitor == Main.layoutManager.primaryMonitor,
|
||||
)
|
||||
|
||||
if (
|
||||
panelOnPrimary &&
|
||||
panelOnPrimary.intellihide?.enabled &&
|
||||
panelOnPrimary.geom.position == St.Side.TOP &&
|
||||
panelOnPrimary.panelBox.visible
|
||||
)
|
||||
params.y += panelOnPrimary.geom.outerSize
|
||||
}
|
||||
|
||||
Object.getPrototypeOf(Main.messageTray._bannerBin).ease.call(
|
||||
Main.messageTray._bannerBin,
|
||||
params,
|
||||
)
|
||||
}
|
||||
|
||||
this._signalsHandler = new Utils.GlobalSignalsHandler()
|
||||
|
||||
//listen settings
|
||||
@@ -362,6 +383,8 @@ export const PanelManager = class {
|
||||
LookingGlass.LookingGlass.prototype._oldOpen
|
||||
delete LookingGlass.LookingGlass.prototype._oldOpen
|
||||
|
||||
delete Main.messageTray._bannerBin.ease
|
||||
|
||||
delete Main.panel.style
|
||||
this._desktopIconsUsableArea.destroy()
|
||||
this._desktopIconsUsableArea = null
|
||||
|
||||
Reference in New Issue
Block a user