show x button at left by respecting the env settings

This commit is contained in:
yggverse 2026-03-11 02:48:51 +02:00
parent 0a9b2385aa
commit bf039dd947

View file

@ -14,8 +14,12 @@ impl Tab for TabBar {
fn tab(window_action: &Rc<WindowAction>, view: &TabView) -> Self {
TabBar::builder()
.autohide(false)
.expand_tabs(false)
.end_action_widget(&Button::append(window_action)) // @TODO find solution to append after tabs
.expand_tabs(false)
.inverted(gtk::Settings::default().is_some_and(|s| {
s.gtk_decoration_layout()
.is_some_and(|l| l.starts_with("close"))
})) // show `x` button at left by respecting the env settings
.view(view)
.build()
}