mirror of
https://gitgud.io/wackyideas/aerothemeplasma.git
synced 2026-10-20 22:04:23 +00:00
Compare commits
4 commits
9bae8f7375
...
9310b25feb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9310b25feb | ||
|
|
525ca736bc | ||
|
|
9cdbcfbda6 | ||
|
|
84a8eb8b50 |
4 changed files with 31 additions and 2 deletions
0
plasma/plasmoids/io.gitgud.wackyideas.SevenStart/contents/ui/FavoritesView.qml
Executable file → Normal file
0
plasma/plasmoids/io.gitgud.wackyideas.SevenStart/contents/ui/FavoritesView.qml
Executable file → Normal file
2
plasma/plasmoids/io.gitgud.wackyideas.SevenStart/contents/ui/MenuRepresentation.qml
Executable file → Normal file
2
plasma/plasmoids/io.gitgud.wackyideas.SevenStart/contents/ui/MenuRepresentation.qml
Executable file → Normal file
|
|
@ -218,7 +218,7 @@ PlasmaCore.Dialog {
|
||||||
|
|
||||||
Timer { // Janky wayland problems require janky solutions
|
Timer { // Janky wayland problems require janky solutions
|
||||||
id: wayland_fix
|
id: wayland_fix
|
||||||
interval: 25
|
interval: 50
|
||||||
onTriggered: root.hideOnWindowDeactivate = true;
|
onTriggered: root.hideOnWindowDeactivate = true;
|
||||||
}
|
}
|
||||||
KCoreAddons.KUser { id: kuser } // Used for getting the username and icon.
|
KCoreAddons.KUser { id: kuser } // Used for getting the username and icon.
|
||||||
|
|
|
||||||
9
plasma/plasmoids/io.gitgud.wackyideas.SevenStart/contents/ui/OftenUsedView.qml
Executable file → Normal file
9
plasma/plasmoids/io.gitgud.wackyideas.SevenStart/contents/ui/OftenUsedView.qml
Executable file → Normal file
|
|
@ -99,6 +99,7 @@ Item {
|
||||||
sourceModel: recentUsageModel
|
sourceModel: recentUsageModel
|
||||||
property var favoritesModel: globalFavorites
|
property var favoritesModel: globalFavorites
|
||||||
property int favoritesCount: sourceModel.favoritesModel.count
|
property int favoritesCount: sourceModel.favoritesModel.count
|
||||||
|
property int favoritesFound: 0
|
||||||
onFavoritesCountChanged: Qt.callLater(() => { sourceModel.refresh()});
|
onFavoritesCountChanged: Qt.callLater(() => { sourceModel.refresh()});
|
||||||
onCountChanged: Qt.callLater(() => {
|
onCountChanged: Qt.callLater(() => {
|
||||||
if(count > Plasmoid.configuration.numberRows) sourceModel.refresh();
|
if(count > Plasmoid.configuration.numberRows) sourceModel.refresh();
|
||||||
|
|
@ -107,7 +108,13 @@ Item {
|
||||||
sourceModel.trigger(index, str, ptr);
|
sourceModel.trigger(index, str, ptr);
|
||||||
}
|
}
|
||||||
filterRowCallback: function(source_row, source_parent) {
|
filterRowCallback: function(source_row, source_parent) {
|
||||||
return source_row < Plasmoid.configuration.numberRows// - sourceModel.favoritesModel.count;
|
if(source_row == 0) favoritesFound = 0;
|
||||||
|
const FavoriteIdRole = sourceModel.KItemModels.KRoleNames.role("favoriteId");
|
||||||
|
const favoriteId = sourceModel.data(sourceModel.index(source_row, 0, source_parent), FavoriteIdRole);
|
||||||
|
var hasFavorite = favoritesIds.idList.indexOf(favoriteId) === -1
|
||||||
|
if(!hasFavorite) favoritesFound++;
|
||||||
|
|
||||||
|
return hasFavorite && source_row < (Plasmoid.configuration.numberRows+favoritesFound)// - sourceModel.favoritesModel.count;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
22
plasma/plasmoids/io.gitgud.wackyideas.SevenStart/contents/ui/main.qml
Executable file → Normal file
22
plasma/plasmoids/io.gitgud.wackyideas.SevenStart/contents/ui/main.qml
Executable file → Normal file
|
|
@ -79,6 +79,28 @@ PlasmoidItem {
|
||||||
id: windowSystem
|
id: windowSystem
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: favoritesIds
|
||||||
|
|
||||||
|
property list<string> idList: {
|
||||||
|
var l = [];
|
||||||
|
for(var i = 0; i < favoritesIds.children.length; i++) {
|
||||||
|
if(favoritesIds.children[i].text) {
|
||||||
|
l.push(favoritesIds.children[i].text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return l;
|
||||||
|
}
|
||||||
|
|
||||||
|
Repeater {
|
||||||
|
model: globalFavorites
|
||||||
|
delegate: Item {
|
||||||
|
required property var model
|
||||||
|
property string text: model.favoriteId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Kicker.RecentUsageModel {
|
Kicker.RecentUsageModel {
|
||||||
id: recentUsageModel
|
id: recentUsageModel
|
||||||
favoritesModel: globalFavorites
|
favoritesModel: globalFavorites
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue