gtk: tint surfaces off base00 like the shell, not stylix's off-hue base01
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
eca4f6deec
commit
5aea7fab27
1 changed files with 21 additions and 1 deletions
|
|
@ -71,7 +71,15 @@
|
|||
programs.xwayland.enable = true;
|
||||
programs.dconf.enable = true;
|
||||
|
||||
home-manager.users.fred = { config, lib, pkgs, ... }: {
|
||||
home-manager.users.fred = { config, lib, pkgs, ... }: let
|
||||
# Scaling all three channels by the same factor is exactly what
|
||||
# Qt.lighter() does — hue and HSV saturation stay put, only value moves —
|
||||
# so this lands on the same surfaces as quickshell's Theme.base01/base02.
|
||||
# GTK's own shade() can't stand in: it multiplies saturation too.
|
||||
tint = f: let
|
||||
ch = k: toString (builtins.floor (builtins.fromJSON config.lib.stylix.colors."base00-rgb-${k}" * f));
|
||||
in "rgb(${ch "r"}, ${ch "g"}, ${ch "b"})";
|
||||
in {
|
||||
# Stylix's qt target only supports qtct; disable it to silence the warning.
|
||||
stylix.targets.qt.enable = false;
|
||||
# Minimal titlebars — stylix manages the GTK theme; we layer our
|
||||
|
|
@ -89,6 +97,18 @@
|
|||
gtk.gtk3.extraConfig.gtk-application-prefer-dark-theme = true;
|
||||
|
||||
stylix.targets.gtk.extraCss = ''
|
||||
/* Surfaces: one hue, three steps — the same ladder quickshell's Theme
|
||||
uses (settings/quickshell.nix, commit e2c413d). Stylix paints every
|
||||
raised surface with base01/base02, which come straight off the
|
||||
wallpaper and routinely land off-hue: base01 is #3f3fab purple over a
|
||||
slate #1c1f26 desktop, which is why nemo's delete dialog was blue. */
|
||||
@define-color headerbar_bg_color ${tint 1.7};
|
||||
@define-color sidebar_bg_color ${tint 1.7};
|
||||
@define-color card_bg_color ${tint 1.7};
|
||||
@define-color dialog_bg_color ${tint 1.7};
|
||||
@define-color popover_bg_color ${tint 1.7};
|
||||
@define-color scrollbar_outline_color ${tint 2.4};
|
||||
|
||||
headerbar { min-height: 0; padding: 0; margin: 0; }
|
||||
headerbar .title { font-size: 0; }
|
||||
window:backdrop {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue