I created this gtk-3.0.css file using Claude to improve GnuCash's 5.16's visual 
appearance.  Save this file (named exactly gtk-3.0.css) as plain ASCII text in 
your GnuCash config dir:
 Linux:   ~/.config/gnucash/gtk-3.0.css
 Windows: %LOCALAPPDATA%\GnuCash\gtk-3.0.css   (i.e. ...\AppData\Local\GnuCash)
 macOS:   ~/Library/Application Support/Gnucash/config/gtk-3.0.css

IMPORTANT: For the register colors to take effect you MUST turn OFF
 Edit > Preferences > Register > "Use GnuCash built-in color theme".


 Restart GnuCash after saving.

Sincerely

Thomas Philips
/*
 * gtk-3.0.css  --  Custom theme for GnuCash 5.15
 * -----------------------------------------------------------------------------
 *  1. Alternating register rows in a clean, Apple-like (macOS) light style
 *  2. Dark buttons with white text (applies app-wide)
 *  3. Dark account tree (Chart of Accounts) with bold white text
 *
 *  IMPORTANT: For the register colors to take effect you MUST turn OFF
 *  Edit > Preferences > Register > "Use GnuCash built-in color theme".
 *
 *  WHY THE OLD FILE DID NOTHING:
 *  When that preference is OFF, GnuCash 5.x tags each register row with the
 *  classes  gnc-class-user-register-primary / -secondary / -split / -header /
 *  -cursor  (note the "-user-" in the middle). When the preference is ON it
 *  uses  gnc-class-register-*  instead. The previous file only targeted
 *  gnc-class-register-* (and the non-existent register-*), so once the
 *  built-in theme was disabled none of the row selectors matched and the
 *  rows kept their default background. This file targets BOTH name forms,
 *  so the stripes show whether the built-in theme is on or off.
 *
 *  Place this file (named exactly gtk-3.0.css) in your GnuCash config dir:
 *    Linux:   ~/.config/gnucash/gtk-3.0.css
 *    Windows: %LOCALAPPDATA%\GnuCash\gtk-3.0.css   (i.e. ...\AppData\Local\GnuCash)
 *    macOS:   ~/Library/Application Support/Gnucash/config/gtk-3.0.css
 *
 *  Restart GnuCash after saving. Must be saved as plain ASCII text.
 * -----------------------------------------------------------------------------
 */

/* ============================ Color palette ============================== */
/* Apple-inspired neutrals + system blue/red.                               */
@define-color apple_white      #ffffff;  /* primary register rows           white */
@define-color apple_bluerow    #f6fafd;  /* secondary (alternating) rows - light blue was ccecff earlier e3f0ff*/
@define-color apple_split      #ededf2;  /* split lines (expanded txns)     */
@define-color apple_headerbg   #a4a4ab;  /* register column header bar      */
@define-color apple_border     #d2d2d7;  /* hairline borders                */
@define-color apple_ink        #2c2c2b;  /* near-black text / dark surfaces was 1d1d1f*/
@define-color apple_ink2       #165711;  /* slightly lighter dark surface   was 234f0a*/
@define-color apple_selrow     #c2dbff;  /* selected register row (soft)    */
@define-color apple_blue       #0a84ff;  /* system blue (selection accent)  */
@define-color apple_red        #d70015;  /* negative numbers (light bg)     */
@define-color apple_red_dk     #ff6b6b;  /* negative numbers (dark bg)      */

/* ============================ Font size ================================= */
/* Increase text by ~2pt over the theme default. GTK CSS can't express      */
/* "+2pt" relative to whatever the theme uses, so this sets an explicit     */
/* size; the common GnuCash/Adwaita default is ~11pt, so 13pt is about +2.  */
/* Change the single value below to fine-tune. This targets the whole app   */
/* (*), the main window (required for a global change on Windows), and the  */
/* register sheet explicitly so the transaction rows pick it up.            */
*,
#gnc-id-main-window,
gnc-id-sheet {
  font-size: 10pt;
}

/* ======================================================================== */
/* 1. REGISTER  --  Apple-like alternating rows                             */
/* ======================================================================== */
/* Each row type is targeted under BOTH class names:                        */
/*   gnc-class-user-register-*  -> applied when the built-in theme is OFF    */
/*                                 (this is the one that actually matters)   */
/*   gnc-class-register-*       -> applied when the built-in theme is ON     */
/* Because the built-in foreground class is NOT added when the theme is OFF, */
/* the text color is set directly on each row rule below.                   */

/* Column header bar */
.gnc-class-user-register-header,
.gnc-class-user-register-header:disabled,
.gnc-class-register-header,
.gnc-class-register-header:disabled {
  background-color: #0063b1;
  color: #ffd700;
  border-top: 2px solid @apple_border;
  border-bottom: 1px solid @apple_border;
}

/* Primary rows (row A of the stripe) */
.gnc-class-user-register-primary,
.gnc-class-user-register-primary:disabled,
.gnc-class-register-primary,
.gnc-class-register-primary:disabled {
  background-color: @apple_white;
  color: @apple_ink;
}

/* Secondary rows (row B of the stripe) -- this is what creates the
   alternating look in single-line view. */
.gnc-class-user-register-secondary,
.gnc-class-user-register-secondary:disabled,
.gnc-class-register-secondary,
.gnc-class-register-secondary:disabled {
  background-color: @apple_bluerow;
  color: @apple_ink;
}

/* Split lines inside an expanded transaction */
.gnc-class-user-register-split,
.gnc-class-user-register-split:disabled,
.gnc-class-register-split,
.gnc-class-register-split:disabled {
  background-color: @apple_split;
  color: @apple_ink;
}

/* Currently selected row */
.gnc-class-user-register-cursor,
.gnc-class-register-cursor {
  background-color: @apple_selrow;
  color: @apple_ink;
}

/* The single cell you are actively editing: clean white field, dark text.
   The editable widget has CSS name gnc-id-cursor (the bare "cursor entry"
   selector used before did not match anything). */
gnc-id-cursor entry {
  background-color: @apple_white;
  color: @apple_ink;
}

/* Negative amounts in the register (this class is added regardless of the
   built-in-theme setting). */
gnc-id-sheet .gnc-class-negative-numbers {
  color: @apple_red;
}

/* ======================================================================== */
/* 2. BUTTONS  --  dark with gold text (app-wide)                          */
/* ======================================================================== */
button {
  background-image: none;          /* clear theme gradients */
  background-color: @apple_ink;
  color: #ffd700;
  border: 1px solid @apple_ink2;
  border-radius: 8px;
  box-shadow: none;
  padding: 4px 10px;
}

/* Force the label/icon inside buttons to gold (some themes override). */
button label {
  color: #ffd700;
}

button:hover {
	
  background-color: #a0830e; /* was #ffd700 */
  color: #ffd700;
  /*  color: @apple_ink2;*/
  /* background-color: @apple_ink2; */
  /* border-color: #3a3a3c; */
}

button:active,
button:checked {
  background-color: #000000;
  border-color: #000000;
}

button:disabled {
  background-color: #3a3a3c;
  border-color: #3a3a3c;
}

button:disabled label {
  color: #8e8e93;
}

/* ======================================================================== */
/* 3. ACCOUNT TREE (Chart of Accounts)  --  dark with bold white text       */
/* ======================================================================== */
/* The whole sheet below the column headers has ID #account_tree.           */
#account_tree {
  background-color: @apple_ink;
  color: #ffffff;
  font-weight: bold;
}

/* Selected account row */
#account_tree:selected {
  background-color: @apple_blue;
  color: #ffffff;
}

/* Hover feedback */
#account_tree:hover {
  background-color: @apple_ink2;
}

/* Negative balances need a lighter red to stay readable on the dark bg */
#account_tree .gnc-class-negative-numbers {
  color: @apple_red_dk;
}

/* Column headers of the account tree (kept dark to match; text white+bold
   is inherited from the global button rules above). */
#account_tree header button {
  background-color: @apple_ink2;
  border-radius: 0;
  border-bottom: 1px solid #000000;
}

/* The frame/area around the tree and the Totals bar */
.GncAccountPage {
  background-color: @apple_ink;
  color: #ffffff;
}

/* Tabs */
notebook tab {
    background-color: @apple_ink;
    color: #d6d9de;
}

notebook tab:checked {
    background-color: #a0830e; /* was #ffd700 */
	color: #ffd700;
   /*    color: @apple_ink2; */
	font-weight: bold;
}
_______________________________________________
gnucash-user mailing list
[email protected]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

Reply via email to