diff options
Diffstat (limited to 'src/theme_builder/components/stylers/PreferredSizeStylerEditor.cpp')
-rw-r--r-- | src/theme_builder/components/stylers/PreferredSizeStylerEditor.cpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/theme_builder/components/stylers/PreferredSizeStylerEditor.cpp b/src/theme_builder/components/stylers/PreferredSizeStylerEditor.cpp deleted file mode 100644 index fb713c8c..00000000 --- a/src/theme_builder/components/stylers/PreferredSizeStylerEditor.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include "PreferredSizeStylerEditor.h" -#include "cru/ui/style/Styler.h" - -namespace cru::theme_builder::components::stylers { -PreferredSizeStylerEditor::PreferredSizeStylerEditor() { - SetLabel(u"Preferred Size Styler"); - GetContainer()->AddChild(width_editor_.GetRootControl()); - GetContainer()->AddChild(height_editor_.GetRootControl()); - - width_editor_.SetLabel(u"Width"); - height_editor_.SetLabel(u"Height"); - - ConnectChangeEvent(width_editor_); - ConnectChangeEvent(height_editor_); -} - -PreferredSizeStylerEditor::~PreferredSizeStylerEditor() {} - -ClonablePtr<ui::style::PreferredSizeStyler> -PreferredSizeStylerEditor::GetValue() { - return ui::style::PreferredSizeStyler::Create(ui::render::MeasureSize{ - width_editor_.GetValue(), height_editor_.GetValue()}); -} - -void PreferredSizeStylerEditor::SetValue(ui::style::PreferredSizeStyler* styler, - bool trigger_change) { - width_editor_.SetValue(styler->GetPreferredSize().width, false); - height_editor_.SetValue(styler->GetPreferredSize().height, false); - - if (trigger_change) { - RaiseChangeEvent(); - } -} -} // namespace cru::theme_builder::components::stylers |