From 3b875091c445b7465b9bd044914318989a94d2ad Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Fri, 21 Nov 2025 21:43:42 +0800 Subject: Clean codes. Remove member function const. --- src/ThemeBuilder/components/properties/FontPropertyEditor.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/ThemeBuilder/components/properties/FontPropertyEditor.h') 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; @@ -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 GetValue() const; + std::shared_ptr GetValue(); void SetValue(std::shared_ptr 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_; -- cgit v1.2.3