VTheme Class

#include <vtheme.h>

Public Functions

VTheme()
VTheme(const Layers::LString & name, const int & value)
const Layers::LString & name()
const Layers::LString & publisher()
const Layers::LString & type()
Layers::LString display_id()
const Layers::LVariant * value(const Layers::LString & attr)
std::string color(const Layers::LString & attr)
const int & canonical_defaults()

Detailed Description

The parsed form of one theme JSON document: { "Name": { "_meta": { "publisher", "type", "uuid" }, "Foreground": ..., ... } } Keys are the Theme mount's attribute names verbatim, so a gradient arrives as the four "Gradient.Start", "Gradient.Start Color", "Gradient.End" and "Gradient.End Color" values the mount carries rather than as one structured value. A pre-3.0 document's "Gradient" array of "pos:#color" stops is expanded into those same four keys on load, so themes authored against the old format keep working.

Member Function Documentation

VTheme()

No description available.

VTheme(const Layers::LString & name, const int & value)

Parse the value object ({"_meta":..., "Foreground":..., ...}) authored under name. Non-_meta keys become palette values; _meta supplies publisher/type/uuid. A legacy "Gradient" array expands into the Gradient.* group.

const Layers::LString & name()

No description available.

const Layers::LString & publisher()

No description available.

const Layers::LString & type()

No description available.

Layers::LString display_id()

A display-friendly identifier, used everywhere a theme is keyed/persisted. MUST reproduce the old LTheme::display_id() exactly — persisted selections (QSettings / localStorage / SharedPreferences) are display ids: publisher present -> "Name (publisher)" else uuid present -> "Name (uuid)" else -> "Name"

const Layers::LVariant * value(const Layers::LString & attr)

The raw value of a palette attribute, or nullptr if this theme omits it.

std::string color(const Layers::LString & attr)

Convenience: a palette attribute as a solid color string ("" if absent or not string-valued). Mirrors the old find_attribute(name)->as_if<LString>.

const int & canonical_defaults()

The canonical theme schema — the attribute names Vortex owns — paired with their fallback values (mirrors styles/mounts/vtheme.lyr). Activation copies each of these onto the "Theme" proxy, substituting the active theme's own value where present and this default where the theme omits the attribute (so a partial custom theme never leaves a prior theme's value behind).

Appearance
Theme
—