mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 16:56:09 +03:00
Merge pull request #2293 from tristan957/window-color
apprt/gtk: override the top bar colors in libadwaita correctly
This commit is contained in:
@ -443,9 +443,7 @@ fn loadRuntimeCss(config: *const Config, provider: *c.GtkCssProvider) !void {
|
|||||||
\\ opacity: {d:.2};
|
\\ opacity: {d:.2};
|
||||||
\\ background-color: rgb({d},{d},{d});
|
\\ background-color: rgb({d},{d},{d});
|
||||||
\\}}
|
\\}}
|
||||||
\\window.ghostty-theme-inherit headerbar,
|
\\.top-bar {{
|
||||||
\\window.ghostty-theme-inherit toolbarview > revealer > windowhandle,
|
|
||||||
\\window.ghostty-theme-inherit box > tabbar {{
|
|
||||||
\\ background-color: rgb({d},{d},{d});
|
\\ background-color: rgb({d},{d},{d});
|
||||||
\\ color: rgb({d},{d},{d});
|
\\ color: rgb({d},{d},{d});
|
||||||
\\}}
|
\\}}
|
||||||
|
@ -95,11 +95,6 @@ pub fn init(self: *Window, app: *App) !void {
|
|||||||
|
|
||||||
c.gtk_window_set_icon_name(gtk_window, "com.mitchellh.ghostty");
|
c.gtk_window_set_icon_name(gtk_window, "com.mitchellh.ghostty");
|
||||||
|
|
||||||
// Apply class to color headerbar if window-theme is set to `ghostty`.
|
|
||||||
if (app.config.@"window-theme" == .ghostty) {
|
|
||||||
c.gtk_widget_add_css_class(@ptrCast(gtk_window), "ghostty-theme-inherit");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Remove the window's background if any of the widgets need to be transparent
|
// Remove the window's background if any of the widgets need to be transparent
|
||||||
if (app.config.@"background-opacity" < 1) {
|
if (app.config.@"background-opacity" < 1) {
|
||||||
c.gtk_widget_remove_css_class(@ptrCast(window), "background");
|
c.gtk_widget_remove_css_class(@ptrCast(window), "background");
|
||||||
|
Reference in New Issue
Block a user