From 228561d4c93ee68a80314221ad0b72aa8a60edab Mon Sep 17 00:00:00 2001 From: Nathaniel Ledford Date: Fri, 9 Oct 2026 15:04:29 -0400 Subject: [PATCH] LRC-LIB-KEYWORDS: idle controls in the Keyword List say nothing With nothing selected a tick box still offered "Add to Selected Photos", and while a filter holds the levels open the triangle lit up on hover though a click does nothing. Neither does now. Co-Authored-By: Claude Opus 5.5 --- crates/ui-egui/src/panels/keyword_list.rs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/crates/ui-egui/src/panels/keyword_list.rs b/crates/ui-egui/src/panels/keyword_list.rs index 46da5b028..432f75c98 100644 --- a/crates/ui-egui/src/panels/keyword_list.rs +++ b/crates/ui-egui/src/panels/keyword_list.rs @@ -186,7 +186,9 @@ fn row(app: &mut LightcraftApp, ui: &mut egui::Ui, r: &Row, selection: &[PhotoId } else { vec![c + vec2(-2.0, -4.0), c + vec2(3.0, 0.0), c + vec2(-2.0, 4.0)] }; - ui.painter().add(egui::Shape::convex_polygon(pts, if tr.hovered() { t.text } else { t.text_dim }, Stroke::NONE)); + // while a filter opens the levels the triangle does nothing: it doesn't light up either + let lit = tr.hovered() && can_fold; + ui.painter().add(egui::Shape::convex_polygon(pts, if lit { t.text } else { t.text_dim }, Stroke::NONE)); if tr.clicked() && can_fold { let key = r.path.to_lowercase(); if r.open { @@ -219,10 +221,15 @@ fn row(app: &mut LightcraftApp, ui: &mut egui::Ui, r: &Row, selection: &[PhotoId ui.painter().rect_stroke(boxr, 2.0, Stroke::new(1.0, edge), StrokeKind::Inside); } } - let tb = tb.on_hover_text(crate::i18n::tr(match state { - Tick::All => "Remove from Selected Photos", - _ => "Add to Selected Photos", - })); + // (with nothing selected it does nothing, and says nothing) + let tb = if on { + tb.on_hover_text(crate::i18n::tr(match state { + Tick::All => "Remove from Selected Photos", + _ => "Add to Selected Photos", + })) + } else { + tb + }; if tb.clicked() { let key = if state == Tick::All { "removeKeywords" } else { "addKeywords" }; let _ = app.run("photo.setMeta", json!({key: [r.path]}));