This commit is contained in:
2026-11-04 20:35:46 +01:00
parent 5f4de5e60c
commit 86abc097f4
348 changed files with 10300 additions and 0 deletions
@@ -0,0 +1,10 @@
{
"files": {
"README.md": "2776c8398f20a6a106c3cddb9b7e1171",
"gimp.css": "782d352483659abf7382546573c9d167",
"screenshot-preferences.png": "d946d563f7bbebc75c6c202982c790dc",
"screenshot.png": "ea41bc5097843dac92792cbd902a3c3b",
"template.toml": "e612bf68941874992ce2120e4f0a6455"
},
"version": 1
}
@@ -0,0 +1,54 @@
# GIMP
GIMP has its own personal-override CSS hook, separate from the auto-generated `theme.css` that
ships with the app (which is regenerated on every theme change and explicitly says not to edit
it by hand). This template writes to that personal file directly: `gimp.css`, imported
automatically if present, no extra setup needed once the template is enabled.
## What gets themed, and the two things that needed extra care
GIMP's own theme only defines 17 named colors (`fg-color`, `bg-color`, `selected-color`, and so
on), reused across `common.css`/`common-dark.css`. Most of the UI follows from setting those.
Two things needed more than a plain 1:1 color swap:
- **Context menus and other `GtkPopoverMenu` content had no background rule at all** in GIMP's
own theme (only narrow button/list-row styling), so they fell through to GTK's stock light
default. Fixed with explicit `popover`/`popover contents` rules.
- **`selected-color`/`extreme-selected-color` are always paired with white text** in GIMP's own
CSS, with no dark-text variant the way Noctalia's other templates use `on_primary` on top of a
`primary`-colored background. Mapping them straight to Noctalia's yellow accent made text
unreadable everywhere that yellow shows up (menu hovers, selected list rows, the Preferences
sidebar). Fixed by keeping the yellow and adding an explicit dark-text override for every
selector GIMP's `common.css` actually uses those two variables as a background for (checked via
grep, not guessed).
- A few widgets, confirmed just the Preferences dialog's own page title bar, don't use GIMP's
custom variables at all. GIMP's own source comment on that exact element admits it "doesn't
have any more specific way to style it," meaning it falls back to standard GTK/Adwaita
variable names (`@theme_bg_color`, `@theme_selected_bg_color`, etc.) instead. Those are set
too, as a safety net, since the system `gtk.css` those would normally come from never loads
inside a Flatpak sandbox.
## Requires GIMP's own "Default" base theme
GIMP has two selectable base themes (Preferences > Interface > Theme): `Default` and `System`.
This template is built against `Default` (`themes/Default/gimp-dark.css`), the one this personal
override's own 17 variables and extra selectors are checked against. `System` imports a
different, much smaller CSS file with no guarantee it uses the same variable names, not tested
or supported here. If colors look wrong after enabling this template, check Preferences first.
## Native install
`gimp.css` lives at `~/.config/GIMP/3.2/gimp.css`.
## Flatpak install (`org.gimp.GIMP`)
Same file, inside the sandbox's own isolated config: `~/.var/app/org.gimp.GIMP/config/GIMP/3.2/
gimp.css`. No `flatpak override` needed, GIMP reads its own config from inside its sandbox
regardless of any host `~/.config` access.
## Testing
Tested against GIMP 3.2.4 (Flatpak). Verified visually across three passes: main window and
toolbox (`screenshot.png`), right-click context menus, and the Preferences dialog specifically
(`screenshot-preferences.png`), the hardest case since it touches nearly every one of GIMP's 17
variables plus the GTK fallback ones.
@@ -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;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

@@ -0,0 +1,13 @@
[catalog.gimp]
name = "GIMP"
category = "editor"
[templates.gimp]
input_path = "gimp.css"
output_path = "~/.config/GIMP/3.2/gimp.css"
requires_path = "~/.config/GIMP"
[templates.gimp-flatpak]
input_path = "gimp.css"
output_path = "~/.var/app/org.gimp.GIMP/config/GIMP/3.2/gimp.css"
requires_path = "~/.var/app/org.gimp.GIMP"