From d1fdf67720bb412d1a6ec060a1fb087e8874708b Mon Sep 17 00:00:00 2001 From: Fushan Wen Date: Mon, 20 Jun 2022 00:31:01 +0800 Subject: [PATCH] applets/systemtray: use the minimum size to calculate `cellWidth` hiddenTasksView.availableWidth sometimes can be smaller than popup.Layout.minimumWidth. --- applets/systemtray/package/contents/ui/HiddenItemsView.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applets/systemtray/package/contents/ui/HiddenItemsView.qml b/applets/systemtray/package/contents/ui/HiddenItemsView.qml index 64ce2756a..08e6c2ef2 100644 --- a/applets/systemtray/package/contents/ui/HiddenItemsView.qml +++ b/applets/systemtray/package/contents/ui/HiddenItemsView.qml @@ -36,7 +36,7 @@ PlasmaComponents3.ScrollView { readonly property int minimumRows: 4 readonly property int minimumColumns: 4 - cellWidth: Math.floor(popup.Layout.minimumWidth / minimumRows) + cellWidth: Math.floor(Math.min(hiddenTasksView.availableWidth, popup.Layout.minimumWidth) / minimumRows) cellHeight: Math.floor(popup.Layout.minimumHeight / minimumColumns) currentIndex: -1