diff options
| author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2026-02-25 00:24:15 +0200 |
|---|---|---|
| committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2026-02-25 00:24:15 +0200 |
| commit | aa4ad2e95da5207a1250ca5fd23f7f0e6528a44e (patch) | |
| tree | ea42898b66c02a141bd0b7dd8d9c8379d8ffb2a5 /indra/llui | |
| parent | 8e9a7187eb231b22f8c4fdc52227c2f09f0d507e (diff) | |
Floaters and UI controls adjustments #2
Diffstat (limited to 'indra/llui')
| -rw-r--r-- | indra/llui/llbutton.cpp | 3 | ||||
| -rw-r--r-- | indra/llui/llfocusmgr.cpp | 5 | ||||
| -rw-r--r-- | indra/llui/llfocusmgr.h | 2 | ||||
| -rw-r--r-- | indra/llui/lltextbase.h | 1 | ||||
| -rw-r--r-- | indra/llui/llviewborder.cpp | 2 |
5 files changed, 9 insertions, 4 deletions
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index 0048c44189..3a3616c905 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -842,8 +842,7 @@ void LLButton::draw() // overlay with keyboard focus border if (hasFocus()) { - F32 lerp_amt = gFocusMgr.getFocusFlashAmt(); - drawBorder(imagep, gFocusMgr.getFocusColor() % alpha, ll_round(lerp(1.f, 3.f, lerp_amt))); + drawBorder(imagep, gFocusMgr.getFocusColor() % alpha, gFocusMgr.getFocusFlashWidth()); } if (use_glow_effect) diff --git a/indra/llui/llfocusmgr.cpp b/indra/llui/llfocusmgr.cpp index 7544a44478..ce0e8036e7 100644 --- a/indra/llui/llfocusmgr.cpp +++ b/indra/llui/llfocusmgr.cpp @@ -464,6 +464,11 @@ F32 LLFocusMgr::getFocusFlashAmt() const return clamp_rescale(mFocusFlashTimer.getElapsedTimeF32(), 0.f, FOCUS_FADE_TIME, 1.f, 0.f); } +S32 LLFocusMgr::getFocusFlashWidth() const +{ + return ll_round(lerp(1.f, 2.f, getFocusFlashAmt())); +} + LLColor4 LLFocusMgr::getFocusColor() const { static LLUIColor focus_color_cached = LLUIColorTable::instance().getColor("FocusColor"); diff --git a/indra/llui/llfocusmgr.h b/indra/llui/llfocusmgr.h index 89fee5c9f1..2e2293196b 100644 --- a/indra/llui/llfocusmgr.h +++ b/indra/llui/llfocusmgr.h @@ -101,7 +101,7 @@ public: void setKeystrokesOnly(bool keystrokes_only) { mKeystrokesOnly = keystrokes_only; } F32 getFocusFlashAmt() const; - S32 getFocusFlashWidth() const { return ll_round(lerp(1.f, 3.f, getFocusFlashAmt())); } + S32 getFocusFlashWidth() const; LLColor4 getFocusColor() const; void triggerFocusFlash(); bool getAppHasFocus() const { return mAppHasFocus; } diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 3ab5e905e3..35477bdea9 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -408,6 +408,7 @@ public: /*virtual*/ void setColor(const LLUIColor& c) override; virtual void setReadOnlyColor(const LLUIColor& c); /*virtual*/ void onVisibilityChange(bool new_visibility) override; + void setBgReadOnlyColor(const LLUIColor& c) { mReadOnlyBgColor = c; } /*virtual*/ void setValue(const LLSD& value) override; /*virtual*/ LLTextViewModel* getViewModel() const override; diff --git a/indra/llui/llviewborder.cpp b/indra/llui/llviewborder.cpp index d53fd6eb91..68ca61681c 100644 --- a/indra/llui/llviewborder.cpp +++ b/indra/llui/llviewborder.cpp @@ -149,7 +149,7 @@ void LLViewBorder::drawOnePixelLines() top_color = gFocusMgr.getFocusColor(); bottom_color = top_color; - LLUI::setLineWidth(lerp(1.f, 3.f, gFocusMgr.getFocusFlashAmt())); + LLUI::setLineWidth(lerp(1.f, 2.f, gFocusMgr.getFocusFlashAmt())); } S32 left = 0; |
