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

Don't catch clicks and drags on axes

This commit is contained in:
Emil Ernerfeldt
2023-08-14 16:09:52 +02:00
parent a96e503295
commit 3511673e74

View File

@@ -196,8 +196,8 @@ impl<const AXIS: usize> AxisWidget<AXIS> {
impl<const AXIS: usize> Widget for AxisWidget<AXIS> {
fn ui(self, ui: &mut Ui) -> Response {
// --- add label ---
let response = ui.allocate_rect(self.rect, Sense::click_and_drag());
let response = ui.allocate_rect(self.rect, Sense::hover());
if ui.is_rect_visible(response.rect) {
let visuals = ui.style().visuals.clone();
let text = self.hints.label;
@@ -316,6 +316,7 @@ impl<const AXIS: usize> Widget for AxisWidget<AXIS> {
}
}
}
response
}
}