noctalia
This commit is contained in:
@@ -0,0 +1,119 @@
|
||||
@define-color fg-color {{colors.on_surface.default.hex}};
|
||||
@define-color bg-color {{colors.surface.default.hex}};
|
||||
@define-color border-color {{colors.outline.default.hex}};
|
||||
@define-color dimmed-fg-color {{colors.on_surface_variant.default.hex}};
|
||||
@define-color disabled-fg-color {{colors.outline_variant.default.hex}};
|
||||
@define-color disabled-button-color {{colors.surface_container_low.default.hex}};
|
||||
@define-color hover-color {{colors.surface_container_high.default.hex}};
|
||||
@define-color widget-bg-color {{colors.surface_container.default.hex}};
|
||||
@define-color selected-color {{colors.primary.default.hex}};
|
||||
@define-color extreme-bg-color {{colors.surface_container_low.default.hex}};
|
||||
@define-color extreme-selected-color {{colors.primary.default.hex}};
|
||||
@define-color strong-border-color {{colors.outline.default.hex}};
|
||||
@define-color stronger-border-color {{colors.outline.default.hex}};
|
||||
@define-color edge-border-color {{colors.outline_variant.default.hex}};
|
||||
@define-color scrollbar-slider-color {{colors.outline.default.hex}};
|
||||
@define-color scrollbar-trough-color {{colors.surface_container.default.hex}};
|
||||
@define-color ruler-color {{colors.outline_variant.default.rgba | set_alpha: 0.3}};
|
||||
|
||||
/* Standard GTK/Adwaita variable names, not GIMP's own. Some widgets
|
||||
(confirmed: the Preferences page title bar, per GIMP's own source
|
||||
comment admitting it "doesn't have any more specific way to style it")
|
||||
fall back to these instead of GIMP's custom palette above. Without
|
||||
this they'd stay unthemed since the system gtk.css never loads inside
|
||||
a Flatpak sandbox. */
|
||||
@define-color theme_bg_color {{colors.surface.default.hex}};
|
||||
@define-color theme_fg_color {{colors.on_surface.default.hex}};
|
||||
@define-color theme_base_color {{colors.surface_container.default.hex}};
|
||||
@define-color theme_text_color {{colors.on_surface.default.hex}};
|
||||
@define-color theme_selected_bg_color {{colors.primary.default.hex}};
|
||||
@define-color theme_selected_fg_color {{colors.on_primary.default.hex}};
|
||||
@define-color borders {{colors.outline.default.hex}};
|
||||
|
||||
/* Most of GIMP's UI reuses selected-color/extreme-selected-color as a full
|
||||
background fill for selection/hover/checked states. Left as bright
|
||||
Noctalia yellow, that fill makes GIMP's own default (light) icon
|
||||
rendering invisible on several widgets, confirmed live and not fixable
|
||||
by recoloring the icon directly (tried extensively: direct color
|
||||
targeting, wildcard inheritance, -gtk-icon-shadow; `filter` isn't even
|
||||
a valid GTK3 CSS property at all, confirmed via a real parse error).
|
||||
|
||||
Real prior art settles this cleanly: community GIMP dark+accent themes
|
||||
(e.g. github.com/bunnywaffle/GIMP-3-Themes, "Black Green Glow") never
|
||||
use a bright accent as a full selection fill either, only as a thin
|
||||
border stripe on top of a still-dark background. Applying that same
|
||||
pattern here: every selector below keeps a dark, subtle background
|
||||
(hover-color) and gets the yellow as a left border accent instead. No
|
||||
per-widget icon or text color override is needed this way, since GIMP's
|
||||
own default text/icon rendering already works fine against a dark
|
||||
background, that's the entire point.
|
||||
|
||||
Uses box-shadow, not a real border: GIMP's own common.css already
|
||||
renders a bottom accent bar this way in several places (e.g. `menubar >
|
||||
menuitem:hover { box-shadow: inset 0 -3px @stronger-border-color; }`),
|
||||
and stronger-border-color is mapped to Noctalia's outline role (a
|
||||
blue-purple tone) elsewhere in this file, which is exactly the stray
|
||||
blue bar seen live alongside an earlier version of this fix that used a
|
||||
real `border` property instead: two separate indicators stacking, not
|
||||
one. Matching GIMP's own mechanism here replaces that blue bar outright
|
||||
instead of adding a second one next to it.
|
||||
|
||||
One deliberate exception, kept as a full yellow fill instead (below):
|
||||
toolbox tool selection. Confirmed working with a full fill plus a dark
|
||||
icon override, and that's the preferred look there specifically. The
|
||||
Preferences category sidebar is a GtkTreeView (confirmed by its expander
|
||||
chevrons), matched by `.view:selected` below, not a GtkListBox `list
|
||||
row`, so it stays with this box-shadow treatment; pulling it out into a
|
||||
full-fill override was tried and also recolored the page's title-bar
|
||||
header the same way (both fall back to the same GTK theme variables),
|
||||
which looked wrong, so left as-is. */
|
||||
.view:selected,
|
||||
.view row:selected,
|
||||
menuitem *:hover,
|
||||
popover list row:selected,
|
||||
combobox button:hover,
|
||||
notebook header button:hover,
|
||||
notebook header tabs tab:checked,
|
||||
GimpDeviceStatus widget:selected,
|
||||
GimpDeviceStatus widget:selected box,
|
||||
button:checked,
|
||||
button.titlebutton:hover,
|
||||
spinbutton button:hover {
|
||||
background-color: {{colors.surface_container_high.default.hex}};
|
||||
background-image: none;
|
||||
color: {{colors.on_surface.default.hex}};
|
||||
border-width: 0;
|
||||
box-shadow: inset 0 -3px {{colors.primary.default.hex}};
|
||||
}
|
||||
|
||||
/* Full yellow fill for the toolbox, matching selected-color's real value
|
||||
(unchanged from GIMP's own base rule, no override needed for the
|
||||
background itself). Text/icon color need the explicit dark override
|
||||
GIMP's own CSS never provides. The small corner triangle marking a tool
|
||||
group (e.g. on the Paintbrush/Pencil/Airbrush group) stays whatever
|
||||
color GIMP draws it: confirmed no dedicated icon asset exists for it
|
||||
anywhere in GIMP's own icon set, so it's a fixed-color overlay drawn
|
||||
directly in GIMP's C code, not a themeable CSS node. */
|
||||
toolbutton button.flat:hover,
|
||||
toolbutton button.flat:checked,
|
||||
toolbutton button.flat:checked:hover {
|
||||
color: {{colors.on_primary.default.hex}};
|
||||
}
|
||||
toolbutton button.flat:checked image,
|
||||
toolbutton button.flat:checked icon {
|
||||
color: {{colors.on_primary.default.hex}};
|
||||
}
|
||||
|
||||
/* GIMP's own theme has no general rule for GtkPopoverMenu backgrounds
|
||||
(only narrow button/list-row styling), so context menus fall through
|
||||
to GTK's stock light default without this. */
|
||||
popover, popover contents, popover.menu, popover.background {
|
||||
background-color: @bg-color;
|
||||
color: @fg-color;
|
||||
}
|
||||
popover modelbutton, popover menuitem {
|
||||
color: @fg-color;
|
||||
}
|
||||
popover modelbutton:hover, popover menuitem:hover {
|
||||
background-color: @extreme-bg-color;
|
||||
}
|
||||
Reference in New Issue
Block a user