Loading...
Searching...
No Matches
PillTheme.h
Go to the documentation of this file.
1//
2// PillTheme.h
3//
4
5#ifndef MALENA_PILLTHEME_H
6#define MALENA_PILLTHEME_H
7
8#pragma once
9
12
13namespace ml
14{
15 // ── PillTheme ─────────────────────────────────────────────────────────────
16
48 {
55
56 // ── applyFrom ─────────────────────────────────────────────────────────
57
70
71 // ── Assignment from parent levels ─────────────────────────────────────
72
74 {
75 static_cast<ToggleTheme&>(*this) = t;
76 return *this;
77 }
78
80 {
81 static_cast<ToggleTheme&>(*this) = c;
82 return *this;
83 }
84
86 {
87 static_cast<ToggleTheme&>(*this) = g;
88 return *this;
89 }
90
91 // ── Getters / setters ─────────────────────────────────────────────────
92
93 [[nodiscard]] sf::Color getTrackOnColor() const { return trackOnColor; }
94 [[nodiscard]] sf::Color getTrackOffColor() const { return trackOffColor; }
95 [[nodiscard]] sf::Color getThumbColor() const { return thumbColor; }
96 [[nodiscard]] sf::Color getThumbDisabledColor() const { return thumbDisabledColor; }
97 [[nodiscard]] sf::Color getPillLabelActiveColor() const { return pillLabelActiveColor; }
99
100 void setTrackOnColor(const sf::Color& c) { trackOnColor = c; }
102 void setThumbColor(const sf::Color& c) { thumbColor = c; }
106 };
107
108} // namespace ml
109
110#endif // MALENA_PILLTHEME_H
static const Color White
std::uint8_t b
std::uint8_t g
std::uint8_t r
Definition Component.h:22
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
PillTheme & operator=(const GraphicTheme &g)
Definition PillTheme.h:85
sf::Color getPillLabelActiveColor() const
Definition PillTheme.h:97
sf::Color thumbDisabledColor
Definition PillTheme.h:52
void setPillLabelActiveColor(const sf::Color &c)
Definition PillTheme.h:104
sf::Color getTrackOffColor() const
Definition PillTheme.h:94
sf::Color getTrackOnColor() const
Definition PillTheme.h:93
sf::Color getThumbColor() const
Definition PillTheme.h:95
sf::Color thumbColor
Definition PillTheme.h:51
PillTheme & applyFrom(const Theme &t) override
Populate all fields from the global Theme token set.
Definition PillTheme.h:58
void setThumbColor(const sf::Color &c)
Definition PillTheme.h:102
PillTheme & operator=(const ToggleTheme &t)
Definition PillTheme.h:73
sf::Color getPillLabelInactiveColor() const
Definition PillTheme.h:98
sf::Color getThumbDisabledColor() const
Definition PillTheme.h:96
sf::Color trackOffColor
Definition PillTheme.h:50
void setThumbDisabledColor(const sf::Color &c)
Definition PillTheme.h:103
sf::Color pillLabelInactiveColor
Definition PillTheme.h:54
void setTrackOffColor(const sf::Color &c)
Definition PillTheme.h:101
void setTrackOnColor(const sf::Color &c)
Definition PillTheme.h:100
sf::Color pillLabelActiveColor
Definition PillTheme.h:53
PillTheme & operator=(const ControlTheme &c)
Definition PillTheme.h:79
sf::Color trackOnColor
Definition PillTheme.h:49
void setPillLabelInactiveColor(const sf::Color &c)
Definition PillTheme.h:105
Universal design token set applied across all Themeable components.
Definition Theme.h:70
sf::Color border
Definition Theme.h:98
sf::Color onPrimary
Definition Theme.h:89
sf::Color primary
Definition Theme.h:74
sf::Color onSurface
Definition Theme.h:86
sf::Color onDisabled
Definition Theme.h:113
Theme tokens shared by all toggle variants.
Definition ToggleTheme.h:31
ToggleTheme & applyFrom(const Theme &t) override
Populate all fields from the global Theme token set.
Definition ToggleTheme.h:38