mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
dinamically realloc maxFavoriteCount
This commit is contained in:
parent
e2482a37a9
commit
8df8e2c1ed
2 changed files with 4 additions and 0 deletions
|
|
@ -339,6 +339,7 @@ void ApplicationListModel::setMaxFavoriteCount(int count)
|
|||
for (auto &app : m_applicationList) {
|
||||
if (i >= count && app.location == Favorites) {
|
||||
app.location = Grid;
|
||||
emit dataChanged(index(i, 0), index(i, 0));
|
||||
}
|
||||
++i;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,6 +72,9 @@ Text {
|
|||
}
|
||||
//END functions
|
||||
|
||||
onWidthChanged: plasmoid.nativeInterface.applicationListModel.maxFavoriteCount = Math.floor(Math.min(width, height) / launcher.cellWidth)
|
||||
onHeightChanged: plasmoid.nativeInterface.applicationListModel.maxFavoriteCount = Math.floor(Math.min(width, height) / launcher.cellWidth)
|
||||
|
||||
Timer {
|
||||
id: autoScrollTimer
|
||||
property bool scrollDown: true
|
||||
|
|
|
|||
Loading…
Reference in a new issue