diff options
| author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2026-02-09 19:21:27 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-09 19:21:27 +0200 |
| commit | b58e2e6958002835cce217c6c4983b739d4e3684 (patch) | |
| tree | 270e81b91b5b36fb22bc4bdcd30636067f641f17 /indra/llui | |
| parent | 35f94f7042d562ced36f3c04c9dc71f9903182a3 (diff) | |
UI controls adjustments and selection color update
* UI controls adjustments and selection color update
* Use constexpr instead of magic numbers
Diffstat (limited to 'indra/llui')
| -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 2079ff17fc..1b8572f532 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); |
