Loading...
Searching...
No Matches
ml::GraphicTheme Struct Reference

Theme tokens for all visual components. More...

#include <Malena/Traits/Theme/GraphicTheme.h>

Inheritance diagram for ml::GraphicTheme:
[legend]

Public Member Functions

virtual ~GraphicTheme ()=default
virtual GraphicThemeapplyFrom (const Theme &t)
 Populate all fields from the global Theme token set.
sf::Color getFillColor () const
sf::Color getOutlineColor () const
float getOutlineThickness () const
float getRadius () const
void setFillColor (const sf::Color &c)
void setOutlineColor (const sf::Color &c)
void setOutlineThickness (float t)
void setRadius (float r)

Public Attributes

sf::Color fillColor = sf::Color(40, 40, 40)
sf::Color outlineColor = sf::Color(100, 100, 100)
float outlineThickness = 1.5f
float radius = 8.f

Detailed Description

Theme tokens for all visual components.

Maps universal Theme tokens to the lowest-level visual variables shared by every drawable component. All other theme structs inherit from this.

Getters and setters are defined here so any component that inherits GraphicTheme exposes them directly on its own API.

Inheritance chain

└── ControlTheme
└── ToggleTheme
└── PillTheme
└── SegmentTheme
└── ButtonTheme
Theme tokens for the ButtonToggle (rectangular toggle button).
Definition ButtonTheme.h:28
Theme tokens for interactive UI controls.
Theme tokens for all visual components.
Theme tokens for the PillToggle (iOS-style oval switch).
Definition PillTheme.h:48
Theme tokens for the SegmentToggle (Hotels/Apartments style).
Theme tokens shared by all toggle variants.
Definition ToggleTheme.h:31
See also
ControlTheme, Theme, ThemeManager

Definition at line 41 of file GraphicTheme.h.

Constructor & Destructor Documentation

◆ ~GraphicTheme()

virtual ml::GraphicTheme::~GraphicTheme ( )
virtualdefault

Member Function Documentation

◆ applyFrom()

◆ getFillColor()

sf::Color ml::GraphicTheme::getFillColor ( ) const
inlinenodiscard

Definition at line 67 of file GraphicTheme.h.

◆ getOutlineColor()

sf::Color ml::GraphicTheme::getOutlineColor ( ) const
inlinenodiscard

Definition at line 68 of file GraphicTheme.h.

◆ getOutlineThickness()

float ml::GraphicTheme::getOutlineThickness ( ) const
inlinenodiscard

Definition at line 69 of file GraphicTheme.h.

◆ getRadius()

float ml::GraphicTheme::getRadius ( ) const
inlinenodiscard

Definition at line 70 of file GraphicTheme.h.

◆ setFillColor()

void ml::GraphicTheme::setFillColor ( const sf::Color & c)
inline

Definition at line 72 of file GraphicTheme.h.

◆ setOutlineColor()

void ml::GraphicTheme::setOutlineColor ( const sf::Color & c)
inline

Definition at line 73 of file GraphicTheme.h.

◆ setOutlineThickness()

void ml::GraphicTheme::setOutlineThickness ( float t)
inline

Definition at line 74 of file GraphicTheme.h.

◆ setRadius()

void ml::GraphicTheme::setRadius ( float r)
inline

Definition at line 75 of file GraphicTheme.h.

Member Data Documentation

◆ fillColor

sf::Color ml::GraphicTheme::fillColor = sf::Color(40, 40, 40)

Definition at line 43 of file GraphicTheme.h.

◆ outlineColor

sf::Color ml::GraphicTheme::outlineColor = sf::Color(100, 100, 100)

Definition at line 44 of file GraphicTheme.h.

◆ outlineThickness

float ml::GraphicTheme::outlineThickness = 1.5f

Definition at line 45 of file GraphicTheme.h.

◆ radius

float ml::GraphicTheme::radius = 8.f

Definition at line 46 of file GraphicTheme.h.


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