If first character in GUI textbox is right to left, set the textbox direction to that

This commit is contained in:
Yousef Khadadeh 2025-11-16 09:41:09 +03:00
parent 9120062889
commit 4fe52ef7f6
3 changed files with 41 additions and 8 deletions

View file

@ -145,6 +145,8 @@ class TextBox {
void process_rich_text_input(Cursor& cur, const TextData& richText);
SkRect get_cursor_rect(TextPosition pos);
skia::textlayout::TextDirection get_suggested_direction(size_t pIndex);
private:
std::pair<TextPosition, TextPosition> get_start_end_text_pos(TextPosition p1, TextPosition p2);
std::pair<size_t, size_t> get_start_end_paragraph_pos(size_t p1, size_t p2);