gtk: respect window-theme=ghostty when gtk-titlebar=false

This commit is contained in:
Paul Berg
2024-09-18 13:52:44 +02:00
parent 0109cb5ba4
commit 990bcb9573
2 changed files with 3 additions and 1 deletions

View File

@ -434,7 +434,8 @@ fn loadRuntimeCss(config: *const Config, provider: *c.GtkCssProvider) !void {
\\ background-color: rgb({d},{d},{d});
\\}}
\\window.ghostty-theme-inherit headerbar,
\\window.ghostty-theme-inherit toolbarview > revealer > windowhandle {{
\\window.ghostty-theme-inherit toolbarview > revealer > windowhandle,
\\window.ghostty-theme-inherit box > tabbar {{
\\ background-color: rgb({d},{d},{d});
\\ color: rgb({d},{d},{d});
\\}}

View File

@ -299,6 +299,7 @@ pub fn init(self: *Window, app: *App) !void {
// In earlier adwaita versions, we need to add the tabbar manually since we do not use
// an AdwToolbarView.
const tab_bar: *c.AdwTabBar = c.adw_tab_bar_new().?;
c.gtk_widget_add_css_class(@ptrCast(@alignCast(tab_bar)), "inline");
switch (app.config.@"gtk-tabs-location") {
// left and right is not supported in libadwaita.
.top,