Skip to content

Commit

Permalink
selection panel style
Browse files Browse the repository at this point in the history
  • Loading branch information
surinder83singh committed Sep 12, 2024
1 parent 9f17862 commit ec80c77
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions core/src/egui/selection_panels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,13 @@ impl<Value: PartialEq> SelectionPanel<Value> {
// if !selected && response.hovered() {
// prepared.frame = prepared.frame.stroke(hover_stroke);
// }
let mut stroke = None;
if response.is_pointer_button_down_on() {
let visuals = ui.style().interact(&response);
prepared.frame = prepared.frame.fill(selected_bg).stroke(visuals.bg_stroke);
stroke = Some(visuals.bg_stroke);
}
// let stroke = None;
//if response.is_pointer_button_down_on() {
let visuals = ui.style().interact(&response);
//prepared.frame = prepared.frame.fill(selected_bg);//.stroke(visuals.bg_stroke);
prepared.frame = prepared.frame.fill(visuals.weak_bg_fill);
//stroke = Some(visuals.bg_stroke);
//}

prepared.paint(ui);

Expand All @@ -169,7 +170,7 @@ impl<Value: PartialEq> SelectionPanel<Value> {
response.mark_changed();
}

(response, stroke)
(response, None)
}
}

Expand Down

0 comments on commit ec80c77

Please sign in to comment.