deepin.dde-shell: fix error with qt 6.8 (#350852)

This commit is contained in:
rewine 2024-10-24 15:32:45 +08:00 committed by GitHub
commit cabaf14d3e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 21 additions and 0 deletions

View File

@ -33,6 +33,7 @@ stdenv.mkDerivation (finalAttrs: {
patches = [
./fix-path-for-nixos.diff
./fix-dock-can-not-show-with-qt6_8.diff
];
postPatch = ''

View File

@ -0,0 +1,20 @@
diff --git a/panels/dock/OverflowContainer.qml b/panels/dock/OverflowContainer.qml
index 74ca966..312f2a0 100644
--- a/panels/dock/OverflowContainer.qml
+++ b/panels/dock/OverflowContainer.qml
@@ -52,13 +52,13 @@ Item {
for (let child of listView.contentItem.visibleChildren) {
width = calculateImplicitWidth(width, child.implicitWidth)
}
- return width
+ return Math.max(width, 1)
}
implicitHeight: {
let height = 0
for (let child of listView.contentItem.visibleChildren) {
height = calculateImplicitHeight(height, child.implicitHeight)
}
- return height
+ return Math.max(height, 1)
}
}