Loading...
Searching...
No Matches
GraphicTheme.h
Go to the documentation of this file.
1//
2// GraphicTheme.h
3//
4
5#ifndef MALENA_GRAPHICTHEME_H
6#define MALENA_GRAPHICTHEME_H
7
8#pragma once
9
13
14namespace ml
15{
16 // ── GraphicTheme ──────────────────────────────────────────────────────────
17
42 {
45 float outlineThickness = 1.5f;
46 float radius = 8.f;
47
48 // ── applyFrom ─────────────────────────────────────────────────────────
49
56 virtual GraphicTheme& applyFrom(const Theme& t)
57 {
61 radius = t.radius;
62 return *this;
63 }
64
65 // ── Getters / setters ─────────────────────────────────────────────────
66
67 [[nodiscard]] sf::Color getFillColor() const { return fillColor; }
68 [[nodiscard]] sf::Color getOutlineColor() const { return outlineColor; }
69 [[nodiscard]] float getOutlineThickness() const { return outlineThickness; }
70 [[nodiscard]] float getRadius() const { return radius; }
71
72 void setFillColor(const sf::Color& c) { fillColor = c; }
73 void setOutlineColor(const sf::Color& c) { outlineColor = c; }
75 void setRadius(float r) { radius = r; }
76
77 // ── Assignment from parent ────────────────────────────────────────────
78 // (base of the chain — no parent to assign from)
79
80 virtual ~GraphicTheme() = default;
81 };
82
83} // namespace ml
84
85#endif // MALENA_GRAPHICTHEME_H
Definition Component.h:22
Theme tokens for all visual components.
float getRadius() const
void setFillColor(const sf::Color &c)
void setRadius(float r)
float getOutlineThickness() const
void setOutlineColor(const sf::Color &c)
sf::Color getFillColor() const
sf::Color getOutlineColor() const
sf::Color outlineColor
sf::Color fillColor
void setOutlineThickness(float t)
virtual GraphicTheme & applyFrom(const Theme &t)
Populate all fields from the global Theme token set.
virtual ~GraphicTheme()=default
Universal design token set applied across all Themeable components.
Definition Theme.h:70
sf::Color border
Definition Theme.h:98
float borderThickness
Definition Theme.h:138
float radius
Definition Theme.h:132
sf::Color surface
Definition Theme.h:80