Skip to content

Commit 0e8ab69

Browse files
Alexandre425not-fl3
authored andcommitted
added click intention registration to progress bar
1 parent 7c14b78 commit 0e8ab69

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ui/widgets/progress_bar.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ impl<'a> ProgressBar<'a> {
2828
}
2929

3030
pub fn ui(self, ui: &mut Ui, progress: f32, bar_text: &str) {
31-
let context = ui.get_active_window_context();
31+
let mut context = ui.get_active_window_context();
3232

3333
let size = vec2(
3434
context.window.cursor.area.w - context.style.margin * 3. - context.window.cursor.ident,
@@ -43,6 +43,8 @@ impl<'a> ProgressBar<'a> {
4343
let bar_background = Rect::new(pos.x, pos.y, bar_width, 20.);
4444
let bar_progress = Rect::new(pos.x, pos.y, bar_progress_width, 20.);
4545

46+
context.register_click_intention(bar_background);
47+
4648
// background bar
4749
context.window.painter.draw_rect(
4850
bar_background,

0 commit comments

Comments
 (0)