diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ui/style/Styler.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ui/style/Styler.cpp b/src/ui/style/Styler.cpp index 44a24462..3d7ff1f9 100644 --- a/src/ui/style/Styler.cpp +++ b/src/ui/style/Styler.cpp @@ -6,6 +6,8 @@ #include "cru/platform/gui/UiApplication.h" #include "cru/ui/controls/Control.h" #include "cru/ui/controls/IBorderControl.h" +#include "cru/ui/controls/IContentBrushControl.h" +#include "cru/ui/controls/IFontControl.h" #include "cru/ui/style/ApplyBorderStyleInfo.h" namespace cru::ui::style { @@ -38,4 +40,17 @@ void MarginStyler::Apply(controls::Control *control) const { void PaddingStyler::Apply(controls::Control *control) const { control->SetPadding(padding_); } + +void ContentBrushStyler::Apply(controls::Control *control) const { + if (auto content_brush_control = + dynamic_cast<controls::IContentBrushControl *>(control)) { + content_brush_control->SetContentBrush(brush_); + } +} + +void FontStyler::Apply(controls::Control *control) const { + if (auto font_control = dynamic_cast<controls::IFontControl *>(control)) { + font_control->SetFont(font_); + } +} } // namespace cru::ui::style |