From 32aa6f116acc6e3e20a1ec76cef45b29f7005ad7 Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Fri, 17 Oct 2025 12:06:14 +0800 Subject: Remove String stage 1. --- src/ThemeBuilder/components/properties/ThicknessPropertyEditor.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/ThemeBuilder/components/properties/ThicknessPropertyEditor.cpp') diff --git a/src/ThemeBuilder/components/properties/ThicknessPropertyEditor.cpp b/src/ThemeBuilder/components/properties/ThicknessPropertyEditor.cpp index 0790cd98..2ee13c06 100644 --- a/src/ThemeBuilder/components/properties/ThicknessPropertyEditor.cpp +++ b/src/ThemeBuilder/components/properties/ThicknessPropertyEditor.cpp @@ -1,4 +1,5 @@ #include "ThicknessPropertyEditor.h" +#include #include "cru/base/Format.h" #include "cru/ui/mapper/MapperRegistry.h" #include "cru/ui/mapper/ThicknessMapper.h" @@ -13,7 +14,7 @@ ThicknessPropertyEditor::ThicknessPropertyEditor() { auto thickness_mapper = ui::mapper::MapperRegistry::GetInstance()->GetMapper(); try { - auto thickness = thickness_mapper->MapFromString(text.ToUtf8()); + auto thickness = thickness_mapper->MapFromString(text); thickness_ = thickness; is_text_valid_ = true; RaiseChangeEvent(); @@ -29,7 +30,7 @@ ThicknessPropertyEditor::~ThicknessPropertyEditor() {} void ThicknessPropertyEditor::SetValue(const ui::Thickness &thickness, bool trigger_change) { if (!trigger_change) SuppressNextChangeEvent(); - text_.SetText(Format(u"{} {} {} {}", thickness.left, thickness.top, - thickness.right, thickness.bottom)); + text_.SetText(std::format("{} {} {} {}", thickness.left, thickness.top, + thickness.right, thickness.bottom)); } } // namespace cru::theme_builder::components::properties -- cgit v1.2.3