# Diehard4 GTK3 Theme > **This is a modified version of Diehard4.** > Original theme by **obscurant** (2016). Modified in **September 2026** by > **zavage**: the GTK3 sheets were rewritten for the post-3.20 CSS node model > (the originals target GTK 3.18 and render almost nothing on 3.24), and the > palette was retargeted to the on-screen colours from *Live Free or Die Hard*. > See the sections at the end of this file for the full list of changes. > > Licensed GPL-3.0, same as the original. Original copyright is retained in > `LICENSE` and in `metacity-1/metacity-theme-1.xml`. ![screenshot](http://i.imgur.com/7yelOkR.png) Full rewrite of the gtk2/gtk3 themes. Includes themes for cinnamon, openbox, xfwm, pekwm and tint2. Unity support is included, but it's not so great. Font is cure, from the [Artwiz](http://sourceforge.net/projects/artwiz-latin1) font pack ([install guide](http://whatnotlinux.blogspot.com/2011/11/install-artwiz-fonts-in-ubuntu.html)). Icons are [Faenza](http://tiheum.deviantart.com/art/Faenza-Icons-173323228) and [Variations](http://www.deviantart.com/art/VARIATIONS-1-201731613). [Wallpaper](http://i.imgbox.com/o3LkOuEW.png) [Audacious skin](http://zomby.deviantart.com/art/Diehard4-for-Audacious-599888259) Changelog v1.5 (3/17/16) • Cinnamon theme rewrite • gtk3 tab padding reduction • Fixes to unselected tab close button • Fixes to terminal tabs v1.4 • gtk3 toolbar, menubar padding reduction • gtk3 Menubar text color • gtk3 Tweaks to seekbars • Metacity text color v1.3 • Fixed resize bug with some applications v1.2 • gtk2 menu arrow selected • gtk2 input padding • gtk2 progress bar height • Added style for Reddit Reader desklet in Cinnamon theme --- ## GTK3 port (v2.0, 2026-09-18) The GTK3 half of this theme was written for GTK 3.18 and stopped working when GTK 3.20 replaced the CSS class model with element nodes. On GTK 3.24 the old sheets parsed but matched almost nothing, so buttons, entries, tabs, scales and scrollbars rendered as bare rectangles. `gtk-3.0/` has been rewritten against the current node model: | file | contents | |---|---| | `gtk.css` | colour definitions only — recolour the theme here | | `widgets.css` | all widget rules, node-selector based | | `mate.css` | MATE panel, applets, window list, Caja, terminal | | `gtk-dark.css` | alias of `gtk.css` (the theme is already dark) | | `legacy/` | the original 3.18 sheets, unmodified, for reference | Palette, metrics and design language are unchanged. Deliberate deviations, all made because the original value no longer reads on 3.24: * `trough_border_color` was `#111B25`, within one step of the window background — scale, progressbar and switch troughs were invisible. Now `@light_color`, the same border entries already used. * Keyboard focus draws a faint dashed outline. The original set `-GtkWidget-focus-line-width: 0`, which on 3.24 leaves no focus cue at all. * Entries take an accent-coloured border on focus. * `GtkSwitch` is new — it barely existed in MATE in 2016 and the original never styled it. * Notebook tab padding is `3px 10px` rather than `1px 8px`; the old value is below the minimum tab height GTK now enforces. Do not put `gtk-application-prefer-dark-theme` in `gtk-3.0/settings.ini`. It makes GTK reload the theme, which re-reads the file, and applications hang on startup. The theme ships without a `settings.ini` for that reason. The GTK2 sheet (`gtk-2.0/gtkrc`) is untouched and still correct — GTK2 never changed under it. It needs the `gtk2` and `gtk-engines` packages installed to have any effect. Window decorations come from `metacity-1/`, which Marco (MATE) reads directly. Emerald is not required and has not been maintained since the Compiz Fusion era. ### Screen-accurate recolour (2026-09-18) Palette retargeted to the WAR10CK window in *Live Free or Die Hard*: * `bg_color` `#23425E` — window and titlebar * `selected_bg_color` `#BA6A07` — the orange edge bars and accents Supporting shades are derived from those two with the original theme's own ratios (raised `x1.42`, recessed `x0.72`). Text had to be lifted: the old `#868A8E` scores only 3.0:1 on `#23425E`, so normal text is now `#B4C4D2` (5.85:1) and bright text `#E8F0F7` (9.06:1). The `metacity-1/` pixmaps were remapped the same way — each pixel is projected onto the segment between its two nearest source anchors (`#9F440D` orange, `#0D151D` navy, `#C5CBD1` glyph) and re-blended against the new anchors, so antialiased edges stay clean. Originals are in `metacity-1.orig/`. Titlebar is taller: `title_vertical_pad` 0 -> 4 and `title_border` top/bottom 5/0 -> 2/2, roughly +7px. The titlebar pixmaps are drawn with `height="height"` so they stretch to fit — no art changes needed. Title text was hardcoded `#6d7379` for both focus states; it is now `#E8F0F7` focused / `#8CA2B6` unfocused, and vertically centred with `y="(height - title_height) / 2"` instead of the old `y="0-3"` fudge. GTK headerbars (CSD apps) went from `min-height: 32px` to `40px` to match. ### Why the left bar has no diagonal corner The Emerald original cut the orange bar at 45 degrees at the bottom-left. That was tried here and reverted — **Marco cannot reproduce it.** Recording why, so nobody burns an afternoon rediscovering it: * **Marco ignores per-pixel alpha in frame images.** Transparent pixels composite onto black, not onto the desktop, so a cut-away corner renders as a black triangle over the wallpaper. Verified by placing a magenta window behind the corner: the cut came out black, not magenta. Marco can only shape-clip the `rounded_*` corners, which is a binary mask and not usable for this. Emerald drew true ARGB decorations; Marco does not. * Filling the cut with the frame colour instead does render correctly, but it reads as the bar tapering into the border rather than a corner cut out of it, which is not the effect — hence the revert. * **Do not use `max()` or `min()` in a draw_ops expression.** Marco *segfaults* when it draws a frame using one — no parse error, no warning, the window manager dies and every window loses its decorations. It only crashes once a frame is actually drawn, so a WM started with no windows open looks fine. Plain arithmetic (`height - 13`) is safe, and Marco clamps negative results on very short windows without complaint. `GtkDialog` and `GtkAssistant` do **not** use the `window` CSS node in 3.20+ — they are `dialog` and `assistant`. A theme that only styles `window` leaves every dialog, About box, file chooser, colour/font picker and app chooser with a fully transparent body that renders as a hole through to the desktop. All three node names are covered in the toplevel background rule. Window buttons: the `state` attribute in `metacity-theme-1.xml` is the **mouse** state, not window focus — `normal` is idle and `prelight` is hover, and the draw_ops names are misleading about which is which. The idle minimise/maximise/close glyphs were a dim orange (`#7F5A29`) that worked on the old near-black bar and turned to mud on `#23425E`; all three are now `#E8F0F7`, with the orange square still appearing on hover. Scrollbars are deliberately **not** accent-coloured. An always-on-screen element in `#BA6A07` reads as an alarm, so the slider uses `@scrollbar_slider` (`#454F5A`) — 1.63:1 against the trough at rest, rising to 2.49:1 on hover so it is still easy to find and grab. Change that one token in `gtk.css` to restyle every scrollbar; hover, active and disabled are derived from it with `shade()`. Marco caches the metacity theme, so after editing it you must switch the Marco theme away and back for changes to show. GTK3 reloads CSS on file change by itself.