Loading...
Searching...
No Matches
ListTheme.h
Go to the documentation of this file.
1//
2// ListTheme.h
3//
4
5#ifndef MALENA_LISTTHEME_H
6#define MALENA_LISTTHEME_H
7
8#pragma once
9
12
13namespace ml
14{
24 {
27
28 // ── applyFrom ─────────────────────────────────────────────────────────
29
30 ListTheme& applyFrom(const Theme& t) override
31 {
33 bgColor = t.surface;
35 return *this;
36 }
37
38 // ── Assignment from parent levels ─────────────────────────────────────
39
41 { static_cast<ControlTheme&>(*this) = c; return *this; }
42
44 { static_cast<ControlTheme&>(*this) = g; return *this; }
45
46 // ── Getters / setters ─────────────────────────────────────────────────
47
48 [[nodiscard]] sf::Color getBgColor() const { return bgColor; }
49 [[nodiscard]] sf::Color getDividerColor() const { return dividerColor; }
50
51 void setBgColor(const sf::Color& c) { bgColor = c; }
52 void setDividerColor(const sf::Color& c) { dividerColor = c; }
53 };
54
55} // namespace ml
56
57#endif // MALENA_LISTTHEME_H
Definition Component.h:22
Theme tokens for interactive UI controls.
ControlTheme & applyFrom(const Theme &t) override
Populate all fields from the global Theme token set.
Theme tokens for all visual components.
Color tokens for List.
Definition ListTheme.h:24
void setDividerColor(const sf::Color &c)
Definition ListTheme.h:52
sf::Color getDividerColor() const
Definition ListTheme.h:49
sf::Color dividerColor
Definition ListTheme.h:26
ListTheme & operator=(const ControlTheme &c)
Definition ListTheme.h:40
void setBgColor(const sf::Color &c)
Definition ListTheme.h:51
ListTheme & applyFrom(const Theme &t) override
Populate all fields from the global Theme token set.
Definition ListTheme.h:30
sf::Color bgColor
Definition ListTheme.h:25
ListTheme & operator=(const GraphicTheme &g)
Definition ListTheme.h:43
sf::Color getBgColor() const
Definition ListTheme.h:48
Universal design token set applied across all Themeable components.
Definition Theme.h:70
sf::Color border
Definition Theme.h:98
sf::Color surface
Definition Theme.h:80