aboutsummaryrefslogtreecommitdiff
path: root/src/ThemeBuilder/components/properties/PointPropertyEditor.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/PointPropertyEditor.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/PointPropertyEditor.cpp')
-rw-r--r--src/ThemeBuilder/components/properties/PointPropertyEditor.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ThemeBuilder/components/properties/PointPropertyEditor.cpp b/src/ThemeBuilder/components/properties/PointPropertyEditor.cpp
index 8d7ac942..82fee18f 100644
--- a/src/ThemeBuilder/components/properties/PointPropertyEditor.cpp
+++ b/src/ThemeBuilder/components/properties/PointPropertyEditor.cpp
@@ -10,11 +10,11 @@ PointPropertyEditor::PointPropertyEditor() {
container_.AddChild(&text_);
text_.TextChangeEvent()->AddHandler([this](std::nullptr_t) {
- auto text = text_.GetTextView();
+ auto text = text_.GetText();
auto point_mapper =
ui::mapper::MapperRegistry::GetInstance()->GetMapper<ui::Point>();
try {
- auto point = point_mapper->MapFromString(text.ToString().ToUtf8());
+ auto point = point_mapper->MapFromString(text);
point_ = point;
is_text_valid_ = true;
RaiseChangeEvent();
@@ -33,7 +33,7 @@ void PointPropertyEditor::SetValue(const ui::Point& point,
text_.SetText(ConvertPointToString(point));
}
-String PointPropertyEditor::ConvertPointToString(const ui::Point& point) {
- return String::FromUtf8(std::format("{} {}", point.x, point.y));
+std::string PointPropertyEditor::ConvertPointToString(const ui::Point& point) {
+ return std::format("{} {}", point.x, point.y);
}
} // namespace cru::theme_builder::components::properties