From 5a2cceda0ca7299f72e13bbdf99599d4358590cb Mon Sep 17 00:00:00 2001 From: Ansariel Hiller Date: Wed, 29 Jul 2026 06:49:04 +0200 Subject: #5907 Fix flyout button using old and incorrect textures --- indra/llui/llflyoutbutton.cpp | 20 ++++++++++++++++++-- indra/llui/llflyoutbutton.h | 2 ++ .../default/textures/widgets/ComboButton_Off.png | Bin 15127 -> 559 bytes .../textures/widgets/ComboButton_Selected.png | Bin 15216 -> 541 bytes .../textures/widgets/SegmentedBtn_Left_Off.png | Bin 521 -> 435 bytes .../textures/widgets/SegmentedBtn_Left_Selected.png | Bin 576 -> 436 bytes .../skins/default/xui/en/widgets/flyout_button.xml | 12 +++++++----- 7 files changed, 27 insertions(+), 7 deletions(-) diff --git a/indra/llui/llflyoutbutton.cpp b/indra/llui/llflyoutbutton.cpp index 2e198e8dbc..9d511bcf87 100644 --- a/indra/llui/llflyoutbutton.cpp +++ b/indra/llui/llflyoutbutton.cpp @@ -31,7 +31,7 @@ //static LLDefaultChildRegistry::Register r2("flyout_button"); -const S32 FLYOUT_BUTTON_ARROW_WIDTH = 24; +constexpr S32 FLYOUT_BUTTON_ARROW_WIDTH = 22; LLFlyoutButton::LLFlyoutButton(const Params& p) : LLComboBox(p), @@ -43,9 +43,13 @@ LLFlyoutButton::LLFlyoutButton(const Params& p) LLButton::Params bp(p.action_button); bp.name(p.label); bp.label(p.label); - bp.rect.left(0).bottom(0).width(getRect().getWidth() - FLYOUT_BUTTON_ARROW_WIDTH).height(getRect().getHeight()); + bp.rect.left(0).bottom(0).width(getRect().getWidth() - FLYOUT_BUTTON_ARROW_WIDTH - 2 * BTN_DROP_SHADOW).height(getRect().getHeight()); bp.click_callback.function(boost::bind(&LLFlyoutButton::onActionButtonClick, this, _2)); bp.follows.flags(FOLLOWS_ALL); + if (p.font.isProvided()) + { + bp.font(p.font); + } mActionButton = LLUICtrlFactory::create(bp); addChild(mActionButton); @@ -74,4 +78,16 @@ void LLFlyoutButton::setToggleState(bool state) mToggleState = state; } +bool LLFlyoutButton::postBuild() +{ + bool result = LLComboBox::postBuild(); + + LLRect rect = getLocalRect(); + S32 arrow_width = llmax(FLYOUT_BUTTON_ARROW_WIDTH, mArrowImage ? mArrowImage->getWidth() : 0); + mButton->setRect(LLRect(getRect().getWidth() - llmax(8, arrow_width) - 2 * BTN_DROP_SHADOW, + rect.mTop, rect.mRight, rect.mBottom)); + mButton->setFollows(FOLLOWS_BOTTOM | FOLLOWS_TOP | FOLLOWS_RIGHT); + + return result; +} diff --git a/indra/llui/llflyoutbutton.h b/indra/llui/llflyoutbutton.h index 73190fc984..81cdcdc382 100644 --- a/indra/llui/llflyoutbutton.h +++ b/indra/llui/llflyoutbutton.h @@ -56,6 +56,8 @@ protected: public: void draw() override; + bool postBuild() override; + void setToggleState(bool state); void onActionButtonClick(const LLSD& data); diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_Off.png b/indra/newview/skins/default/textures/widgets/ComboButton_Off.png index 7199470307..1bd7f3228d 100644 Binary files a/indra/newview/skins/default/textures/widgets/ComboButton_Off.png and b/indra/newview/skins/default/textures/widgets/ComboButton_Off.png differ diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_Selected.png b/indra/newview/skins/default/textures/widgets/ComboButton_Selected.png index 715b401ce5..c0566912e3 100644 Binary files a/indra/newview/skins/default/textures/widgets/ComboButton_Selected.png and b/indra/newview/skins/default/textures/widgets/ComboButton_Selected.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Off.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Off.png index 1a9f7e9d71..f00c18d1a8 100644 Binary files a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Off.png and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Off.png differ diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected.png index dbe6651dc8..da419b94ea 100644 Binary files a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected.png and b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected.png differ diff --git a/indra/newview/skins/default/xui/en/widgets/flyout_button.xml b/indra/newview/skins/default/xui/en/widgets/flyout_button.xml index e42bef4a45..c26c698fb2 100644 --- a/indra/newview/skins/default/xui/en/widgets/flyout_button.xml +++ b/indra/newview/skins/default/xui/en/widgets/flyout_button.xml @@ -4,9 +4,11 @@ image_selected="SegmentedBtn_Left_Selected" image_unselected="SegmentedBtn_Left_Off" image_disabled="SegmentedBtn_Left_Disabled"/> - + -- cgit v1.3