From faf77949e19dc0d01f75bf8abb783eda70328048 Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Fri, 17 Oct 2025 10:01:30 +0800 Subject: Platform base no String. --- src/ThemeBuilder/components/properties/ColorPropertyEditor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ThemeBuilder/components') diff --git a/src/ThemeBuilder/components/properties/ColorPropertyEditor.cpp b/src/ThemeBuilder/components/properties/ColorPropertyEditor.cpp index e9e486ac..0fe3908e 100644 --- a/src/ThemeBuilder/components/properties/ColorPropertyEditor.cpp +++ b/src/ThemeBuilder/components/properties/ColorPropertyEditor.cpp @@ -20,12 +20,12 @@ ColorPropertyEditor::ColorPropertyEditor() { color_cube_.SetForegroundBrush(color_cube_brush_); - color_text_.SetText(color_.ToString()); + color_text_.SetText(String::FromUtf8(color_.ToString())); color_text_.SetMargin(ui::Thickness(10, 0, 0, 0)); color_text_.TextChangeEvent()->AddHandler([this](std::nullptr_t) { auto text = color_text_.GetTextView(); - auto color = ui::Color::Parse(text); + auto color = ui::Color::Parse(text.ToUtf8()); if (color) { color_ = *color; color_cube_brush_->SetColor(*color); @@ -43,6 +43,6 @@ ColorPropertyEditor::~ColorPropertyEditor() {} void ColorPropertyEditor::SetValue(const ui::Color &color, bool trigger_change) { if (!trigger_change) SuppressNextChangeEvent(); - color_text_.SetText(color.ToString()); + color_text_.SetText(String::FromUtf8(color.ToString())); } } // namespace cru::theme_builder::components::properties -- cgit v1.2.3