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/FontPropertyEditor.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/FontPropertyEditor.h')
| -rw-r--r-- | src/ThemeBuilder/components/properties/FontPropertyEditor.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/ThemeBuilder/components/properties/FontPropertyEditor.h b/src/ThemeBuilder/components/properties/FontPropertyEditor.h index ec6a6b56..4a6c601c 100644 --- a/src/ThemeBuilder/components/properties/FontPropertyEditor.h +++ b/src/ThemeBuilder/components/properties/FontPropertyEditor.h @@ -1,5 +1,6 @@ #pragma once #include "../Editor.h" +#include "../LabeledMixin.h" #include "cru/platform/graphics/Font.h" #include "cru/ui/components/Input.h" #include "cru/ui/controls/Control.h" @@ -8,7 +9,7 @@ #include "cru/ui/controls/TextBox.h" namespace cru::theme_builder::components::properties { -class FontPropertyEditor : public Editor { +class FontPropertyEditor : public Editor, public LabeledMixin { public: using PropertyType = std::shared_ptr<platform::graphics::IFont>; @@ -17,16 +18,12 @@ class FontPropertyEditor : public Editor { ui::controls::Control* GetRootControl() override; - std::string GetLabelText() const { return label_.GetText(); } - void SetLabelText(std::string label) { label_.SetText(std::move(label)); } - - std::shared_ptr<platform::graphics::IFont> GetValue() const; + std::shared_ptr<platform::graphics::IFont> GetValue(); void SetValue(std::shared_ptr<platform::graphics::IFont> value, bool trigger_change = true); private: ui::controls::FlexLayout main_container_; - ui::controls::TextBlock label_; ui::controls::FlexLayout right_container_; ui::controls::FlexLayout font_family_container_; ui::controls::TextBlock font_family_label_; |
