Files
diehard4-gtk-theme/metacity-1/metacity-theme-1.xml
zavageandClaude Opus 5 d56294b00f Port to GTK 3.24 and recolour to the film palette
The GTK3 sheets targeted GTK 3.18 and broke at 3.20, when the CSS class
model was replaced by element nodes. On 3.24 they parsed but matched almost
nothing: buttons, entries, tabs, scales and scrollbars rendered as bare
rectangles. Rewritten against the node model.

gtk-3.0/
  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, moved aside for reference

Palette retargeted to the WAR10CK window in Live Free or Die Hard:
bg #23425E, accent #BA6A07. Supporting shades derived with the original
theme's own ratios (raised x1.42, recessed x0.72). Text had to be lifted -
the old #868A8E scores 3.0:1 on #23425E, so normal text is #B4C4D2
(5.85:1) and bright text #E8F0F7 (9.06:1).

metacity-1/ pixmaps remapped by projecting each pixel onto the segment
between its two nearest source anchors and re-blending against the new
ones, so antialiased edges stay clean. Titlebar is ~7px taller, its text
is centred and no longer a hardcoded #6d7379 for both focus states, and
the idle window-button glyphs are white instead of a dim orange that
turned to mud on the lighter bar.

Scrollbars are deliberately not accent-coloured; @scrollbar_slider
(#454F5A) keeps them quiet at rest and findable on hover.

Fixes a transparent-body bug: GtkDialog and GtkAssistant do not use the
`window` CSS node in 3.20+, so every dialog, About box and file chooser
rendered as a hole through to the desktop.

Attribution and the GPL-3.0 modification notice added to README.md,
index.theme and metacity-theme-1.xml. Licence unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-18 05:58:09 -06:00

266 lines
12 KiB
XML

<?xml version="1.0"?>
<metacity_theme>
<info>
<name>Diehard4</name>
<author>obscurant; GTK3 port and recolour by zavage</author>
<copyright>GPL v3</copyright>
<date>7/26/11</date>
<description>Port of Diehard4 Emerald</description>
</info>
<!--Based on Carbon, by Andrea Cimitan -->
<constant name="IconTitleSpacing" value="0"/>
<frame_geometry name="normal" rounded_top_left="1" rounded_top_right="1" rounded_bottom_left="1" rounded_bottom_right="1" title_scale="medium">
<distance name="left_width" value="17"/>
<distance name="right_width" value="4"/>
<distance name="bottom_height" value="4"/>
<distance name="left_titlebar_edge" value="20"/>
<distance name="right_titlebar_edge" value="5"/>
<distance name="button_width" value="13"/>
<distance name="button_height" value="13"/>
<distance name="title_vertical_pad" value="4"/>
<border name="title_border" left="0" right="0" top="2" bottom="2"/>
<border name="button_border" left="2" right="2" top="3" bottom="0"/>
</frame_geometry>
<frame_geometry name="maximized" rounded_top_left="false" rounded_top_right="false" rounded_bottom_left="false" rounded_bottom_right="false" title_scale="medium">
<distance name="left_width" value="0"/>
<distance name="right_width" value="0"/>
<distance name="bottom_height" value="0"/>
<distance name="left_titlebar_edge" value="0"/>
<distance name="right_titlebar_edge" value="7"/>
<distance name="button_width" value="13"/>
<distance name="button_height" value="13"/>
<distance name="title_vertical_pad" value="4"/>
<border name="title_border" left="10" right="0" top="2" bottom="2"/>
<border name="button_border" left="2" right="2" top="3" bottom="0"/>
</frame_geometry>
<!-- <frame_geometry name="border" parent="normal" has_title="false">
<distance name="button_width" value="0"/>
<distance name="button_height" value="13"/>
<border name="title_border" left="0" right="0" top="0" bottom="0"/>
<border name="button_border" left="0" right="0" top="0" bottom="0"/>
</frame_geometry> -->
<frame_geometry name="border" has_title="false">
<distance name="left_width" value="3"/>
<distance name="right_width" value="3"/>
<distance name="bottom_height" value="3"/>
<distance name="left_titlebar_edge" value="0"/>
<distance name="right_titlebar_edge" value="0"/>
<distance name="button_width" value="0"/>
<distance name="button_height" value="0"/>
<distance name="title_vertical_pad" value="3"/>
<border name="title_border" left="0" right="0" top="0" bottom="0"/>
<border name="button_border" left="0" right="0" top="0" bottom="0"/>
</frame_geometry>
<draw_ops name="title-text-focused">
<title color="#E8F0F7" x="IconTitleSpacing" y="(height - title_height) / 2"/>
</draw_ops>
<draw_ops name="title-text-unfocused">
<title color="#8CA2B6" x="IconTitleSpacing" y="(height - title_height) / 2"/>
</draw_ops>
<draw_ops name="blank">
</draw_ops>
<draw_ops name="title">
<image filename="titlebar-left.png" x="0" y="0" width="object_width" height="height"/>
<image filename="titlebar-mid.png" x="17" y="0" width="width - 8" height="height"/>
<image filename="titlebar-right.png" x="width - object_width" y="0" width="object_width" height="height"/>
</draw_ops>
<draw_ops name="title-maximized">
<image filename="titlebar-left-maximized.png" x="0" y="0" width="object_width" height="height"/>
<image filename="titlebar-mid.png" x="17" y="0" width="width - 8" height="height"/>
<image filename="titlebar-right-maximized.png" x="width - object_width" y="0" width="object_width" height="height"/>
</draw_ops>
<draw_ops name="frame-left-focused">
<image filename="frame-left.png" x="0" y="0" width="width" height="height"/>
</draw_ops>
<draw_ops name="frame-right-focused">
<image filename="frame-right.png" x="0" y="0" width="width" height="height"/>
</draw_ops>
<draw_ops name="frame-bottom-focused">
<image filename="frame-left-bottom.png" x="0" y="0" width="17" height="object_height"/>
<image filename="frame-bottom.png" x="17" y="0" width="width" height="object_height"/>
<image filename="frame-right-bottom.png" x="width - object_width" y="0" width="object_width" height="object_height"/>
</draw_ops>
<draw_ops name="button-close-focused">
<image filename="button-close-focused.png" x="0" y="0" width="width" height="height"/>
</draw_ops>
<draw_ops name="button-close-unfocused">
<image filename="button-close-unfocused.png" x="0" y="0" width="width" height="height"/>
</draw_ops>
<draw_ops name="button-close-maximized">
<image filename="button-close-maximized.png" x="0" y="0" width="width" height="height"/>
</draw_ops>
<draw_ops name="button-close-maximized-focused">
<image filename="button-close-maximized-focused.png" x="0" y="0" width="width" height="height"/>
</draw_ops>
<draw_ops name="button-close-maximized-pressed">
<image filename="button-close-maximized-pressed.png" x="0" y="0" width="width" height="height"/>
</draw_ops>
<draw_ops name="button-close-pressed">
<image filename="button-close-pressed.png" x="0" y="0" width="width" height="height"/>
</draw_ops>
<draw_ops name="button-maximize-focused">
<image filename="button-maximize-pressed.png" x="0" y="0" width="width" height="height"/>
</draw_ops>
<draw_ops name="button-maximize-unfocused">
<image filename="button-maximize-focused.png" x="0" y="0" width="width" height="height"/>
</draw_ops>
<draw_ops name="button-maximize-pressed">
<image filename="button-maximize-pressed.png" x="0" y="0" width="width" height="height"/>
</draw_ops>
<draw_ops name="button-minimize-focused">
<image filename="button-minimize-pressed.png" x="0" y="0" width="width" height="height"/>
</draw_ops>
<draw_ops name="button-minimize-unfocused">
<image filename="button-minimize-focused.png" x="0" y="0" width="width" height="height"/>
</draw_ops>
<draw_ops name="button-minimize-pressed">
<image filename="button-minimize-pressed.png" x="0" y="0" width="width" height="height"/>
</draw_ops>
<draw_ops name="button-menu-focused">
<image filename="button-menu-focused.png" x="0" y="0" width="width" height="height"/>
</draw_ops>
<draw_ops name="button-menu-unfocused">
<image filename="button-menu-pressed.png" x="0" y="0" width="width" height="height"/>
</draw_ops>
<draw_ops name="button-menu-pressed">
<image filename="button-menu-pressed.png" x="0" y="0" width="width" height="height"/>
</draw_ops>
<frame_style name="normal-focused" geometry="normal">
<piece position="titlebar" draw_ops="title"/>
<piece position="left_edge" draw_ops="frame-left-focused"/>
<piece position="right_edge" draw_ops="frame-right-focused"/>
<piece position="bottom_edge" draw_ops="frame-bottom-focused"/>
<piece position="title" draw_ops="title-text-focused"/>
<button function="close" state="normal" draw_ops="button-close-unfocused"/>
<button function="close" state="prelight" draw_ops="button-close-focused"/>
<button function="close" state="pressed" draw_ops="button-close-pressed"/>
<button function="minimize" state="normal" draw_ops="button-minimize-unfocused"/>
<button function="minimize" state="prelight" draw_ops="button-minimize-focused"/>
<button function="minimize" state="pressed" draw_ops="button-minimize-pressed"/>
<button function="maximize" state="normal" draw_ops="button-maximize-unfocused"/>
<button function="maximize" state="prelight" draw_ops="button-maximize-focused"/>
<button function="maximize" state="pressed" draw_ops="button-maximize-pressed"/>
<button function="menu" state="normal" draw_ops="button-menu-unfocused"/>
<button function="menu" state="prelight" draw_ops="button-menu-focused"/>
<button function="menu" state="pressed" draw_ops="button-menu-pressed"/>
</frame_style>
<frame_style name="normal-unfocused" geometry="normal">
<piece position="titlebar" draw_ops="title"/>
<piece position="left_edge" draw_ops="frame-left-focused"/>
<piece position="right_edge" draw_ops="frame-right-focused"/>
<piece position="bottom_edge" draw_ops="frame-bottom-focused"/>
<piece position="title" draw_ops="title-text-unfocused"/>
<button function="close" state="normal" draw_ops="button-close-unfocused"/>
<button function="close" state="prelight" draw_ops="button-close-focused"/>
<button function="close" state="pressed" draw_ops="button-close-pressed"/>
<button function="minimize" state="normal" draw_ops="button-minimize-unfocused"/>
<button function="minimize" state="prelight" draw_ops="button-minimize-focused"/>
<button function="minimize" state="pressed" draw_ops="button-minimize-pressed"/>
<button function="maximize" state="normal" draw_ops="button-maximize-unfocused"/>
<button function="maximize" state="prelight" draw_ops="button-maximize-focused"/>
<button function="maximize" state="pressed" draw_ops="button-maximize-pressed"/>
<button function="menu" state="normal" draw_ops="button-menu-unfocused"/>
<button function="menu" state="prelight" draw_ops="button-menu-focused"/>
<button function="menu" state="pressed" draw_ops="button-menu-pressed"/>
</frame_style>
<frame_style name="normal-shaded-focused" geometry="normal" parent="normal-focused">
<piece position="titlebar" draw_ops="title"/>
</frame_style>
<frame_style name="normal-shaded-unfocused" geometry="normal" parent="normal-unfocused">
<piece position="titlebar" draw_ops="title"/>
</frame_style>
<!-- maximized stuff -->
<frame_style name="normal-maximized-focused" geometry="maximized" parent="normal-focused">
<piece position="titlebar" draw_ops="title-maximized"/>
<button function="close" state="normal" draw_ops="button-close-maximized"/>
<button function="close" state="prelight" draw_ops="button-close-maximized-focused"/>
<button function="close" state="pressed" draw_ops="button-close-maximized-pressed"/>
</frame_style>
<frame_style name="normal-maximized-unfocused" geometry="maximized" parent="normal-unfocused">
<piece position="titlebar" draw_ops="title-maximized"/>
<button function="close" state="normal" draw_ops="button-close-maximized"/>
<button function="close" state="prelight" draw_ops="button-close-maximized-focused"/>
<button function="close" state="pressed" draw_ops="button-close-maximized-pressed"/>
</frame_style>
<frame_style name="normal-shaded-maximized-focused" geometry="maximized" parent="normal-focused">
<piece position="titlebar" draw_ops="title-maximized"/>
<button function="close" state="normal" draw_ops="button-close-maximized"/>
<button function="close" state="prelight" draw_ops="button-close-maximized-focused"/>
<button function="close" state="pressed" draw_ops="button-close-maximized-pressed"/>
</frame_style>
<frame_style name="normal-shaded-maximized-unfocused" geometry="maximized" parent="normal-unfocused">
<piece position="titlebar" draw_ops="title-maximized"/>
<button function="close" state="normal" draw_ops="button-close-maximized"/>
<button function="close" state="prelight" draw_ops="button-close-maximized-focused"/>
<button function="close" state="pressed" draw_ops="button-close-maximized-pressed"/>
</frame_style>
<frame_style_set name="normal">
<frame focus="yes" state="normal" resize="both" style="normal-focused"/>
<frame focus="no" state="normal" resize="both" style="normal-unfocused"/>
<frame focus="yes" state="maximized" style="normal-maximized-focused"/>
<frame focus="no" state="maximized" style="normal-maximized-unfocused"/>
<frame focus="yes" state="shaded" style="normal-shaded-focused"/>
<frame focus="no" state="shaded" style="normal-shaded-unfocused"/>
<frame focus="yes" state="maximized_and_shaded" style="normal-shaded-maximized-focused"/>
<frame focus="no" state="maximized_and_shaded" style="normal-shaded-maximized-unfocused"/>
</frame_style_set>
<window type="normal" style_set="normal"/>
<window type="dialog" style_set="normal"/>
<window type="modal_dialog" style_set="normal"/>
<window type="menu" style_set="normal"/>
<window type="utility" style_set="normal"/>
<window type="border" style_set="normal"/>
<menu_icon function="close" state="normal" draw_ops="button-close-focused"/>
<menu_icon function="maximize" state="normal" draw_ops="button-maximize-focused"/>
<menu_icon function="unmaximize" state="normal" draw_ops="button-maximize-focused"/>
<menu_icon function="minimize" state="normal" draw_ops="button-minimize-focused"/>
</metacity_theme>