aboutsummaryrefslogtreecommitdiff
path: root/src/theme_builder/components/stylers/StylerEditor.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-02-24 16:06:27 +0800
committercrupest <crupest@outlook.com>2022-02-24 16:06:27 +0800
commita7f5275267e1b504b119e2e3b7fcd46a88874821 (patch)
tree0a61d692e0b4bd267f11527c552175424e6105a2 /src/theme_builder/components/stylers/StylerEditor.cpp
parent640401bf2f4b3da3708970a1408b27e159f93631 (diff)
downloadcru-a7f5275267e1b504b119e2e3b7fcd46a88874821.tar.gz
cru-a7f5275267e1b504b119e2e3b7fcd46a88874821.tar.bz2
cru-a7f5275267e1b504b119e2e3b7fcd46a88874821.zip
...
Diffstat (limited to 'src/theme_builder/components/stylers/StylerEditor.cpp')
-rw-r--r--src/theme_builder/components/stylers/StylerEditor.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/theme_builder/components/stylers/StylerEditor.cpp b/src/theme_builder/components/stylers/StylerEditor.cpp
index 99eaebad..08684edc 100644
--- a/src/theme_builder/components/stylers/StylerEditor.cpp
+++ b/src/theme_builder/components/stylers/StylerEditor.cpp
@@ -2,6 +2,7 @@
#include "BorderStylerEditor.h"
#include "CompoundStylerEditor.h"
#include "CursorStylerEditor.h"
+#include "PreferredSizeStylerEditor.h"
#include "cru/ui/style/Styler.h"
namespace cru::theme_builder::components::stylers {
@@ -27,6 +28,11 @@ std::unique_ptr<StylerEditor> CreateStylerEditor(ui::style::Styler* styler) {
auto editor = std::make_unique<CursorStylerEditor>();
editor->SetValue(cursor_styler);
return editor;
+ } else if (auto preferred_size_styler =
+ dynamic_cast<ui::style::PreferredSizeStyler*>(styler)) {
+ auto editor = std::make_unique<PreferredSizeStylerEditor>();
+ editor->SetValue(preferred_size_styler);
+ return editor;
} else {
throw Exception(u"Unknown styler type");
}