Possibly fix sizing issue

This commit is contained in:
2025-10-14 00:01:52 -03:00
parent 70a7b6c45b
commit 6e4d43b206
3 changed files with 132 additions and 141 deletions

View File

@@ -36,7 +36,7 @@ PanelWindow {
Rectangle {
id: notifWindow
anchors.centerIn:parent
anchors.centerIn: parent
implicitHeight: 300
implicitWidth: listview.contentWidth
@@ -51,32 +51,35 @@ PanelWindow {
spacing: 5
orientation: ListView.Horizontal
focus:true
highlight: Rectangle { color: "black"; radius: 5 }
focus: true
highlight: Rectangle {
color: "black"
radius: 5
}
highlightFollowsCurrentItem: true
keyNavigationEnabled: false
Keys.onPressed: (event) => {
Keys.onPressed: event => {
switch (event.key) {
case Qt.Key_L: // move down
case Qt.Key_D:
if (currentIndex < count - 1)
currentIndex++
event.accepted = true
break
case Qt.Key_H: // move up
case Qt.Key_A:
if (currentIndex > 0)
currentIndex--
event.accepted = true
break
case Qt.Key_Return:
currentItem.activate()
event.accepted = true
break
case Qt.Key_Escape:
root.clear()
break
case Qt.Key_L: // move down
case Qt.Key_D:
if (currentIndex < count - 1)
currentIndex++;
event.accepted = true;
break;
case Qt.Key_H: // move up
case Qt.Key_A:
if (currentIndex > 0)
currentIndex--;
event.accepted = true;
break;
case Qt.Key_Return:
currentItem.activate();
event.accepted = true;
break;
case Qt.Key_Escape:
root.clear();
break;
}
}
@@ -91,30 +94,34 @@ PanelWindow {
color: "transparent"
function activate() {
modelData.topLevel.wayland.activate()
root.clear()
modelData.topLevel.wayland.activate();
root.clear();
}
MouseArea {
anchors.fill: parent
onClicked: activate()
onClicked: parent.activate()
}
ScreencopyView {
anchors.fill: parent
live: true
captureSource: modelData.topLevel.wayland
captureSource: parent.modelData.topLevel.wayland
}
IconImage {
anchors.bottom: parent.bottom
property int workspaceId: modelData.topLevel.workspace.id
property var desktopEntry: modelData.desktopEntry
anchors {
bottom: parent.bottom
horizontalCenter: parent.horizontalCenter
}
property int workspaceId: parent.modelData.topLevel.workspace.id
property var desktopEntry: parent.modelData.desktopEntry? parent.modelData.desktopEntry:null
width: 30
height: 30
source: (modelData && desktopEntry.icon) ? Quickshell.iconPath(desktopEntry.icon, 1) : "aaa"
source: (parent.modelData && desktopEntry.icon) ? Quickshell.iconPath(desktopEntry.icon, 1) : "aaa"
}
}
}