summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAnsariel Hiller <Ansariel@users.noreply.github.com>2026-07-29 06:49:04 +0200
committerGitHub <noreply@github.com>2026-07-29 07:49:04 +0300
commit5a2cceda0ca7299f72e13bbdf99599d4358590cb (patch)
treeb887e75470683c92925a83229250393509540aef /indra
parent6a0eccdb9fd1ceb3ccd1586570f9f39926bfbb06 (diff)
#5907 Fix flyout button using old and incorrect textures
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/llflyoutbutton.cpp20
-rw-r--r--indra/llui/llflyoutbutton.h2
-rw-r--r--indra/newview/skins/default/textures/widgets/ComboButton_Off.pngbin15127 -> 559 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ComboButton_Selected.pngbin15216 -> 541 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Off.pngbin521 -> 435 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected.pngbin576 -> 436 bytes
-rw-r--r--indra/newview/skins/default/xui/en/widgets/flyout_button.xml12
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<LLFlyoutButton> 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<LLButton>(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
--- a/indra/newview/skins/default/textures/widgets/ComboButton_Off.png
+++ b/indra/newview/skins/default/textures/widgets/ComboButton_Off.png
Binary files 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
--- a/indra/newview/skins/default/textures/widgets/ComboButton_Selected.png
+++ b/indra/newview/skins/default/textures/widgets/ComboButton_Selected.png
Binary files 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
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Off.png
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Off.png
Binary files 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
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected.png
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected.png
Binary files 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"/>
- <combo_button image_selected="ComboButton_Selected"
- image_unselected="ComboButton_Off"
- image_disabled="ComboButton_Disabled"
- pad_right="6"
- tab_stop="false"/>
+ <drop_down_button image_selected="ComboButton_Selected"
+ image_unselected="ComboButton_Off"
+ image_disabled="ComboButton_Disabled"
+ image_pressed="ComboButton_Selected"
+ image_pressed_selected="ComboButton_Selected"
+ pad_right="6"
+ tab_stop="false"/>
</flyout_button>