Skip to content

Commit

Permalink
Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
micfong-z committed May 18, 2024
1 parent ccce02f commit 6e56846
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions examples/hello.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ struct MyContext {
draggable_tabs: bool,
show_tab_name_on_hover: bool,
allowed_splits: AllowedSplits,
show_window_close: bool,
show_window_collapse: bool,
show_leaf_close_all: bool,
show_leaf_collapse: bool,
}

struct MyApp {
Expand Down Expand Up @@ -156,10 +156,13 @@ impl MyContext {
ui.checkbox(&mut self.show_add_buttons, "Show add buttons");
ui.checkbox(&mut self.draggable_tabs, "Draggable tabs");
ui.checkbox(&mut self.show_tab_name_on_hover, "Show tab name on hover");
ui.checkbox(&mut self.show_window_close, "Show close button on windows");
ui.checkbox(
&mut self.show_window_collapse,
"Show collaspse button on windows",
&mut self.show_leaf_close_all,
"Show close all button on tab bars",
);
ui.checkbox(
&mut self.show_leaf_collapse,
"Show collaspse button on tab bars",
);
ComboBox::new("cbox:allowed_splits", "Split direction(s)")
.selected_text(format!("{:?}", self.allowed_splits))
Expand Down Expand Up @@ -540,8 +543,8 @@ impl Default for MyApp {
style: None,
open_tabs,

show_window_close: true,
show_window_collapse: true,
show_leaf_close_all: true,
show_leaf_collapse: true,
show_close_buttons: true,
show_add_buttons: false,
draggable_tabs: true,
Expand Down Expand Up @@ -599,8 +602,8 @@ impl eframe::App for MyApp {
.draggable_tabs(self.context.draggable_tabs)
.show_tab_name_on_hover(self.context.show_tab_name_on_hover)
.allowed_splits(self.context.allowed_splits)
.show_window_close_buttons(self.context.show_window_close)
.show_window_collapse_buttons(self.context.show_window_collapse)
.show_leaf_close_all_buttons(self.context.show_leaf_close_all)
.show_leaf_collapse_buttons(self.context.show_leaf_collapse)
.show_inside(ui, &mut self.context);
});
}
Expand Down

0 comments on commit 6e56846

Please sign in to comment.