mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 22:53:14 -04:00
Fix for highlighting SelectableLabel
This commit is contained in:
@@ -594,7 +594,7 @@ impl Widgets {
|
||||
&self.noninteractive
|
||||
} else if response.is_pointer_button_down_on() || response.has_focus() {
|
||||
&self.active
|
||||
} else if response.hovered() | response.highlighted() {
|
||||
} else if response.hovered() || response.highlighted() {
|
||||
&self.hovered
|
||||
} else {
|
||||
&self.inactive
|
||||
|
||||
@@ -61,7 +61,7 @@ impl Widget for SelectableLabel {
|
||||
|
||||
let visuals = ui.style().interact_selectable(&response, selected);
|
||||
|
||||
if selected || response.hovered() || response.has_focus() {
|
||||
if selected || response.hovered() || response.highlighted() || response.has_focus() {
|
||||
let rect = rect.expand(visuals.expansion);
|
||||
|
||||
ui.painter().rect(
|
||||
|
||||
Reference in New Issue
Block a user