summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/llfloater.cpp9
-rw-r--r--indra/llui/llfloaterreg.cpp4
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/app_settings/settings_per_account.xml22
-rw-r--r--indra/newview/llsidepanelinventory.cpp26
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_inventory.xml3
6 files changed, 52 insertions, 23 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index b091a4a1f7..9c4bf0a5c2 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -882,6 +882,10 @@ bool LLFloater::applyRectControl()
reshape(llmax(mMinWidth, rect.getWidth()), llmax(mMinHeight, rect.getHeight()));
}
}
+ mPositioning = LLFloaterEnums::POSITIONING_RELATIVE;
+ LLRect screen_rect = calcScreenRect();
+ mPosition = LLCoordGL(screen_rect.getCenterX(), screen_rect.getCenterY()).convert();
+ storeRectControl();
}
LLControlVariablePtr x_control = getControlGroup()->getControl(mPosXControl);
@@ -898,11 +902,6 @@ bool LLFloater::applyRectControl()
saved_rect = true;
}
- else
- {
- LLRect screen_rect = calcScreenRect();
- mPosition = LLCoordGL(screen_rect.getCenterX(), screen_rect.getCenterY()).convert();
- }
}
return saved_rect;
diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp
index 3d124cf885..9115eb7174 100644
--- a/indra/llui/llfloaterreg.cpp
+++ b/indra/llui/llfloaterreg.cpp
@@ -375,7 +375,7 @@ std::string LLFloaterReg::declareRectControl(const std::string& name)
std::string LLFloaterReg::declarePosXControl(const std::string& name)
{
- std::string controlname = std::string("floater_pos_x_") + getBaseControlName(name);
+ std::string controlname = std::string("floater_pos_") + getBaseControlName(name) + "_x";
LLFloater::getControlGroup()->declareF32(controlname,
10.f,
llformat("Window X Position for %s", name.c_str()),
@@ -385,7 +385,7 @@ std::string LLFloaterReg::declarePosXControl(const std::string& name)
std::string LLFloaterReg::declarePosYControl(const std::string& name)
{
- std::string controlname = std::string("floater_pos_y_") + getBaseControlName(name);
+ std::string controlname = std::string("floater_pos_") + getBaseControlName(name) + "_y";
LLFloater::getControlGroup()->declareF32(controlname,
10.f,
llformat("Window Y Position for %s", name.c_str()),
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index ee659ee39e..15da381e2f 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -4304,17 +4304,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>InventoryInboxToggleState</key>
- <map>
- <key>Comment</key>
- <string>Stores the open/closed state of inventory Received items panel</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>InventoryLinking</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml
index 8cdd8ed838..143126b334 100644
--- a/indra/newview/app_settings/settings_per_account.xml
+++ b/indra/newview/app_settings/settings_per_account.xml
@@ -33,6 +33,28 @@
<key>Value</key>
<string />
</map>
+ <key>InventoryInboxHeight</key>
+ <map>
+ <key>Comment</key>
+ <string>Inventory inbox panel height in Inventory floater.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>200</integer>
+ </map>
+ <key>InventoryInboxToggleState</key>
+ <map>
+ <key>Comment</key>
+ <string>Stores the open/closed state of inventory Received Items panel.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>DisplayDestinationsOnInitialRun</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp
index c8b67cc9ec..4f9ab318a5 100644
--- a/indra/newview/llsidepanelinventory.cpp
+++ b/indra/newview/llsidepanelinventory.cpp
@@ -78,7 +78,6 @@ static const char * const MARKETPLACE_INBOX_PANEL = "marketplace_inbox";
//
// Helpers
//
-
class LLInboxAddedObserver : public LLInventoryCategoryAddedObserver
{
public:
@@ -130,6 +129,11 @@ LLSidepanelInventory::LLSidepanelInventory()
LLSidepanelInventory::~LLSidepanelInventory()
{
+ LLLayoutPanel* inbox_layout_panel = getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME);
+
+ // Save the InventoryMainPanelHeight in settings per account
+ gSavedPerAccountSettings.setS32("InventoryInboxHeight", inbox_layout_panel->getTargetDim());
+
if (mCategoriesObserver && gInventory.containsObserver(mCategoriesObserver))
{
gInventory.removeObserver(mCategoriesObserver);
@@ -226,7 +230,12 @@ BOOL LLSidepanelInventory::postBuild()
bool is_inbox_collapsed = !inbox_button->getToggleState();
// Restore the collapsed inbox panel state
- inv_stack->collapsePanel(getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME), is_inbox_collapsed);
+ LLLayoutPanel* inbox_panel = getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME);
+ inv_stack->collapsePanel(inbox_panel, is_inbox_collapsed);
+ if (!is_inbox_collapsed)
+ {
+ inbox_panel->setTargetDim(gSavedPerAccountSettings.getS32("InventoryInboxHeight"));
+ }
// Set the inbox visible based on debug settings (final setting comes from http request below)
enableInbox(gSavedSettings.getBOOL("InventoryDisplayInbox"));
@@ -370,10 +379,19 @@ void LLSidepanelInventory::onToggleInboxBtn()
// Expand/collapse the indicated panel
inv_stack->collapsePanel(inboxPanel, !inbox_expanded);
- if (inbox_expanded && inboxPanel->isInVisibleChain())
+ if (inbox_expanded)
{
- gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected());
+ inboxPanel->setTargetDim(gSavedPerAccountSettings.getS32("InventoryInboxHeight"));
+ if (inboxPanel->isInVisibleChain())
+ {
+ gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected());
+ }
}
+ else
+ {
+ gSavedPerAccountSettings.setS32("InventoryInboxHeight", inboxPanel->getTargetDim());
+ }
+
}
void LLSidepanelInventory::onOpen(const LLSD& key)
diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
index 29e27cb146..bd6e934703 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
@@ -51,7 +51,7 @@
<layout_panel
width="330"
layout="topleft"
- auto_resize="true"
+ auto_resize="false"
user_resize="true"
follows="left|right|top"
name="inbox_layout_panel"
@@ -105,6 +105,7 @@
[NUM] new
</text>
<panel
+ name="inbox_inventory_placeholder_panel"
follows="all"
left="10"
bottom="235"