diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llsidepanelinventory.cpp | 49 | ||||
-rw-r--r-- | indra/newview/skins/default/colors.xml | 6 | ||||
-rw-r--r-- | indra/newview/skins/default/textures/textures.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/textures/widgets/Badge.png | bin | 0 -> 958 bytes | |||
-rw-r--r-- | indra/newview/skins/default/xui/en/sidepanel_inventory.xml | 25 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/widgets/badge.xml | 14 |
6 files changed, 68 insertions, 28 deletions
diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 7f5a2e64bf..9247611257 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -134,38 +134,45 @@ BOOL LLSidepanelInventory::postBuild() } -void LLSidepanelInventory::onToggleInboxBtn() +void manageInboxOutboxPanels(LLLayoutStack * stack, + LLButton * pressedButton, LLLayoutPanel * pressedPanel, + LLButton * otherButton, LLLayoutPanel * otherPanel) { - LLLayoutStack* stack = getChild<LLLayoutStack>("inventory_layout_stack"); - bool collapse = !getChild<LLButton>("inbox_btn")->getToggleState(); + bool expand = pressedButton->getToggleState(); + bool otherExpanded = otherButton->getToggleState(); - if (stack) - { - stack->collapsePanel(getChild<LLLayoutPanel>("inbox_layout_panel"), collapse); - } - if (!collapse) + if (expand && otherExpanded) { - stack->collapsePanel(getChild<LLLayoutPanel>("outbox_layout_panel"), true); - getChild<LLButton>("outbox_btn")->setToggleState(false); + // Reshape pressedPanel to the otherPanel's height so we preserve the marketplace panel size + pressedPanel->reshape(pressedPanel->getRect().getWidth(), otherPanel->getRect().getHeight()); + + stack->collapsePanel(otherPanel, true); + otherButton->setToggleState(false); } + + stack->collapsePanel(pressedPanel, !expand); } -void LLSidepanelInventory::onToggleOutboxBtn() +void LLSidepanelInventory::onToggleInboxBtn() { LLLayoutStack* stack = getChild<LLLayoutStack>("inventory_layout_stack"); - bool collapse = !getChild<LLButton>("outbox_btn")->getToggleState(); + LLButton* pressedButton = getChild<LLButton>("inbox_btn"); + LLLayoutPanel* pressedPanel = getChild<LLLayoutPanel>("inbox_layout_panel"); + LLButton* otherButton = getChild<LLButton>("outbox_btn"); + LLLayoutPanel* otherPanel = getChild<LLLayoutPanel>("outbox_layout_panel"); - if (stack) - { - stack->collapsePanel(getChild<LLLayoutPanel>("outbox_layout_panel"), collapse); - } + manageInboxOutboxPanels(stack, pressedButton, pressedPanel, otherButton, otherPanel); +} - if (!collapse) - { - stack->collapsePanel(getChild<LLLayoutPanel>("inbox_layout_panel"), true); - getChild<LLButton>("inbox_btn")->setToggleState(false); - } +void LLSidepanelInventory::onToggleOutboxBtn() +{ + LLLayoutStack* stack = getChild<LLLayoutStack>("inventory_layout_stack"); + LLButton* pressedButton = getChild<LLButton>("outbox_btn"); + LLLayoutPanel* pressedPanel = getChild<LLLayoutPanel>("outbox_layout_panel"); + LLButton* otherButton = getChild<LLButton>("inbox_btn"); + LLLayoutPanel* otherPanel = getChild<LLLayoutPanel>("inbox_layout_panel"); + manageInboxOutboxPanels(stack, pressedButton, pressedPanel, otherButton, otherPanel); } diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index a19eccf748..0795e38366 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -133,6 +133,12 @@ name="AvatarListItemIconVoiceLeftColor" reference="AvatarListItemIconOfflineColor" /> <color + name="BadgeImageColor" + value="0.25 0.85 0.25 1.0" /> + <color + name="BadgeLabelColor" + reference="White" /> + <color name="ButtonBorderColor" reference="Unused?" /> <color diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index ec12d996bf..f0a1893502 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -72,6 +72,8 @@ with the same filename but different name <texture name="BackButton_Over" file_name="icons/back_arrow_over.png" preload="false" scale.left="22" scale.top="12" scale.right="25" scale.bottom="12" /> <texture name="BackButton_Press" file_name="icons/back_arrow_press.png" preload="false" scale.left="22" scale.top="12" scale.right="25" scale.bottom="12" /> + <texture name="Badge" file_name="widgets/Badge.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" /> + <texture name="Blank" file_name="Blank.png" preload="false" /> diff --git a/indra/newview/skins/default/textures/widgets/Badge.png b/indra/newview/skins/default/textures/widgets/Badge.png Binary files differnew file mode 100644 index 0000000000..862b13d219 --- /dev/null +++ b/indra/newview/skins/default/textures/widgets/Badge.png diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml index 7663db2756..fa79975669 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml @@ -26,7 +26,7 @@ top="0" orientation="vertical" name="inventory_layout_stack" - height="540" + height="535" width="330"> <layout_panel width="330" @@ -47,6 +47,7 @@ <layout_panel width="330" auto_resize="true" + user_resize="false" follows="bottom|left|right" min_dim="35" name="inbox_layout_panel" @@ -75,8 +76,7 @@ tab_stop="false" pad_left="35" top="0" - left="10" - ></button> + left="10" /> <panel follows="all" left="10" @@ -102,12 +102,12 @@ top="0" width="308" /> </panel> - </panel> </layout_panel> <layout_panel width="330" auto_resize="true" + user_resize="false" follows="bottom|left|right" name="outbox_layout_panel" min_dim="35" @@ -136,8 +136,19 @@ halign="left" pad_left="35" top="0" - left="0" - ></button> + left="0" /> + <button + label="SYNC" + is_toggle="false" + name="outbox_sync_btn" + follows="top|right" + height="25" + tab_stop="false" + width="45" + halign="center" + top="5" + left="-50" + enabled="false" /> <panel follows="all" left="0" @@ -163,7 +174,7 @@ layout="topleft" name="button_panel" left="9" - top_pad="2" + top_pad="7" width="308"> <layout_stack follows="bottom|left|right" diff --git a/indra/newview/skins/default/xui/en/widgets/badge.xml b/indra/newview/skins/default/xui/en/widgets/badge.xml new file mode 100644 index 0000000000..4eb633ac0c --- /dev/null +++ b/indra/newview/skins/default/xui/en/widgets/badge.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<!-- Additional attributes: + --> +<badge font="SansSerifSmall" + image="Badge" + image_color="BadgeImageColor" + label_color="BadgeLabelColor" + location="top_left" + location_percent_hcenter="85" + location_percent_vcenter="85" + padding_horiz="7" + padding_vert="4" + > +</badge> |