Skip to content

Commit

Permalink
PlannerGUI - Fix some indentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
hydra committed Jan 28, 2025
1 parent 558f0dd commit ac3b4fc
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions crates/planner_gui/src/widgets/tab_bar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,20 +176,20 @@ impl<TK: Tab<TKM, TKA> + Send + Clone + 'static, TKM: Send + Debug + 'static, TK
.pad_by(Edges::default().with_horizontal(Px::new(3)).with_top(Px::new(3)).with_bottom(Px::new(0)))
.and(
self.active.clone().switcher(move |active, _|{
match active {
Some(active_tab_key) if active_tab_key.eq(&tab_key) => {
Space::default()
.height(Px::new(3))
.with_dynamic(&WidgetBackground, TabBarActiveTabMarker)
.make_widget()

}
_ => {
Space::default()
.height(Px::new(3))
.make_widget()
}
}
match active {
Some(active_tab_key) if active_tab_key.eq(&tab_key) => {
Space::default()
.height(Px::new(3))
.with_dynamic(&WidgetBackground, TabBarActiveTabMarker)
.make_widget()
}
_ => {
Space::default()
.height(Px::new(3))
.make_widget()
}
}
})
)
.into_rows()
Expand Down Expand Up @@ -435,20 +435,20 @@ impl MakeWidget for TabBarWidget {
let tab_bar_switcher = self.tab_buttons.switcher({

move |tab_buttons, _|{
if tab_buttons.is_empty() {
Space::clear().make_widget()
} else {
let tab_bar = [
Stack::new(Orientation::Column, dyn_tab_buttons.clone())
.make_widget(),
Expand::empty()
.make_widget(),
]
.into_columns()
.contain_level(ContainerLevel::High);

tab_bar.make_widget()
}
if tab_buttons.is_empty() {
Space::clear().make_widget()
} else {
let tab_bar = [
Stack::new(Orientation::Column, dyn_tab_buttons.clone())
.make_widget(),
Expand::empty()
.make_widget(),
]
.into_columns()
.contain_level(ContainerLevel::High);
tab_bar.make_widget()
}
}
});

Expand Down

0 comments on commit ac3b4fc

Please sign in to comment.