diff options
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/components/Menu.cpp | 2 | ||||
-rw-r--r-- | src/ui/controls/TextHostControlService.cpp | 4 | ||||
-rw-r--r-- | src/ui/render/TextRenderObject.cpp | 1 |
3 files changed, 3 insertions, 4 deletions
diff --git a/src/ui/components/Menu.cpp b/src/ui/components/Menu.cpp index 681b44b7..05324865 100644 --- a/src/ui/components/Menu.cpp +++ b/src/ui/components/Menu.cpp @@ -92,7 +92,7 @@ PopupMenu::PopupMenu(controls::Control* attached_control) menu_ = new Menu(); - menu_->SetOnItemClick([this](Index _) { this->Close(); }); + menu_->SetOnItemClick([this](Index) { this->Close(); }); popup_->AddChild(menu_->GetRootControl(), 0); } diff --git a/src/ui/controls/TextHostControlService.cpp b/src/ui/controls/TextHostControlService.cpp index 7fcf70e9..0f136034 100644 --- a/src/ui/controls/TextHostControlService.cpp +++ b/src/ui/controls/TextHostControlService.cpp @@ -87,7 +87,7 @@ TextControlMovePattern TextControlMovePattern::kHome( gsl::index current_position) { CRU_UNUSED(service) return Utf16BackwardUntil(text, current_position, - [](char16_t c) { return c == u'\n'; }); + [](CodePoint c) { return c == u'\n'; }); }); TextControlMovePattern TextControlMovePattern::kEnd( u"End(Line End)", helper::ShortcutKeyBind(platform::gui::KeyCode::End), @@ -95,7 +95,7 @@ TextControlMovePattern TextControlMovePattern::kEnd( gsl::index current_position) { CRU_UNUSED(service) return Utf16ForwardUntil(text, current_position, - [](char16_t c) { return c == u'\n'; }); + [](CodePoint c) { return c == u'\n'; }); }); TextControlMovePattern TextControlMovePattern::kCtrlHome( u"Ctrl+Home(Document Begin)", diff --git a/src/ui/render/TextRenderObject.cpp b/src/ui/render/TextRenderObject.cpp index 0e65da92..f7665beb 100644 --- a/src/ui/render/TextRenderObject.cpp +++ b/src/ui/render/TextRenderObject.cpp @@ -147,7 +147,6 @@ Rect TextRenderObject::GetCaretRectInContent() { const auto caret_top_center = this->text_layout_->TextSinglePoint(caret_pos, false); - const auto font_height = this->font_->GetFontSize(); const auto caret_width = this->caret_width_; auto rect = Rect{caret_top_center.left - caret_width / 2.0f, |