From 1dca2841da6f024f613d6dc16de456d5035f8fce Mon Sep 17 00:00:00 2001 From: crupest Date: Sun, 31 Oct 2021 22:53:11 +0800 Subject: ... --- demos/input_method/main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'demos') diff --git a/demos/input_method/main.cpp b/demos/input_method/main.cpp index 67743239..913f0ae2 100644 --- a/demos/input_method/main.cpp +++ b/demos/input_method/main.cpp @@ -94,9 +94,10 @@ int main() { const auto cursor_lefttop = text_layout->TextSinglePoint(cursor_pos, false); - painter->FillRectangle(Rect{cursor_lefttop.x, cursor_lefttop.y + anchor_y, - 3, font->GetFontSize()}, - brush.get()); + painter->FillRectangle( + Rect{cursor_lefttop.left, cursor_lefttop.top + anchor_y, 3, + cursor_lefttop.height}, + brush.get()); } }); -- cgit v1.2.3