Fork ElemetryOS with macOS-style window decorations

- Move traffic-light buttons to the LEFT side of titlebars (close/minimize/maximize)
  in macOS order, using fixed left-pad positions instead of right-edge offsets
- Adopt macOS dark-mode color palette: #3C3C3C active titlebar, #2C2C2C inactive,
  traffic-light colors #FF5F57/#FEBC2E/#28C840, near-black #1C1C1C desktop
- Center window title text in the titlebar (macOS style), clamped to avoid
  overlapping the left button cluster
- Thin 1px window borders replacing the original 3px beveled border
- macOS blue (#4A90D9) selection highlight in the context menu
- Neutral dark context menu (#2C2C2C) with subtle separators and text indent
- Update README to document the ElemetryOS macOS fork identity and design changes
This commit is contained in:
Claude committed 2026-08-30 19:40:11 +00:00
1 parent 4cda708cc2
commit 0d874617dd
4 files changed
+94 -89

No files matched your search

+28 -27
View File
@@ -12,28 +12,29 @@
#include <string.h>
#include <unistd.h>
/* ── palette (modern dark) ───────────────────────────────────────────── */
#define COLOR_TITLE_ACTIVE 0x1E4D78 /* deep blue active title bar */
#define COLOR_TITLE_INACTIVE 0x252830 /* dark grey inactive */
#define COLOR_TITLE_TEXT_ACT 0xE8EEF8 /* near-white active text */
#define COLOR_TITLE_TEXT_INACT 0x5C6070 /* dimmed inactive text */
#define COLOR_BORDER_LIGHT 0x3A6898 /* blue-grey highlight */
#define COLOR_BORDER_DARK 0x0C1018 /* near-black shadow */
#define COLOR_CLOSE_BTN 0xCC3333 /* red close */
#define COLOR_MAXIMIZE_BTN 0x2E8B44 /* green maximize */
#define COLOR_MINIMIZE_BTN 0xBB8820 /* amber minimize */
#define COLOR_CLOSE_BTN_HOV 0xFF5050
#define COLOR_MAXIMIZE_BTN_HOV 0x44CC66
#define COLOR_MINIMIZE_BTN_HOV 0xFFBB30
#define COLOR_BG 0x1A2840 /* desktop background */
#define COLOR_SNAP_OVERLAY 0x3A6898 /* snap highlight (unused, placeholder) */
/* ── palette (macOS dark mode) ───────────────────────────────────────── */
#define COLOR_TITLE_ACTIVE 0x3C3C3C /* macOS dark titlebar */
#define COLOR_TITLE_INACTIVE 0x2C2C2C /* inactive, slightly darker */
#define COLOR_TITLE_TEXT_ACT 0xFFFFFF /* white active text */
#define COLOR_TITLE_TEXT_INACT 0x686868 /* dimmed inactive text */
#define COLOR_BORDER_LIGHT 0x505050 /* subtle border highlight */
#define COLOR_BORDER_DARK 0x1C1C1C /* near-black shadow */
#define COLOR_CLOSE_BTN 0xFF5F57 /* macOS traffic-light red */
#define COLOR_MAXIMIZE_BTN 0x28C840 /* macOS traffic-light green */
#define COLOR_MINIMIZE_BTN 0xFEBC2E /* macOS traffic-light yellow */
#define COLOR_CLOSE_BTN_HOV 0xFF3B30
#define COLOR_MAXIMIZE_BTN_HOV 0x34C759
#define COLOR_MINIMIZE_BTN_HOV 0xFFCC00
#define COLOR_BG 0x1C1C1C /* near-black desktop */
#define COLOR_SNAP_OVERLAY 0x4A90D9 /* macOS blue snap highlight */
/* ── geometry ────────────────────────────────────────────────────────── */
#define TITLE_HEIGHT 28 /* taller for modern look */
#define TITLE_HEIGHT 28 /* macOS-style height */
#define TITLE_TAB_W 200
#define BORDER_W 3
#define BTN_SIZE 14
#define BTN_MARGIN 5
#define BORDER_W 1 /* thin 1px macOS-style border */
#define BTN_SIZE 12 /* macOS traffic-light diameter */
#define BTN_MARGIN 8 /* spacing between traffic lights */
#define BTN_LEFT_PAD 10 /* left edge → first button */
#define RESIZE_GRIP 12
#define MIN_WIN_W 120
#define MIN_WIN_H 60
@@ -41,15 +42,15 @@
#define DBL_CLICK_MS 400 /* double-click threshold */
/*
* Three buttons on right side (left to right): minimize, maximize, close
* close = fw - BTN_SIZE - BTN_MARGIN - BORDER_W
* max = close - BTN_SIZE - BTN_MARGIN - 2
* min = max - BTN_SIZE - BTN_MARGIN - 2
* macOS-style: three traffic-light buttons on LEFT side
* close = BTN_LEFT_PAD
* minimize = BTN_LEFT_PAD + BTN_SIZE + BTN_MARGIN
* maximize = BTN_LEFT_PAD + (BTN_SIZE + BTN_MARGIN) * 2
*/
#define BTN_CLOSE_X(fw) ((fw) - BTN_SIZE - BTN_MARGIN - BORDER_W)
#define BTN_MAX_X(fw) ((fw) - BTN_SIZE*2 - BTN_MARGIN*2 - BORDER_W - 2)
#define BTN_MIN_X(fw) ((fw) - BTN_SIZE*3 - BTN_MARGIN*3 - BORDER_W - 4)
#define BTN_Y (((TITLE_HEIGHT) - BTN_SIZE) / 2)
#define BTN_CLOSE_X (BTN_LEFT_PAD)
#define BTN_MIN_X (BTN_LEFT_PAD + BTN_SIZE + BTN_MARGIN)
#define BTN_MAX_X (BTN_LEFT_PAD + (BTN_SIZE + BTN_MARGIN) * 2)
#define BTN_Y (((TITLE_HEIGHT) - BTN_SIZE) / 2)
/* ── fonts ───────────────────────────────────────────────────────────── */
#define FONT_TITLE "Sans:size=9:weight=bold"