improve closable_tabs example
@@ -13,9 +13,11 @@ fn main() {
let mut win = window::Window::default().with_size(800, 600);
let row = group::Flex::default_fill().row();
let mut tabs = group::Tabs::default();
+ tabs.set_tab_align(enums::Align::Right);
+ tabs.handle_overflow(group::TabsOverflow::Compress);
// first tab
{
- let mut col1 = group::Flex::default().with_label("tab1\t\t").column();
+ let mut col1 = group::Flex::default().with_label("\t\ttab1").column();
col1.set_trigger(CallbackTrigger::Closed);
col1.set_callback(tab_close_cb);
// widgets
@@ -25,7 +27,7 @@ fn main() {
// second tab
{
- let mut col2 = group::Flex::default().with_label("tab2\t\t").column();
+ let mut col2 = group::Flex::default().with_label("\t\ttab2").column();
col2.set_trigger(CallbackTrigger::Closed);
col2.set_callback(tab_close_cb);
// widgets
