diff options
| author | Yuqian Yang <crupest@crupest.life> | 2025-10-17 10:01:30 +0800 |
|---|---|---|
| committer | Yuqian Yang <crupest@crupest.life> | 2025-10-17 10:01:30 +0800 |
| commit | faf77949e19dc0d01f75bf8abb783eda70328048 (patch) | |
| tree | 0448c642573157d79a984ab19b3396210e91acca /src/ThemeBuilder/components | |
| parent | 9e4419826b3e23c63567591701a2834a837da98e (diff) | |
| download | cru-faf77949e19dc0d01f75bf8abb783eda70328048.tar.gz cru-faf77949e19dc0d01f75bf8abb783eda70328048.tar.bz2 cru-faf77949e19dc0d01f75bf8abb783eda70328048.zip | |
Platform base no String.
Diffstat (limited to 'src/ThemeBuilder/components')
| -rw-r--r-- | src/ThemeBuilder/components/properties/ColorPropertyEditor.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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 |
