diff options
| author | Erik Kundiman <erik@megapahit.org> | 2026-04-19 08:50:43 +0800 |
|---|---|---|
| committer | Erik Kundiman <erik@megapahit.org> | 2026-04-19 08:51:40 +0800 |
| commit | badf783df47cb08de85a7abfa612ce813628058d (patch) | |
| tree | f083ba78912ff61645706d14060b6fe37f91b458 /indra/llui/lltextbase.cpp | |
| parent | 7d73db9236774e45240602395f544e19ac10bef7 (diff) | |
| parent | 8ffb73b4c0f5141d03cbbdfa8213421effed8eb0 (diff) | |
Merge tag 'Second_Life_Release#8ffb73b4-26.2' into 2026.02
Diffstat (limited to 'indra/llui/lltextbase.cpp')
| -rw-r--r-- | indra/llui/lltextbase.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 24ae5c09e9..5882c1edbb 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -51,6 +51,9 @@ const F32 CURSOR_FLASH_DELAY = 1.0f; // in seconds const S32 CURSOR_THICKNESS = 2; const F32 TRIPLE_CLICK_INTERVAL = 0.3f; // delay between double and triple click. +constexpr F32 FOCUSED_SELECTION_BG_ALPHA = 1; +constexpr F32 UNFOCUSED_SELECTION_BG_ALPHA = 0.7f; + LLTextBase::line_info::line_info(S32 index_start, S32 index_end, LLRect rect, S32 line_num) : mDocIndexStart(index_start), mDocIndexEnd(index_end), @@ -529,7 +532,7 @@ void LLTextBase::drawSelectionBackground() // Draw the selection box (we're using a box instead of reversing the colors on the selected text). gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); const LLColor4& color = mSelectedBGColor; - F32 alpha = hasFocus() ? 0.7f : 0.3f; + F32 alpha = hasFocus() ? FOCUSED_SELECTION_BG_ALPHA : UNFOCUSED_SELECTION_BG_ALPHA; alpha *= getDrawContext().mAlpha; LLColor4 selection_color(color.mV[VRED], color.mV[VGREEN], color.mV[VBLUE], alpha); |
