feat: make right bar side dependant on devices

This commit is contained in:
johannes committed 2026-09-21 16:16:24 +02:00
1 parent 9787f52c14
commit 6c53da0a5c
13 files changed
+630 -17

No files matched your search

@@ -25,6 +25,7 @@ PanelWindow {
WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive
MouseArea {
id: backdrop
anchors.fill: parent
onClicked: rootState.clipboardManagerOpen = false
}
@@ -61,10 +62,13 @@ PanelWindow {
clip: true
color: Theme.colors.surface
radius: Theme.geometry.radius
border.width: 1
border.color: searchInput.activeFocus ? Theme.colors.primary : Theme.colors.border
Behavior on height { NumberAnimation { duration: Theme.animation.durationFast } }
Behavior on opacity { NumberAnimation { duration: Theme.animation.durationFast } }
Behavior on border.color { ColorAnimation { duration: Theme.animation.durationFast } }
TextInput {
id: searchInput
anchors.fill: parent
@@ -165,12 +169,27 @@ PanelWindow {
}
MouseArea {
id: clipItemMouse
anchors.fill: parent
hoverEnabled: true
acceptedButtons: Qt.LeftButton | Qt.RightButton
onEntered: clipList.currentIndex = index
onClicked: {
onClicked: (mouse) => {
clipList.currentIndex = index;
copyToClipboard(model.id);
if (mouse.button === Qt.RightButton) {
let pos = clipItemMouse.mapToItem(backdrop, mouse.x, mouse.y);
let itemId = model.id;
let rawLine = model.rawLine;
let itemIndex = index;
contextMenu.model = [
{ label: "Copy", icon: "⧉", action: function() { copyToClipboard(itemId); } },
{ separator: true },
{ label: "Delete", icon: "🗑", destructive: true, action: function() { deleteFromClipboard(itemId, rawLine, itemIndex); } }
];
contextMenu.openAt(pos.x, pos.y);
} else {
copyToClipboard(model.id);
}
}
}
}
@@ -178,6 +197,17 @@ PanelWindow {
}
}
MouseArea {
anchors.fill: parent
visible: contextMenu.visible
z: 999
onClicked: contextMenu.close()
}
ContextMenu {
id: contextMenu
}
Process {
id: loadProcess
command: [