1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 05:10:03 -04:00

Finish label

This commit is contained in:
Adrien Zianne
2025-10-16 13:22:09 +02:00
parent f66b5b599b
commit e39d8c4345
5 changed files with 35 additions and 26 deletions

View File

@@ -0,0 +1,9 @@
## Button
- If hovering a button add a stroke, the ui shift. Maybe add the option to avoid this resize by making the frame smaller ?
## Label
- I understand checking if a sense has been set by the user, but why check if it's different than hover ? Is it for technical purpose or purely to avoid confusion with a link ?
- Selecting the text while being underlined move the underline

View File

@@ -25,7 +25,7 @@ fn main() -> eframe::Result {
..s.visuals.widgets.inactive
};
s.visuals.widgets.active = WidgetVisuals {
fg_stroke: Stroke::new(1.0, Color32::BLUE),
fg_stroke: Stroke::new(1.0, Color32::LIGHT_BLUE),
..s.visuals.widgets.inactive
};
s.visuals.widgets.hovered = WidgetVisuals {
@@ -63,7 +63,9 @@ fn main() -> eframe::Result {
.color(Color32::KHAKI),
);
ui.add(Label::new("test").sense(Sense::click()))
ui.add(Label::new("interaction click").sense(Sense::click()));
ui.add(Label::new("focusable").sense(Sense::focusable_noninteractive()))
.request_focus();
});
})
}