Skip to content

Commit

Permalink
apprt/gtk: color popovers when window-theme=ghostty (#3569)
Browse files Browse the repository at this point in the history
This looks better than the regular dark color. It also happens to match
what Ptyxis does. It does not support non-libadwaita builds.

Before:

![image](https://github.com/user-attachments/assets/8c400bdf-05b3-4629-925d-fd8ce9554ae7)

After:

![image](https://github.com/user-attachments/assets/d958eb6a-102d-4d91-970b-fcaca7f2386c)

It will look even better whenever we fix the separator colors 😄
  • Loading branch information
mitchellh authored Dec 27, 2024
2 parents 8111f5b + bf46ab8 commit bee2188
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/apprt/gtk/App.zig
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,8 @@ fn loadRuntimeCss(
\\ --headerbar-fg-color: rgb({d},{d},{d});
\\ --headerbar-bg-color: rgb({d},{d},{d});
\\ --headerbar-backdrop-color: oklab(from var(--headerbar-bg-color) calc(l * 0.9) a b / alpha);
\\ --popover-fg-color: rgb({d},{d},{d});
\\ --popover-bg-color: rgb({d},{d},{d});
\\}}
\\windowhandle {{
\\ background-color: var(--headerbar-bg-color);
Expand All @@ -1003,6 +1005,12 @@ fn loadRuntimeCss(
headerbar_background.r,
headerbar_background.g,
headerbar_background.b,
headerbar_foreground.r,
headerbar_foreground.g,
headerbar_foreground.b,
headerbar_background.r,
headerbar_background.g,
headerbar_background.b,
}),
else => {},
}
Expand Down

0 comments on commit bee2188

Please sign in to comment.