Aurore
A Switch-like interface for your app, on every screen
Loading...
Searching...
No Matches
aurore::ThemeInfo Struct Reference

A theme file as listThemes() or inspect() read it, without applying it. More...

#include <aurore/core/theme.hpp>

Classes

struct  Preview
 A few colours to show it in a picker, per variant it styles. More...
 

Public Member Functions

const ThemeBackground & background (ThemeVariant variant) const
 
const ThemePictures & pictures (ThemeVariant variant) const
 
const ThemeDecor & decor (ThemeVariant variant) const
 
bool ok () const
 Whether it was read without errors.
 
ThemeVariant variant () const
 The variant to show it in when it styles one only.
 
bool styles (ThemeVariant variant) const
 Whether it styles variant.
 

Public Attributes

std::string path
 as given to loadFile(); "builtin:<id>" for a preset
 
std::string id
 the file's name without its extension
 
std::string name
 its name, else the id
 
std::string author
 its author
 
std::string version
 its version
 
std::string description
 
std::string backgroundImage
 
std::string icon
 
std::string counterpart
 
bool light = false
 
bool dark = false
 
Preview lightPreview {}
 
Preview darkPreview {}
 
ThemeBackground lightBackground
 Each variant's background (image, fit, dim, surface opacity)
 
ThemeBackground darkBackground
 
ThemePictures lightPictures
 Each variant's logo, icons, preview and image slots' pictures.
 
ThemePictures darkPictures
 
ThemeDecor lightDecor
 Each variant's decorations (backdrops, strips, particles)
 
ThemeDecor darkDecor
 
std::vector< std::string > errors
 "line 4: #12 is not a colour"…: lines skipped, files not found.
 
std::vector< std::string > warnings
 

Detailed Description

A theme file as listThemes() or inspect() read it, without applying it.

Member Function Documentation

◆ background()

const ThemeBackground & aurore::ThemeInfo::background ( ThemeVariant  variant) const
inline

◆ decor()

const ThemeDecor & aurore::ThemeInfo::decor ( ThemeVariant  variant) const
inline

◆ ok()

bool aurore::ThemeInfo::ok ( ) const
inline

Whether it was read without errors.

◆ pictures()

const ThemePictures & aurore::ThemeInfo::pictures ( ThemeVariant  variant) const
inline

◆ styles()

bool aurore::ThemeInfo::styles ( ThemeVariant  variant) const
inline

Whether it styles variant.

◆ variant()

ThemeVariant aurore::ThemeInfo::variant ( ) const
inline

The variant to show it in when it styles one only.

Member Data Documentation

◆ author

std::string aurore::ThemeInfo::author

its author

◆ backgroundImage

std::string aurore::ThemeInfo::backgroundImage

Its background_image: the dark variant's, else the light one's; "" without one (each variant's below)

◆ counterpart

std::string aurore::ThemeInfo::counterpart

For a file that styles one variant, the theme file of the other one (counterpart, as given to loadFile; "" without one): what a picker switches to when the other variant is asked for.

◆ dark

bool aurore::ThemeInfo::dark = false

◆ darkBackground

ThemeBackground aurore::ThemeInfo::darkBackground

◆ darkDecor

ThemeDecor aurore::ThemeInfo::darkDecor

◆ darkPictures

ThemePictures aurore::ThemeInfo::darkPictures

◆ darkPreview

Preview aurore::ThemeInfo::darkPreview {}

◆ description

std::string aurore::ThemeInfo::description

its description

◆ errors

std::vector<std::string> aurore::ThemeInfo::errors

"line 4: #12 is not a colour"…: lines skipped, files not found.

◆ icon

std::string aurore::ThemeInfo::icon

Its icon, the Cadran icon a picker shows it with ("snowflake"...), "" without one

◆ id

std::string aurore::ThemeInfo::id

the file's name without its extension

◆ light

bool aurore::ThemeInfo::light = false

The variants it styles: one when it inherits light or dark, both when it has [light] and [dark] (it then follows the system's mode).

◆ lightBackground

ThemeBackground aurore::ThemeInfo::lightBackground

Each variant's background (image, fit, dim, surface opacity)

◆ lightDecor

ThemeDecor aurore::ThemeInfo::lightDecor

Each variant's decorations (backdrops, strips, particles)

◆ lightPictures

ThemePictures aurore::ThemeInfo::lightPictures

Each variant's logo, icons, preview and image slots' pictures.

◆ lightPreview

Preview aurore::ThemeInfo::lightPreview {}

◆ name

std::string aurore::ThemeInfo::name

its name, else the id

◆ path

std::string aurore::ThemeInfo::path

as given to loadFile(); "builtin:<id>" for a preset

◆ version

std::string aurore::ThemeInfo::version

its version

◆ warnings

std::vector<std::string> aurore::ThemeInfo::warnings

Unknown keys and text that reads badly on its background. Text on a background picture is checked only when the picture's colour is known: from an explicit check (inspect or listThemes with decodePictures), or once the picture was loaded in this run; a plain listing never decodes.


The documentation for this struct was generated from the following file: