aboutsummaryrefslogtreecommitdiff
path: root/src/ThemeBuilder/components/properties/ThicknessPropertyEditor.cpp
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-10-17 12:06:14 +0800
committerYuqian Yang <crupest@crupest.life>2025-10-17 12:06:14 +0800
commit32aa6f116acc6e3e20a1ec76cef45b29f7005ad7 (patch)
tree892b71060a88b58d9293d78033000b05818783df /src/ThemeBuilder/components/properties/ThicknessPropertyEditor.cpp
parentfaf77949e19dc0d01f75bf8abb783eda70328048 (diff)
downloadcru-32aa6f116acc6e3e20a1ec76cef45b29f7005ad7.tar.gz
cru-32aa6f116acc6e3e20a1ec76cef45b29f7005ad7.tar.bz2
cru-32aa6f116acc6e3e20a1ec76cef45b29f7005ad7.zip
Remove String stage 1.
Diffstat (limited to 'src/ThemeBuilder/components/properties/ThicknessPropertyEditor.cpp')
-rw-r--r--src/ThemeBuilder/components/properties/ThicknessPropertyEditor.cpp7
1 files changed, 4 insertions, 3 deletions
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 <format>
#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<ui::Thickness>();
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