diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/theme_builder/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/theme_builder/components/properties/OptionalPropertyEditor.h | 5 | ||||
-rw-r--r-- | src/theme_builder/components/stylers/BorderStylerEditor.cpp (renamed from src/theme_builder/components/styler/BorderStylerEditor.cpp) | 4 | ||||
-rw-r--r-- | src/theme_builder/components/stylers/BorderStylerEditor.h (renamed from src/theme_builder/components/styler/BorderStylerEditor.h) | 4 |
4 files changed, 8 insertions, 6 deletions
diff --git a/src/theme_builder/CMakeLists.txt b/src/theme_builder/CMakeLists.txt index 5c57f12b..902173fd 100644 --- a/src/theme_builder/CMakeLists.txt +++ b/src/theme_builder/CMakeLists.txt @@ -9,6 +9,7 @@ add_executable(cru_theme_builder components/properties/PointPropertyEditor.cpp components/properties/TextPropertyEditor.cpp components/properties/ThicknessPropertyEditor.cpp + components/stylers/BorderStylerEditor.cpp ) if(APPLE) diff --git a/src/theme_builder/components/properties/OptionalPropertyEditor.h b/src/theme_builder/components/properties/OptionalPropertyEditor.h index 87ddcaa2..03eb759c 100644 --- a/src/theme_builder/components/properties/OptionalPropertyEditor.h +++ b/src/theme_builder/components/properties/OptionalPropertyEditor.h @@ -13,7 +13,7 @@ class OptionalPropertyEditor : public ui::components::Component { OptionalPropertyEditor() { container_.AddChild(&check_box_); - container_.AddChild(editor_->GetRootControl()); + container_.AddChild(editor_.GetRootControl()); editor_.ChangeEvent()->AddHandler([this](std::nullptr_t) { if (IsEnabled()) { @@ -34,7 +34,8 @@ class OptionalPropertyEditor : public ui::components::Component { } std::optional<PropertyType> GetValue() const { - return IsEnabled() ? editor_.GetValue() : std::nullopt; + return IsEnabled() ? std::optional<PropertyType>(editor_.GetValue()) + : std::nullopt; } void SetValue(std::optional<PropertyType> value, bool trigger_change = true) { diff --git a/src/theme_builder/components/styler/BorderStylerEditor.cpp b/src/theme_builder/components/stylers/BorderStylerEditor.cpp index 819e67c0..4f36aec8 100644 --- a/src/theme_builder/components/styler/BorderStylerEditor.cpp +++ b/src/theme_builder/components/stylers/BorderStylerEditor.cpp @@ -6,7 +6,7 @@ #include "cru/ui/style/ApplyBorderStyleInfo.h" #include "cru/ui/style/Styler.h" -namespace cru::theme_builder::components::styler { +namespace cru::theme_builder::components::stylers { BorderStylerEditor::BorderStylerEditor() { container_.AddChild(corner_radius_editor_.GetRootControl()); container_.AddChild(thickness_editor_.GetRootControl()); @@ -92,4 +92,4 @@ void BorderStylerEditor::SetValue( } } -} // namespace cru::theme_builder::components::styler +} // namespace cru::theme_builder::components::stylers diff --git a/src/theme_builder/components/styler/BorderStylerEditor.h b/src/theme_builder/components/stylers/BorderStylerEditor.h index 991647e7..8e9a4e6f 100644 --- a/src/theme_builder/components/styler/BorderStylerEditor.h +++ b/src/theme_builder/components/stylers/BorderStylerEditor.h @@ -10,7 +10,7 @@ #include "cru/ui/controls/FlexLayout.h" #include "cru/ui/style/Styler.h" -namespace cru::theme_builder::components::styler { +namespace cru::theme_builder::components::stylers { class BorderStylerEditor : public ui::components::Component { public: BorderStylerEditor(); @@ -38,4 +38,4 @@ class BorderStylerEditor : public ui::components::Component { Event<std::nullptr_t> change_event_; }; -} // namespace cru::theme_builder::components::styler +} // namespace cru::theme_builder::components::stylers |