Skip to content
Snippets Groups Projects
Commit 0f04fea7 authored by Federico Lolli's avatar Federico Lolli
Browse files

ValveControl: removed valve visual interaction on keypress

parent 97230881
Branches SFT-20250417
No related tags found
1 merge request!17Sync SFT-tested branch
...@@ -402,12 +402,9 @@ impl ValveControlPane { ...@@ -402,12 +402,9 @@ impl ValveControlPane {
.sense(Sense::click()), .sense(Sense::click()),
|ui| { |ui| {
let response = ui.response(); let response = ui.response();
let shortcut_key_is_down = ui.ctx().input(|input| input.key_down(shortcut_key));
let visuals = ui.style().interact(&response); let visuals = ui.style().interact(&response);
let (fill_color, btn_fill_color, stroke) = if response.clicked() let (fill_color, btn_fill_color, stroke) = if response.clicked() {
|| shortcut_key_is_down && self.valve_view.is_none()
{
let visuals = ui.visuals().widgets.active; let visuals = ui.visuals().widgets.active;
(visuals.bg_fill, visuals.bg_fill, visuals.bg_stroke) (visuals.bg_fill, visuals.bg_fill, visuals.bg_stroke)
} else if response.hovered() { } else if response.hovered() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment