39 lines
1.5 KiB
Diff
39 lines
1.5 KiB
Diff
From 5301b211fc87f1b2253e87da61ff82618be9e899 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Niccol=C3=B2=20Venerandi?= <niccolo@venerandi.com>
|
|
Date: Thu, 5 Dec 2024 16:12:58 +0100
|
|
Subject: [PATCH] Only return valid task item size if task manager has been
|
|
resized to fit panel
|
|
|
|
Previously the task manager would briefly have null width and height, before
|
|
being resized to fit the panel. However, the "preferredMaxWidth" for tasks
|
|
would still be positive, as it adds margins to it, and tasks would then
|
|
assume a positive width. When the proper values are set, this casuses
|
|
an extra resize animation.
|
|
|
|
CCBUG:447476
|
|
---
|
|
.../taskmanager/package/contents/ui/code/layoutmetrics.js | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
diff --git a/applets/taskmanager/package/contents/ui/code/layoutmetrics.js b/applets/taskmanager/package/contents/ui/code/layoutmetrics.js
|
|
index c7f11c99a6..895cc725d2 100644
|
|
--- a/applets/taskmanager/package/contents/ui/code/layoutmetrics.js
|
|
+++ b/applets/taskmanager/package/contents/ui/code/layoutmetrics.js
|
|
@@ -63,8 +63,14 @@ function preferredMinWidth() {
|
|
function preferredMaxWidth() {
|
|
if (tasks.iconsOnly) {
|
|
if (tasks.vertical) {
|
|
+ if (tasks.width === 0) {
|
|
+ return 0
|
|
+ }
|
|
return tasks.width + verticalMargins();
|
|
} else {
|
|
+ if (tasks.height === 0) {
|
|
+ return 0
|
|
+ }
|
|
return tasks.height + horizontalMargins();
|
|
}
|
|
}
|
|
--
|
|
GitLab
|
|
|