mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
fix: active window
This commit is contained in:
@@ -9,10 +9,30 @@ Item {
|
||||
id: activeWindowWrapper
|
||||
width: parent.width
|
||||
property int fullHeight: activeWindowTitleContainer.height
|
||||
property bool shouldShow: false
|
||||
|
||||
Timer {
|
||||
id: visibilityTimer
|
||||
interval: 4000
|
||||
running: false
|
||||
onTriggered: {
|
||||
activeWindowWrapper.shouldShow = false
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: ToplevelManager
|
||||
function onActiveToplevelChanged() {
|
||||
if (ToplevelManager.activeToplevel?.appId) {
|
||||
activeWindowWrapper.shouldShow = true
|
||||
visibilityTimer.restart()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
y: panel.activeWindowVisible ? barBackground.height : barBackground.height - fullHeight
|
||||
height: panel.activeWindowVisible ? fullHeight : 1
|
||||
opacity: panel.activeWindowVisible ? 1 : 0
|
||||
y: shouldShow && !!ToplevelManager.activeToplevel?.appId ? barBackground.height : barBackground.height - fullHeight
|
||||
height: shouldShow && !!ToplevelManager.activeToplevel?.appId ? fullHeight : 1
|
||||
opacity: shouldShow && !!ToplevelManager.activeToplevel?.appId ? 1 : 0
|
||||
clip: true
|
||||
|
||||
function getIcon() {
|
||||
|
||||
Reference in New Issue
Block a user