main/appearance
Classes
Section titled “Classes”AppearanceController
Section titled “AppearanceController”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.
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AppearanceController(
settings,router,internal,onColorsChanged,solve?):AppearanceController
Defined in: app/src/main/appearance.ts:40
Parameters
Section titled “Parameters”settings
Section titled “settings”Loaded settings.
router
Section titled “router”Publishes token changes.
internal
Section titled “internal”Session
Session of the browser’s own views.
onColorsChanged
Section titled “onColorsChanged”() => void
Called after the light or dark colors changed, for example to repaint window backgrounds.
solve?
Section titled “solve?”(accent) => AccentColors
Computes the colors of a custom accent, when one is set at the start.
Returns
Section titled “Returns”Accessors
Section titled “Accessors”argument
Section titled “argument”Get Signature
Section titled “Get Signature”get argument():
string
Defined in: app/src/main/appearance.ts:67
The command line argument that gives a new view the current tokens.
Returns
Section titled “Returns”string
Methods
Section titled “Methods”dispose()
Section titled “dispose()”dispose():
void
Defined in: app/src/main/appearance.ts:72
Stops following the settings.
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”create()
Section titled “create()”
staticcreate(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.
Parameters
Section titled “Parameters”settings
Section titled “settings”Loaded settings.
router
Section titled “router”Publishes token changes.
internal
Section titled “internal”Session
Session of the browser’s own views.
onColorsChanged
Section titled “onColorsChanged”() => void
Called after the light or dark colors changed.
Returns
Section titled “Returns”Promise<AppearanceController>