applets/systemtray: use the minimum size to calculate `cellWidth`

hiddenTasksView.availableWidth sometimes can be smaller than
popup.Layout.minimumWidth.
wilder-5.26
Fushan Wen 4 years ago
parent fb7f201f9d
commit d1fdf67720
No known key found for this signature in database
GPG Key ID: 2E48D1487C91DCAA
  1. 2
      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

Loading…
Cancel
Save