summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2026-03-17 20:47:20 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2026-03-17 20:55:55 +0200
commit0ab59c057fe4345629fa0dbcbeaf8bee9cafc18c (patch)
tree11ac5de2f2064092e9d5912c960fb11e54d169cd /indra/llui
parent157f4f1527a8b156a953e7da80715ba4fd1ace6a (diff)
#5462 update button and menu colors
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llbutton.cpp8
-rw-r--r--indra/llui/llbutton.h6
-rw-r--r--indra/llui/lllayoutstack.cpp2
3 files changed, 12 insertions, 4 deletions
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 6ffc707b25..7f209c60a7 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -110,6 +110,8 @@ LLButton::Params::Params()
commit_on_capture_lost("commit_on_capture_lost", false),
display_pressed_state("display_pressed_state", true),
use_draw_context_alpha("use_draw_context_alpha", true),
+ draw_focus_border("draw_focus_border", true),
+ hover_hand_cursor("hover_hand_cursor", false),
badge("badge"),
handle_right_mouse("handle_right_mouse"),
held_down_delay("held_down_delay"),
@@ -181,6 +183,8 @@ LLButton::LLButton(const LLButton::Params& p)
mMouseUpSignal(NULL),
mHeldDownSignal(NULL),
mUseDrawContextAlpha(p.use_draw_context_alpha),
+ mDrawFocusBorder(p.draw_focus_border),
+ mHoverHandCursor(p.hover_hand_cursor),
mHandleRightMouse(p.handle_right_mouse),
mFlashingTimer(NULL)
{
@@ -655,7 +659,7 @@ bool LLButton::handleHover(S32 x, S32 y, MASK mask)
}
// We only handle the click if the click both started and ended within us
- getWindow()->setCursor(UI_CURSOR_ARROW);
+ getWindow()->setCursor(mHoverHandCursor ? UI_CURSOR_HAND : UI_CURSOR_ARROW);
LL_DEBUGS("UserInput") << "hover handled by " << getName() << LL_ENDL;
}
return true;
@@ -842,7 +846,7 @@ void LLButton::draw()
label_color = ll::ui::SearchableControl::getHighlightFontColor();
// overlay with keyboard focus border
- if (hasFocus())
+ if (hasFocus() && mDrawFocusBorder)
{
drawBorder(imagep, gFocusMgr.getFocusColor() % alpha, gFocusMgr.getFocusFlashWidth());
}
diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h
index ac301d5149..0d1a28ee31 100644
--- a/indra/llui/llbutton.h
+++ b/indra/llui/llbutton.h
@@ -133,7 +133,9 @@ public:
Optional<F32> hover_glow_amount;
Optional<TimeIntervalParam> held_down_delay;
- Optional<bool> use_draw_context_alpha;
+ Optional<bool> use_draw_context_alpha,
+ draw_focus_border,
+ hover_hand_cursor;
Optional<LLBadge::Params> badge;
@@ -367,6 +369,8 @@ protected:
S32 mImageOverlayBottomPad;
bool mUseDrawContextAlpha;
+ bool mDrawFocusBorder;
+ bool mHoverHandCursor;
/*
* Space between image_overlay and label
diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp
index a55e58f4bb..1dc80671cc 100644
--- a/indra/llui/lllayoutstack.cpp
+++ b/indra/llui/lllayoutstack.cpp
@@ -119,7 +119,7 @@ S32 LLLayoutPanel::getTargetDim() const
void LLLayoutPanel::setTargetDim(S32 value)
{
value = llmin(value, mMaxDim);
-
+
LLRect new_rect(getRect());
if (mOrientation == LLLayoutStack::HORIZONTAL)
{