forked from Shinonome/dots-hyprland
waffles: bar: use listview for tasks
This commit is contained in:
@@ -9,8 +9,8 @@ MouseArea {
|
|||||||
id: root
|
id: root
|
||||||
|
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
implicitHeight: row.implicitHeight
|
implicitHeight: appRow.implicitHeight
|
||||||
implicitWidth: row.implicitWidth
|
implicitWidth: appRow.implicitWidth
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
|
||||||
function showPreviewPopup(appEntry, button) {
|
function showPreviewPopup(appEntry, button) {
|
||||||
@@ -21,31 +21,31 @@ MouseArea {
|
|||||||
animation: Looks.transition.move.createObject(this)
|
animation: Looks.transition.move.createObject(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apps row
|
WListView {
|
||||||
RowLayout {
|
id: appRow
|
||||||
id: row
|
|
||||||
anchors {
|
anchors {
|
||||||
top: parent.top
|
top: parent.top
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
}
|
}
|
||||||
|
orientation: Qt.Horizontal
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
implicitWidth: contentWidth
|
||||||
|
clip: true
|
||||||
|
interactive: false
|
||||||
|
// TODO: Include only apps (and windows) in current workspace only | wait, does that even make sense in a Hyprland workflow?
|
||||||
|
model: ScriptModel {
|
||||||
|
objectProp: "appId"
|
||||||
|
values: TaskbarApps.apps.filter(app => app.appId !== "SEPARATOR")
|
||||||
|
}
|
||||||
|
delegate: TaskAppButton {
|
||||||
|
required property var modelData
|
||||||
|
appEntry: modelData
|
||||||
|
|
||||||
Repeater {
|
onHoverPreviewRequested: {
|
||||||
// TODO: Include only apps (and windows) in current workspace only | wait, does that even make sense in a Hyprland workflow?
|
root.showPreviewPopup(appEntry, this);
|
||||||
model: ScriptModel {
|
|
||||||
objectProp: "appId"
|
|
||||||
values: TaskbarApps.apps.filter(app => app.appId !== "SEPARATOR")
|
|
||||||
}
|
}
|
||||||
delegate: TaskAppButton {
|
onHoverPreviewDismissed: {
|
||||||
required property var modelData
|
previewPopup.close();
|
||||||
appEntry: modelData
|
|
||||||
|
|
||||||
onHoverPreviewRequested: {
|
|
||||||
root.showPreviewPopup(appEntry, this)
|
|
||||||
}
|
|
||||||
onHoverPreviewDismissed: {
|
|
||||||
previewPopup.close()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -56,5 +56,4 @@ MouseArea {
|
|||||||
tasksHovered: root.containsMouse
|
tasksHovered: root.containsMouse
|
||||||
anchor.window: root.QsWindow.window
|
anchor.window: root.QsWindow.window
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user