From 2fb56bc5c58098ca7ef7ba61082a20eb794de957 Mon Sep 17 00:00:00 2001 From: Yousef Khadadeh Date: Mon, 24 Nov 2025 20:07:35 +0300 Subject: [PATCH] Make selection area and cursor more visible --- src/RichText/TextBox.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/RichText/TextBox.cpp b/src/RichText/TextBox.cpp index af3fc32..1f86e6e 100644 --- a/src/RichText/TextBox.cpp +++ b/src/RichText/TextBox.cpp @@ -1110,13 +1110,13 @@ void TextBox::paint(SkCanvas* canvas, const PaintOpts& paintOpts) { auto& cur = paintOpts.cursor.value(); SkPaint selectionP{SkColor4f{paintOpts.cursorColor.x(), paintOpts.cursorColor.y(), paintOpts.cursorColor.z(), 1.0f}}; if(cur.selectionBeginPos != cur.selectionEndPos) { - canvas->saveLayerAlphaf(nullptr, 0.3f); + canvas->saveLayerAlphaf(nullptr, 0.5f); rects_between_text_positions_func(cur.selectionBeginPos, cur.selectionEndPos, [&](const SkRect& rect) { canvas->drawRect(rect, selectionP); }); canvas->restore(); } - SkPaint cursorP{SkColor4f{paintOpts.cursorColor.x(), paintOpts.cursorColor.y(), paintOpts.cursorColor.z(), 0.8f}}; + SkPaint cursorP{SkColor4f{paintOpts.cursorColor.x(), paintOpts.cursorColor.y(), paintOpts.cursorColor.z(), 1.0f}}; canvas->drawRect(get_cursor_rect(cur.pos), cursorP); } }