Skip to main content

Module theme

Module theme 

Source

Modules§

spacing
Spacing scale shared by every Hyprforge app, so a sidebar, a settings row, and a dialog all breathe the same amount no matter which app they’re in (vision pillar #2: one shared visual grammar).
surface
Explicit surface colors, used directly by the shared widget layer instead of leaning on Theme::extended_palette()’s auto-derived shades. Auto-derivation (deviate(base, 0.1) etc.) only shifts lightness a few percent, which reads as “everything is the same flat gray” at normal monitor brightness — real elevation (root vs sidebar vs card) needs a deliberately chosen jump, the way macOS/Windows layer system chrome vs content vs cards.

Structs§

FontScale
A single scale factor threaded through every text/spacing measurement in the shared widget layer, so accessibility (larger text) is a property of the theme rather than something bolted onto individual screens later.

Constants§

BASE_TEXT_SIZE
Base text size in logical pixels before FontScale is applied.

Functions§

active
The active theme, or the default if nobody installed one.
app_theme
Builds the iced::Theme every window in this process is created with, from the resolved active palette rather than an iced built-in — so a window matches the compositor’s own accent instead of iced’s stock dark theme.
error
Danger or failure — a conflicting bind, a destructive button, a value the compositor refused.
info
Somewhere that is not this machine — a remote host, a mounted share.
init
Installs the resolved theme. Call once, before the first frame.
mono_font
The monospace font for anything shown as it is written — a config line, a key, a value.
row_tint
The fill every other setting row gets, so a long page scans as rows without a divider between each one.
success
Something went well — a change applied, a device connected, a battery charging.
text
Primary text color (near-white, not pure white — easier on the eyes on a dark surface).
text_dim
Secondary/meta text — timestamps, hints, IDs.
warning
Something the user should look at before saving — a chord already bound, a combination the compositor will refuse. Not an error: nothing has gone wrong yet.