mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Merge branch 'main' of https://github.com/noctalia-dev/noctalia-shell
This commit is contained in:
+18
-2
@@ -456,6 +456,7 @@ Variants {
|
||||
visible: false
|
||||
opacity: 0
|
||||
scale: 0.85
|
||||
property bool pendingShow: false
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
@@ -511,9 +512,15 @@ Variants {
|
||||
id: contentLoader
|
||||
anchors.fill: background
|
||||
anchors.margins: Style.marginM
|
||||
// Delay activation until background has valid dimensions to avoid negative layout sizes
|
||||
active: background.width > 0 && background.height > 0
|
||||
active: true
|
||||
sourceComponent: panel.verticalMode ? verticalContent : horizontalContent
|
||||
|
||||
onWidthChanged: {
|
||||
if (width > 0 && height > 0 && osdItem.pendingShow) {
|
||||
osdItem.pendingShow = false;
|
||||
osdItem.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
@@ -743,6 +750,14 @@ Variants {
|
||||
function show() {
|
||||
hideTimer.stop();
|
||||
visibilityTimer.stop();
|
||||
|
||||
// Defer show until content layout has valid geometry
|
||||
if (contentLoader.width <= 0 || contentLoader.height <= 0) {
|
||||
pendingShow = true;
|
||||
return;
|
||||
}
|
||||
|
||||
pendingShow = false;
|
||||
osdItem.visible = true;
|
||||
|
||||
Qt.callLater(() => {
|
||||
@@ -764,6 +779,7 @@ Variants {
|
||||
function hideImmediately() {
|
||||
hideTimer.stop();
|
||||
visibilityTimer.stop();
|
||||
pendingShow = false;
|
||||
osdItem.opacity = 0;
|
||||
osdItem.scale = 0.85;
|
||||
osdItem.visible = false;
|
||||
|
||||
Reference in New Issue
Block a user