Make floating picker open state imperative

This commit is contained in:
2026-09-06 00:27:43 +01:00
parent b57b6286e2
commit 0f308bd59f
2 changed files with 14 additions and 6 deletions
+13 -5
View File
@@ -61,9 +61,13 @@ Item {
// ------------------------------------------------------------ lifecycle // ------------------------------------------------------------ lifecycle
function open() { function open() {
// Always show the picker first. Dependency checks are asynchronous and // Keep the layer mapped and switch its content/input on explicitly.
// only update the in-window banner; they never block or replace the UI. // A visibility binding across the host Loader -> PanelWindow boundary can
// remain stale after plugin reloads on current Quickshell.
root.opened = true root.opened = true
card.visible = true
panelInputRegion.width = panel.width
panelInputRegion.height = panel.height
root.depsChecked = false root.depsChecked = false
root.checkDeps() root.checkDeps()
root.filterText = "" root.filterText = ""
@@ -77,6 +81,9 @@ Item {
function close() { function close() {
root.cancelClearHistory() root.cancelClearHistory()
card.visible = false
panelInputRegion.width = 0
panelInputRegion.height = 0
root.opened = false root.opened = false
} }
@@ -503,13 +510,14 @@ Item {
WlrLayershell.keyboardFocus: root.opened ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None WlrLayershell.keyboardFocus: root.opened ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None
exclusionMode: ExclusionMode.Ignore exclusionMode: ExclusionMode.Ignore
mask: Region { mask: Region {
width: root.opened ? panel.width : 0 id: panelInputRegion
height: root.opened ? panel.height : 0 width: 0
height: 0
} }
BorderSurface { BorderSurface {
id: card id: card
visible: root.opened visible: false
anchors.fill: parent anchors.fill: parent
radius: root.cornerRadius radius: root.cornerRadius
color: root.background color: root.background
+1 -1
View File
@@ -2,7 +2,7 @@
"schemaVersion": 1, "schemaVersion": 1,
"id": "alanfortlink.clipboard", "id": "alanfortlink.clipboard",
"name": "Clipboard History", "name": "Clipboard History",
"version": "1.0.2", "version": "1.0.3",
"author": "alanfortlink", "author": "alanfortlink",
"description": "Raycast-style clipboard history: fuzzy search over content, type, app and date, with rich per-type previews", "description": "Raycast-style clipboard history: fuzzy search over content, type, app and date, with rich per-type previews",
"kinds": [ "kinds": [