mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-03 10:14:45 +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) {
|
for (auto &app : m_applicationList) {
|
||||||
if (i >= count && app.location == Favorites) {
|
if (i >= count && app.location == Favorites) {
|
||||||
app.location = Grid;
|
app.location = Grid;
|
||||||
|
emit dataChanged(index(i, 0), index(i, 0));
|
||||||
}
|
}
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,9 @@ Text {
|
||||||
}
|
}
|
||||||
//END functions
|
//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 {
|
Timer {
|
||||||
id: autoScrollTimer
|
id: autoScrollTimer
|
||||||
property bool scrollDown: true
|
property bool scrollDown: true
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue