Loading...
Searching...
No Matches
SegmentTheme.h
Go to the documentation of this file.
1//
2// SegmentTheme.h
3//
4
5#ifndef MALENA_SEGMENTTHEME_H
6#define MALENA_SEGMENTTHEME_H
7
8#pragma once
9
12
13namespace ml
14{
15 // ── SegmentTheme ──────────────────────────────────────────────────────────
16
28 {
33
34 // ── applyFrom ─────────────────────────────────────────────────────────
35
36 SegmentTheme& applyFrom(const Theme& t) override
37 {
43 return *this;
44 }
45
46 // ── Assignment from parent levels ─────────────────────────────────────
47
49 {
50 static_cast<ToggleTheme&>(*this) = t;
51 return *this;
52 }
53
55 {
56 static_cast<ToggleTheme&>(*this) = c;
57 return *this;
58 }
59
61 {
62 static_cast<ToggleTheme&>(*this) = g;
63 return *this;
64 }
65
66 // ── Getters / setters ─────────────────────────────────────────────────
67
68 [[nodiscard]] sf::Color getTrackColor() const { return trackColor; }
69 [[nodiscard]] sf::Color getThumbColor() const { return thumbColor; }
70 [[nodiscard]] sf::Color getActiveTextColor() const { return activeTextColor; }
71 [[nodiscard]] sf::Color getInactiveTextColor() const { return inactiveTextColor; }
72
73 void setTrackColor(const sf::Color& c) { trackColor = c; }
74 void setThumbColor(const sf::Color& c) { thumbColor = c; }
77 };
78
79} // namespace ml
80
81#endif // MALENA_SEGMENTTHEME_H
static const Color White
Definition Component.h:22
Theme tokens for interactive UI controls.
Theme tokens for all visual components.
Theme tokens for the SegmentToggle (Hotels/Apartments style).
SegmentTheme & operator=(const GraphicTheme &g)
void setTrackColor(const sf::Color &c)
SegmentTheme & applyFrom(const Theme &t) override
Populate all fields from the global Theme token set.
SegmentTheme & operator=(const ToggleTheme &t)
SegmentTheme & operator=(const ControlTheme &c)
void setThumbColor(const sf::Color &c)
void setActiveTextColor(const sf::Color &c)
sf::Color getTrackColor() const
sf::Color getActiveTextColor() const
sf::Color getInactiveTextColor() const
sf::Color getThumbColor() const
sf::Color inactiveTextColor
sf::Color trackColor
void setInactiveTextColor(const sf::Color &c)
sf::Color thumbColor
sf::Color activeTextColor
Universal design token set applied across all Themeable components.
Definition Theme.h:70
sf::Color onPrimary
Definition Theme.h:89
sf::Color primary
Definition Theme.h:74
sf::Color muted
Definition Theme.h:95
sf::Color surface
Definition Theme.h:80
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