From 651a9587f82a143764856a4c2603d89c5d392cb6 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Wed, 1 Jun 2011 13:50:14 -0700 Subject: EXP-862 FIX -- Disable marketplace inbox/outbox panel separator when inbox and outbox are collapsed Marketplace panel is only resizable now when inbox or outbox is expanded. Reviewed by Leyla --- indra/newview/llsidepanelinventory.cpp | 24 +++++++++---- .../skins/default/xui/en/sidepanel_inventory.xml | 41 ++++++++++++---------- 2 files changed, 39 insertions(+), 26 deletions(-) (limited to 'indra') diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 9247611257..301322d24b 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -120,15 +120,22 @@ BOOL LLSidepanelInventory::postBuild() } } - getChild("inbox_btn")->setCommitCallback(boost::bind(&LLSidepanelInventory::onToggleInboxBtn, this)); - getChild("outbox_btn")->setCommitCallback(boost::bind(&LLSidepanelInventory::onToggleOutboxBtn, this)); + // Marketplace inbox/outbox setup + { + LLButton * inboxButton = getChild("inbox_btn"); + LLButton * outboxButton = getChild("outbox_btn"); - LLLayoutStack* stack = getChild("inventory_layout_stack"); + inboxButton->setCommitCallback(boost::bind(&LLSidepanelInventory::onToggleInboxBtn, this)); + outboxButton->setCommitCallback(boost::bind(&LLSidepanelInventory::onToggleOutboxBtn, this)); + + LLLayoutStack* stack = getChild("inventory_layout_stack"); - stack->collapsePanel(getChild("inbox_layout_panel"), true); - stack->collapsePanel(getChild("outbox_layout_panel"), true); - getChild("outbox_btn")->setToggleState(false); - getChild("inbox_btn")->setToggleState(false); + stack->collapsePanel(getChild("inbox_layout_panel"), true); + stack->collapsePanel(getChild("outbox_layout_panel"), true); + + inboxButton->setToggleState(false); + outboxButton->setToggleState(false); + } return TRUE; } @@ -151,6 +158,9 @@ void manageInboxOutboxPanels(LLLayoutStack * stack, } stack->collapsePanel(pressedPanel, !expand); + + // Enable user_resize on main inventory panel when at least one marketplace box is expanded + stack->setPanelUserResize("main_inventory_layout_panel", expand); } void LLSidepanelInventory::onToggleInboxBtn() diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml index ffc018b856..484e90f083 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml @@ -26,11 +26,14 @@ top="0" orientation="vertical" name="inventory_layout_stack" - height="535" + height="535" width="330"> + width="330" + auto_resize="true" + user_resize="false" + follows="bottom|left|right" + min_dim="35" + name="inbox_layout_panel" + max_dim="125" + height="35"> + left="10" /> + follows="bottom|left|right" + name="outbox_layout_panel" + min_dim="35" + max_dim="125" + height="35">