From 777c76839563041f44d98f543d6695bd66e421ea Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Sun, 15 Mar 2026 16:54:33 +0200 Subject: #5462 Login form update #2 --- indra/llui/lllayoutstack.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/llui/lllayoutstack.cpp') diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index fe0591ce4b..a55e58f4bb 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -48,17 +48,21 @@ static LLLayoutStack::LayoutStackRegistry::Register register_layo LLLayoutPanel::Params::Params() : expanded_min_dim("expanded_min_dim", 0), min_dim("min_dim", -1), + max_dim("max_dim", -1), user_resize("user_resize", false), auto_resize("auto_resize", true) { addSynonym(min_dim, "min_width"); addSynonym(min_dim, "min_height"); + addSynonym(max_dim, "max_width"); + addSynonym(max_dim, "max_height"); } LLLayoutPanel::LLLayoutPanel(const Params& p) : LLPanel(p), mExpandedMinDim(p.expanded_min_dim.isProvided() ? p.expanded_min_dim : p.min_dim), mMinDim(p.min_dim), + mMaxDim(p.max_dim), mAutoResize(p.auto_resize), mUserResize(p.user_resize), mCollapsed(false), @@ -75,6 +79,7 @@ LLLayoutPanel::LLLayoutPanel(const Params& p) { mVisibleAmt = 0.f; } + setMaxDim(mMaxDim); } void LLLayoutPanel::initFromParams(const Params& p) @@ -113,6 +118,8 @@ S32 LLLayoutPanel::getTargetDim() const void LLLayoutPanel::setTargetDim(S32 value) { + value = llmin(value, mMaxDim); + LLRect new_rect(getRect()); if (mOrientation == LLLayoutStack::HORIZONTAL) { @@ -145,6 +152,7 @@ void LLLayoutPanel::setOrientation( LLView::EOrientation orientation ) setMinDim(layout_dim); } mTargetDim = llmax(layout_dim, getMinDim()); + mTargetDim = llmin(mTargetDim, mMaxDim); } void LLLayoutPanel::setVisible( bool visible ) @@ -167,6 +175,7 @@ void LLLayoutPanel::reshape( S32 width, S32 height, bool called_from_parent /*= if (!mIgnoreReshape && !mAutoResize) { mTargetDim = (mOrientation == LLLayoutStack::HORIZONTAL) ? width : height; + mTargetDim = llmin(mTargetDim, mMaxDim); LLLayoutStack* stackp = dynamic_cast(getParent()); if (stackp) { @@ -439,6 +448,7 @@ void LLLayoutStack::updateLayout() F32 fraction_to_distribute = (panelp->mFractionalSize * panelp->getAutoResizeFactor()) / (total_visible_fraction); S32 delta = ll_round((F32)space_to_distribute * fraction_to_distribute); panelp->mTargetDim += delta; + panelp->mTargetDim = llmin(panelp->mTargetDim, panelp->mMaxDim); remaining_space -= delta; } } @@ -455,6 +465,7 @@ void LLLayoutStack::updateLayout() { S32 space_for_panel = remaining_space > 0 ? 1 : -1; panelp->mTargetDim += space_for_panel; + panelp->mTargetDim = llmin(panelp->mTargetDim, panelp->mMaxDim); remaining_space -= space_for_panel; } } -- cgit v1.3 From 0ab59c057fe4345629fa0dbcbeaf8bee9cafc18c Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 17 Mar 2026 20:47:20 +0200 Subject: #5462 update button and menu colors --- indra/llui/llbutton.cpp | 8 ++++++-- indra/llui/llbutton.h | 6 +++++- indra/llui/lllayoutstack.cpp | 2 +- indra/newview/llviewermenu.cpp | 2 +- .../default/textures/widgets/PushButton_Login.png | Bin 18135 -> 18568 bytes .../textures/widgets/PushButton_Login_Over.png | Bin 18572 -> 18568 bytes indra/newview/skins/default/xui/en/panel_login.xml | 11 +++++++++-- 7 files changed, 22 insertions(+), 7 deletions(-) (limited to 'indra/llui/lllayoutstack.cpp') 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 hover_glow_amount; Optional held_down_delay; - Optional use_draw_context_alpha; + Optional use_draw_context_alpha, + draw_focus_border, + hover_hand_cursor; Optional 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) { diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index dbcf4fbbf4..ca01d048b4 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -649,7 +649,7 @@ void init_menus() LLRect menuBarRect = gLoginMenuBarView->getRect(); menuBarRect.setLeftTopAndSize(0, menu_bar_holder->getRect().getHeight(), menuBarRect.getWidth(), menuBarRect.getHeight()); gLoginMenuBarView->setRect(menuBarRect); - gLoginMenuBarView->setBackgroundColor( color ); + gLoginMenuBarView->setBackgroundColor(LLColor4::black); menu_bar_holder->addChild(gLoginMenuBarView); // tooltips are on top of EVERYTHING, including menus diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Login.png b/indra/newview/skins/default/textures/widgets/PushButton_Login.png index 2180adb2fd..7e892d2b0a 100644 Binary files a/indra/newview/skins/default/textures/widgets/PushButton_Login.png and b/indra/newview/skins/default/textures/widgets/PushButton_Login.png differ diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Login_Over.png b/indra/newview/skins/default/textures/widgets/PushButton_Login_Over.png index e2c3b297df..9110889d6c 100644 Binary files a/indra/newview/skins/default/textures/widgets/PushButton_Login_Over.png and b/indra/newview/skins/default/textures/widgets/PushButton_Login_Over.png differ diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index 781cc700dd..f3d31fca40 100644 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -103,6 +103,7 @@ name="remember_name" tool_tip="Already remembered user can be forgotten from Me > Preferences > Advanced > Remembered Usernames." width="198"> + +