Home /Modules/gui/GUI-THEME.md

GUI-THEME.md

lib/gui/GUI-THEME.md · 71 line(s) · markdown

SLeeLa GUI Theme Contract

Scope: version-mual 1.0, version-gual 2.0, version-thual 3.0, version-dual 4.0, and version-military 5.0.

The five GUI lines are related, progressively extended implementations—not five independent theme systems. Their shared visual contract is defined here and in gui/native/sleela_gui_theme.h.

Required Chrome Colors

TokenValuePurpose
title-bar#1D2025Base title-bar background
menu-bar#1D2025Menu-bar background
url-bar#383C47URL/navigation field background

These values are fixed across all five GUI lines. Do not fork or silently reinterpret them per version.

Shared Supporting Palette

TokenValuePurpose
panel#292D35Secondary panels and sidebars
surface#22262DMain application surfaces
text#E8EAEDPrimary text on dark surfaces
muted-text#B0B7C3Secondary text
border#444A56Dividers and outlines
accent#4F8CFFInteractive accent
focus#8AB4F8Keyboard focus indication
danger#D9534FError/destructive state
success#3FA776Positive state

The supporting palette is a shared default. Products may add semantic tokens, but must retain the required title-bar and URL-bar colors and provide visible keyboard focus, readable text, and non-color-only status cues.

Transitional Menu Depth Tokens

The five SLGuiTheme.sleela files share menu-specific presentation tokens for the custom-widget fallback and hosts that can render elevated popups:

TokenDefaultIntended use
MENU_POPUP_SURFACE#292D35Dropdown surface
MENU_POPUP_EDGE#505866Fine popup outline
MENU_ITEM_HOVER#343A44Hovered item
MENU_ITEM_PRESSED#252A32Pressed item
MENU_ITEM_HIGHLIGHT#3A404BActive/open emphasis
MENU_POPUP_SHADOW0 8px 20px rgba(0,0,0,0.28)Soft elevation
MENU_POPUP_RADIUS6Nominal corner radius in px
MENU_ITEM_RAISE1Maximum subtle depth response in px
MENU_TRANSITION_MS120Short transition duration in ms

These are transitional design tokens, not new mandatory native theme-color entries. The values are source-defined in every GUI version to keep the design consistent. Host renderers should translate them to native toolkit properties where supported; they must not pass CSS-like shadow strings to a native API that expects a different representation. If a host cannot render a shadow or transition, it should retain the popup edge, item states, and focus indicator instead of failing or silently changing layout.

Responsibilities

Verification

Run make clean all test from gui/native. The native test checks required colors, lookup bounds, null handling, and every registered token. GUI CI should validate the source library for all five version lines before release.

Source-of-Truth Rule: The five GUI examples and SLGuiTheme.sleela define the palette directly in SLeeLa source code. The SLGuiApp implementations apply those tokens to the live window theme. Do not depend on external theme files, environment variables, or generated settings to select these colors; editing the source palette is the authoritative change.