From e91bc46a0f5c786624ed80c3c331c18b745128fe Mon Sep 17 00:00:00 2001 From: Mershl Date: Thu, 22 Feb 2024 21:18:02 +0100 Subject: [PATCH] fix: avoid selectable labels for dynamic info (#270) Make InfoRow labels not selectable by default. Allow an override of the attribute in the template (for Software tab for example). Motivation: GTK will place the blinking cursor on the first selectable label of a view/tab. Placing the cursor on dynamic info like the current GPU Core Clock will show the cursor jumping around as the number of digits change a lot (best seen in the OC tab). As the selection of a label is discarded on update of a label (which happens multiple times a second for a lot of the OC and Thermals values) the cursor is just a visual distraction rather than a feature. --- lact-gui/src/app/info_row.rs | 2 ++ lact-gui/ui/info_row.blp | 2 +- lact-gui/ui/software_page.blp | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lact-gui/src/app/info_row.rs b/lact-gui/src/app/info_row.rs index 426c525..748c6ba 100644 --- a/lact-gui/src/app/info_row.rs +++ b/lact-gui/src/app/info_row.rs @@ -37,6 +37,8 @@ mod imp { name: RefCell, #[property(get, set)] value: RefCell, + #[property(get, set)] + selectable: RefCell, #[template_child] value_label: TemplateChild