Skip to content

Commit

Permalink
Fixed bug where icons show on slider menu (#528)
Browse files Browse the repository at this point in the history
* Fixed bug by hiding icon for buttons when rendering Slider Menu

* Fixed formatting

* Fixed build
  • Loading branch information
xhudaman authored May 9, 2023
1 parent dbfa60b commit b34fc6b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/training/ui/menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,12 @@ unsafe fn render_slider_page(app: &App, root_pane: &mut Pane) {

min_value_text.set_visible(true);
max_value_text.set_visible(true);

// Hide the Icon pane for MinButton and MaxButton
[min_button, max_button].iter().for_each(|button| {
let icon = button.find_pane_by_name_recursive("Icon").unwrap();
icon.set_visible(false);
});
}

pub unsafe fn draw(root_pane: &mut Pane) {
Expand Down

0 comments on commit b34fc6b

Please sign in to comment.