diff options
| author | Yuqian Yang <crupest@crupest.life> | 2025-10-17 12:06:14 +0800 |
|---|---|---|
| committer | Yuqian Yang <crupest@crupest.life> | 2025-10-17 12:06:14 +0800 |
| commit | 32aa6f116acc6e3e20a1ec76cef45b29f7005ad7 (patch) | |
| tree | 892b71060a88b58d9293d78033000b05818783df /src/ui/render/TextRenderObject.cpp | |
| parent | faf77949e19dc0d01f75bf8abb783eda70328048 (diff) | |
| download | cru-32aa6f116acc6e3e20a1ec76cef45b29f7005ad7.tar.gz cru-32aa6f116acc6e3e20a1ec76cef45b29f7005ad7.tar.bz2 cru-32aa6f116acc6e3e20a1ec76cef45b29f7005ad7.zip | |
Remove String stage 1.
Diffstat (limited to 'src/ui/render/TextRenderObject.cpp')
| -rw-r--r-- | src/ui/render/TextRenderObject.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/ui/render/TextRenderObject.cpp b/src/ui/render/TextRenderObject.cpp index 346b4957..18020032 100644 --- a/src/ui/render/TextRenderObject.cpp +++ b/src/ui/render/TextRenderObject.cpp @@ -28,14 +28,16 @@ TextRenderObject::TextRenderObject( caret_brush.swap(caret_brush_); const auto graph_factory = GetGraphicsFactory(); - text_layout_ = graph_factory->CreateTextLayout(font_, u""); + text_layout_ = graph_factory->CreateTextLayout(font_, ""); } TextRenderObject::~TextRenderObject() = default; -String TextRenderObject::GetText() const { return text_layout_->GetText(); } +std::string TextRenderObject::GetText() const { + return text_layout_->GetText(); +} -void TextRenderObject::SetText(String new_text) { +void TextRenderObject::SetText(std::string new_text) { text_layout_->SetText(std::move(new_text)); InvalidateLayout(); } @@ -181,8 +183,7 @@ void TextRenderObject::Draw(platform::graphics::IPainter* painter) { "Begin to paint, total_offset: {}, size: {}, text_layout: " "{}, brush: {}.", this->GetTotalOffset(), this->GetDesiredSize(), - this->text_layout_->GetDebugString().ToUtf8(), - this->brush_->GetDebugString().ToUtf8()); + this->text_layout_->GetDebugString(), this->brush_->GetDebugString()); } if (this->selection_range_.has_value()) { |
