diff options
| author | Yuqian Yang <crupest@crupest.life> | 2025-11-21 21:43:42 +0800 |
|---|---|---|
| committer | Yuqian Yang <crupest@crupest.life> | 2025-11-21 21:43:42 +0800 |
| commit | 3b875091c445b7465b9bd044914318989a94d2ad (patch) | |
| tree | a358aebb488ec1ddc86bf87b8038bacd5d7515cb /src/ThemeBuilder/components/properties/MeasureLengthPropertyEditor.h | |
| parent | 3cda35dbcbbe1e3854b880169c0efa0fc7a79264 (diff) | |
| download | cru-3b875091c445b7465b9bd044914318989a94d2ad.tar.gz cru-3b875091c445b7465b9bd044914318989a94d2ad.tar.bz2 cru-3b875091c445b7465b9bd044914318989a94d2ad.zip | |
Clean codes. Remove member function const.
Diffstat (limited to 'src/ThemeBuilder/components/properties/MeasureLengthPropertyEditor.h')
| -rw-r--r-- | src/ThemeBuilder/components/properties/MeasureLengthPropertyEditor.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/ThemeBuilder/components/properties/MeasureLengthPropertyEditor.h b/src/ThemeBuilder/components/properties/MeasureLengthPropertyEditor.h index ee99579f..dd4101bf 100644 --- a/src/ThemeBuilder/components/properties/MeasureLengthPropertyEditor.h +++ b/src/ThemeBuilder/components/properties/MeasureLengthPropertyEditor.h @@ -1,14 +1,12 @@ #pragma once #include "../Editor.h" -#include "cru/platform/graphics/Base.h" -#include "cru/ui/controls/Container.h" +#include "../LabeledMixin.h" #include "cru/ui/controls/FlexLayout.h" -#include "cru/ui/controls/TextBlock.h" #include "cru/ui/controls/TextBox.h" #include "cru/ui/render/MeasureRequirement.h" namespace cru::theme_builder::components::properties { -class MeasureLengthPropertyEditor : public Editor { +class MeasureLengthPropertyEditor : public Editor, public LabeledMixin { public: using PropertyType = ui::render::MeasureLength; @@ -18,9 +16,6 @@ class MeasureLengthPropertyEditor : public Editor { public: ui::controls::Control* GetRootControl() override { return &container_; } - std::string GetLabel() const { return label_.GetText(); } - void SetLabel(std::string label) { label_.SetText(std::move(label)); } - PropertyType GetValue() const { return measure_length_; } void SetValue(const PropertyType& value, bool trigger_change = true); @@ -28,7 +23,6 @@ class MeasureLengthPropertyEditor : public Editor { PropertyType measure_length_; ui::controls::FlexLayout container_; - ui::controls::TextBlock label_; ui::controls::TextBox text_; bool is_text_valid_; }; |
