mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Compositor: fix getFocusedWindowTitle. Since active workspace has been implemented.
+ autoformatting
This commit is contained in:
@@ -302,7 +302,9 @@ NPanel {
|
||||
positionViewAtIndex(currentIndex, ListView.Contain)
|
||||
}
|
||||
}
|
||||
onModelChanged: {}
|
||||
onModelChanged: {
|
||||
|
||||
}
|
||||
|
||||
delegate: Rectangle {
|
||||
id: entry
|
||||
@@ -313,11 +315,14 @@ NPanel {
|
||||
|
||||
// Pin helpers
|
||||
function togglePin(appId) {
|
||||
if (!appId) return
|
||||
if (!appId)
|
||||
return
|
||||
let arr = (Settings.data.dock.pinnedApps || []).slice()
|
||||
const idx = arr.indexOf(appId)
|
||||
if (idx >= 0) arr.splice(idx, 1)
|
||||
else arr.push(appId)
|
||||
if (idx >= 0)
|
||||
arr.splice(idx, 1)
|
||||
else
|
||||
arr.push(appId)
|
||||
Settings.data.dock.pinnedApps = arr
|
||||
}
|
||||
|
||||
@@ -506,13 +511,13 @@ NPanel {
|
||||
z: -1
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: (mouse) => {
|
||||
if (mouse.button === Qt.LeftButton) {
|
||||
selectedIndex = index
|
||||
ui.activate()
|
||||
mouse.accepted = true
|
||||
}
|
||||
}
|
||||
onClicked: mouse => {
|
||||
if (mouse.button === Qt.LeftButton) {
|
||||
selectedIndex = index
|
||||
ui.activate()
|
||||
mouse.accepted = true
|
||||
}
|
||||
}
|
||||
acceptedButtons: Qt.LeftButton
|
||||
}
|
||||
}
|
||||
@@ -537,4 +542,4 @@ NPanel {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +76,8 @@ Item {
|
||||
// Favorites first
|
||||
const aFav = favoriteApps.includes(getAppKey(a))
|
||||
const bFav = favoriteApps.includes(getAppKey(b))
|
||||
if (aFav !== bFav) return aFav ? -1 : 1
|
||||
if (aFav !== bFav)
|
||||
return aFav ? -1 : 1
|
||||
const ua = getUsageCount(a)
|
||||
const ub = getUsageCount(b)
|
||||
if (ub !== ua)
|
||||
@@ -87,7 +88,8 @@ Item {
|
||||
sorted = entries.slice().sort((a, b) => {
|
||||
const aFav = favoriteApps.includes(getAppKey(a))
|
||||
const bFav = favoriteApps.includes(getAppKey(b))
|
||||
if (aFav !== bFav) return aFav ? -1 : 1
|
||||
if (aFav !== bFav)
|
||||
return aFav ? -1 : 1
|
||||
return (a.name || "").toLowerCase().localeCompare((b.name || "").toLowerCase())
|
||||
})
|
||||
}
|
||||
@@ -108,8 +110,10 @@ Item {
|
||||
const nonFav = []
|
||||
for (const r of fuzzyResults) {
|
||||
const app = r.obj
|
||||
if (favoriteApps.includes(getAppKey(app))) fav.push(r)
|
||||
else nonFav.push(r)
|
||||
if (favoriteApps.includes(getAppKey(app)))
|
||||
fav.push(r)
|
||||
else
|
||||
nonFav.push(r)
|
||||
}
|
||||
return fav.concat(nonFav).map(result => createResultEntry(result.obj))
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user