fix: active window
This commit is contained in:
parent
5e2db00522
commit
df648330ea
1 changed files with 23 additions and 3 deletions
|
|
@ -9,10 +9,30 @@ Item {
|
||||||
id: activeWindowWrapper
|
id: activeWindowWrapper
|
||||||
width: parent.width
|
width: parent.width
|
||||||
property int fullHeight: activeWindowTitleContainer.height
|
property int fullHeight: activeWindowTitleContainer.height
|
||||||
|
property bool shouldShow: false
|
||||||
|
|
||||||
y: panel.activeWindowVisible ? barBackground.height : barBackground.height - fullHeight
|
Timer {
|
||||||
height: panel.activeWindowVisible ? fullHeight : 1
|
id: visibilityTimer
|
||||||
opacity: panel.activeWindowVisible ? 1 : 0
|
interval: 4000
|
||||||
|
running: false
|
||||||
|
onTriggered: {
|
||||||
|
activeWindowWrapper.shouldShow = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: ToplevelManager
|
||||||
|
function onActiveToplevelChanged() {
|
||||||
|
if (ToplevelManager.activeToplevel?.appId) {
|
||||||
|
activeWindowWrapper.shouldShow = true
|
||||||
|
visibilityTimer.restart()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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
|
clip: true
|
||||||
|
|
||||||
function getIcon() {
|
function getIcon() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue