aboutsummaryrefslogtreecommitdiff
path: root/src/ThemeBuilder/components/properties/ThicknessPropertyEditor.cpp
diff options
context:
space:
mode:
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