forked from Shinonome/dots-hyprland
waffles: taskview: fix sizes not getting updated
This commit is contained in:
@@ -100,26 +100,34 @@ Rectangle {
|
|||||||
|
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
model: IndexModel {
|
model: ScriptModel {
|
||||||
count: arrangedToplevels.length
|
values: root.arrangedToplevels
|
||||||
}
|
}
|
||||||
delegate: RowLayout {
|
delegate: RowLayout {
|
||||||
id: clientRow
|
id: clientRow
|
||||||
required property int index
|
required property var modelData
|
||||||
spacing: root.spacing
|
spacing: root.spacing
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
model: IndexModel {
|
model: ScriptModel {
|
||||||
count: root.arrangedToplevels[clientRow.index].length
|
values: clientRow.modelData
|
||||||
}
|
}
|
||||||
delegate: TaskViewWindow {
|
delegate: Item {
|
||||||
id: client
|
id: clientGridArea
|
||||||
required property int index
|
required property int index
|
||||||
Layout.alignment: Qt.AlignTop
|
required property var modelData
|
||||||
maxHeight: root.maxWindowHeight
|
implicitWidth: windowItem.implicitWidth
|
||||||
maxWidth: root.maxWindowWidth
|
implicitHeight: windowItem.implicitHeight
|
||||||
toplevel: root.arrangedToplevels[clientRow.index][index]
|
|
||||||
|
TaskViewWindow {
|
||||||
|
id: windowItem
|
||||||
|
z: 9999
|
||||||
|
Layout.alignment: Qt.AlignTop
|
||||||
|
maxHeight: root.maxWindowHeight
|
||||||
|
maxWidth: root.maxWindowWidth
|
||||||
|
toplevel: clientGridArea.modelData
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ WMouseAreaButton {
|
|||||||
required property int maxWidth
|
required property int maxWidth
|
||||||
|
|
||||||
property var hyprlandClient: HyprlandData.clientForToplevel(root.toplevel)
|
property var hyprlandClient: HyprlandData.clientForToplevel(root.toplevel)
|
||||||
|
property string address: hyprlandClient?.address
|
||||||
|
|
||||||
property string iconName: AppSearch.guessIcon(hyprlandClient?.class)
|
property string iconName: AppSearch.guessIcon(hyprlandClient?.class)
|
||||||
|
|
||||||
@@ -35,9 +36,9 @@ WMouseAreaButton {
|
|||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
layer.effect: OpacityMask {
|
layer.effect: OpacityMask {
|
||||||
maskSource: Rectangle {
|
maskSource: Rectangle {
|
||||||
width: root.width
|
width: root.background.width
|
||||||
height: root.height
|
height: root.background.height
|
||||||
radius: root.radius
|
radius: root.background.radius
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
scale: (root.pressedButtons & Qt.LeftButton) ? 0.95 : 1
|
scale: (root.pressedButtons & Qt.LeftButton) ? 0.95 : 1
|
||||||
|
|||||||
@@ -18,14 +18,14 @@ WMouseAreaButton {
|
|||||||
property bool newWorkspace: false
|
property bool newWorkspace: false
|
||||||
|
|
||||||
readonly property bool isActiveWorkspace: HyprlandData.activeWorkspace?.id === root.workspace
|
readonly property bool isActiveWorkspace: HyprlandData.activeWorkspace?.id === root.workspace
|
||||||
readonly property real screenWidth: QsWindow.window.width
|
readonly property real screenWidth: QsWindow.window?.width ?? 0
|
||||||
readonly property real screenHeight: QsWindow.window.height
|
readonly property real screenHeight: QsWindow.window?.height ?? 0
|
||||||
readonly property real screenAspectRatio: screenWidth / screenHeight
|
readonly property real screenAspectRatio: screenWidth / screenHeight
|
||||||
readonly property real windowScale: wallpaperHeight / screenHeight
|
readonly property real windowScale: wallpaperHeight / screenHeight
|
||||||
|
|
||||||
property real wallpaperHeight: 124
|
property real wallpaperHeight: 124
|
||||||
|
|
||||||
height: ListView.view.height
|
height: ListView.view?.height ?? 100
|
||||||
implicitWidth: 244 // for now
|
implicitWidth: 244 // for now
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|||||||
Reference in New Issue
Block a user