Skip to content

main/appearance

Defined in: app/src/main/appearance.ts:23

Applies the appearance settings: the color mode to Chromium, so pages and the window follow it, and the accent and density as design tokens to every view of the browser’s own UI. New views get the tokens on their command line, so they paint with them at once; open views get them as an event when they change. The color math for a custom accent loads with the first custom accent; the presets need none.

new AppearanceController(settings, router, internal, onColorsChanged, solve?): AppearanceController

Defined in: app/src/main/appearance.ts:40

SettingsService

Loaded settings.

IpcRouter

Publishes token changes.

Session

Session of the browser’s own views.

() => void

Called after the light or dark colors changed, for example to repaint window backgrounds.

(accent) => AccentColors

Computes the colors of a custom accent, when one is set at the start.

AppearanceController

get argument(): string

Defined in: app/src/main/appearance.ts:67

The command line argument that gives a new view the current tokens.

string

dispose(): void

Defined in: app/src/main/appearance.ts:72

Stops following the settings.

void

Disposable.dispose

static create(settings, router, internal, onColorsChanged): Promise<AppearanceController>

Defined in: app/src/main/appearance.ts:84

Makes the controller for the settings at the start; a custom accent loads its color math first, so the first window paints with it.

SettingsService

Loaded settings.

IpcRouter

Publishes token changes.

Session

Session of the browser’s own views.

() => void

Called after the light or dark colors changed.

Promise<AppearanceController>