diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2016-09-01 16:40:41 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2016-09-01 16:40:41 +0300 |
commit | 81b683f83b759e78d1e0b598e412d86991791d39 (patch) | |
tree | 3b61a762fd0aa520db01bfdfbf18677751eaec1a | |
parent | ac1f29a73c8cdaa5bd7bdc47fd4d2157a879f304 (diff) |
MAINT-6686 FIXED [VOB] Outfit Snapshot floater should be resized independently of general Snapshot floater
-rw-r--r-- | indra/newview/app_settings/settings.xml | 11 | ||||
-rw-r--r-- | indra/newview/llfloateroutfitsnapshot.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llfloateroutfitsnapshot.h | 2 | ||||
-rw-r--r-- | indra/newview/llfloatersnapshot.cpp | 21 | ||||
-rw-r--r-- | indra/newview/llfloatersnapshot.h | 5 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_outfit_snapshot.xml | 8 |
6 files changed, 45 insertions, 11 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 64e4bd2074..2d3c885522 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -137,6 +137,17 @@ <key>Value</key> <integer>1</integer> </map> + <key>AdvanceOutfitSnapshot</key> + <map> + <key>Comment</key> + <string>Display advanced parameter settings in outfit snaphot interface</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>AgentPause</key> <map> <key>Comment</key> diff --git a/indra/newview/llfloateroutfitsnapshot.cpp b/indra/newview/llfloateroutfitsnapshot.cpp index ca5a2fdad5..d80793f9e4 100644 --- a/indra/newview/llfloateroutfitsnapshot.cpp +++ b/indra/newview/llfloateroutfitsnapshot.cpp @@ -246,6 +246,8 @@ BOOL LLFloaterOutfitSnapshot::postBuild() getChild<LLUICtrl>("auto_snapshot_check")->setValue(gSavedSettings.getBOOL("AutoSnapshot")); childSetCommitCallback("auto_snapshot_check", ImplBase::onClickAutoSnap, this); + getChild<LLButton>("retract_btn")->setCommitCallback(boost::bind(&LLFloaterOutfitSnapshot::onExtendFloater, this)); + getChild<LLButton>("extend_btn")->setCommitCallback(boost::bind(&LLFloaterOutfitSnapshot::onExtendFloater, this)); // Filters LLComboBox* filterbox = getChild<LLComboBox>("filters_combobox"); @@ -277,6 +279,7 @@ BOOL LLFloaterOutfitSnapshot::postBuild() impl->mPreviewHandle = previewp->getHandle(); previewp->setContainer(this); impl->updateControls(this); + impl->setAdvanced(gSavedSettings.getBOOL("AdvanceOutfitSnapshot")); impl->updateLayout(this); previewp->mKeepAspectRatio = FALSE; @@ -300,6 +303,7 @@ void LLFloaterOutfitSnapshot::onOpen(const LLSD& key) gSnapshotFloaterView->adjustToFitScreen(this, FALSE); impl->updateControls(this); + impl->setAdvanced(gSavedSettings.getBOOL("AdvanceOutfitSnapshot")); impl->updateLayout(this); LLPanel* snapshot_panel = getChild<LLPanel>("panel_outfit_snapshot_inventory"); @@ -308,6 +312,11 @@ void LLFloaterOutfitSnapshot::onOpen(const LLSD& key) } +void LLFloaterOutfitSnapshot::onExtendFloater() +{ + impl->setAdvanced(gSavedSettings.getBOOL("AdvanceOutfitSnapshot")); +} + // static void LLFloaterOutfitSnapshot::update() { diff --git a/indra/newview/llfloateroutfitsnapshot.h b/indra/newview/llfloateroutfitsnapshot.h index 04623acf0f..bee386ec63 100644 --- a/indra/newview/llfloateroutfitsnapshot.h +++ b/indra/newview/llfloateroutfitsnapshot.h @@ -50,6 +50,8 @@ public: static void update(); + void onExtendFloater(); + static LLFloaterOutfitSnapshot* getInstance(); static LLFloaterOutfitSnapshot* findInstance(); /*virtual*/ void saveTexture(); diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index f6d20c84d0..664668f2f7 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -158,8 +158,6 @@ void LLFloaterSnapshotBase::ImplBase::updateLayout(LLFloaterSnapshotBase* floate { LLSnapshotLivePreview* previewp = getPreviewView(); - BOOL advanced = gSavedSettings.getBOOL("AdvanceSnapshot"); - //BD - Automatically calculate the size of our snapshot window to enlarge // the snapshot preview to its maximum size, this is especially helpfull // for pretty much every aspect ratio other than 1:1. @@ -175,16 +173,16 @@ void LLFloaterSnapshotBase::ImplBase::updateLayout(LLFloaterSnapshotBase* floate } S32 floater_width = 224.f; - if(advanced) + if(mAdvanced) { floater_width = floater_width + panel_width; } LLUICtrl* thumbnail_placeholder = floaterp->getChild<LLUICtrl>("thumbnail_placeholder"); - thumbnail_placeholder->setVisible(advanced); + thumbnail_placeholder->setVisible(mAdvanced); thumbnail_placeholder->reshape(panel_width, thumbnail_placeholder->getRect().getHeight()); - floaterp->getChild<LLUICtrl>("image_res_text")->setVisible(advanced); - floaterp->getChild<LLUICtrl>("file_size_label")->setVisible(advanced); + floaterp->getChild<LLUICtrl>("image_res_text")->setVisible(mAdvanced); + floaterp->getChild<LLUICtrl>("file_size_label")->setVisible(mAdvanced); if(!floaterp->isMinimized()) { floaterp->reshape(floater_width, floaterp->getRect().getHeight()); @@ -996,7 +994,9 @@ BOOL LLFloaterSnapshot::postBuild() getChild<LLUICtrl>("auto_snapshot_check")->setValue(gSavedSettings.getBOOL("AutoSnapshot")); childSetCommitCallback("auto_snapshot_check", ImplBase::onClickAutoSnap, this); - + + getChild<LLButton>("retract_btn")->setCommitCallback(boost::bind(&LLFloaterSnapshot::onExtendFloater, this)); + getChild<LLButton>("extend_btn")->setCommitCallback(boost::bind(&LLFloaterSnapshot::onExtendFloater, this)); // Filters LLComboBox* filterbox = getChild<LLComboBox>("filters_combobox"); @@ -1038,6 +1038,7 @@ BOOL LLFloaterSnapshot::postBuild() impl->mPreviewHandle = previewp->getHandle(); previewp->setContainer(this); impl->updateControls(this); + impl->setAdvanced(gSavedSettings.getBOOL("AdvanceSnapshot")); impl->updateLayout(this); @@ -1110,12 +1111,18 @@ void LLFloaterSnapshot::onOpen(const LLSD& key) gSnapshotFloaterView->adjustToFitScreen(this, FALSE); impl->updateControls(this); + impl->setAdvanced(gSavedSettings.getBOOL("AdvanceSnapshot")); impl->updateLayout(this); // Initialize default tab. getChild<LLSideTrayPanelContainer>("panel_container")->getCurrentPanel()->onOpen(LLSD()); } +void LLFloaterSnapshot::onExtendFloater() +{ + impl->setAdvanced(gSavedSettings.getBOOL("AdvanceSnapshot")); +} + //virtual void LLFloaterSnapshotBase::onClose(bool app_quitting) { diff --git a/indra/newview/llfloatersnapshot.h b/indra/newview/llfloatersnapshot.h index 44f77a92ec..4bcfa674fa 100644 --- a/indra/newview/llfloatersnapshot.h +++ b/indra/newview/llfloatersnapshot.h @@ -116,6 +116,8 @@ public: virtual EStatus getStatus() const { return mStatus; } virtual void setNeedRefresh(bool need); + void setAdvanced(bool advanced) { mAdvanced = advanced; } + virtual LLSnapshotModel::ESnapshotLayerType getLayerType(LLFloaterSnapshotBase* floater) = 0; virtual void checkAutoSnapshot(LLSnapshotLivePreview* floater, BOOL update_thumbnail = FALSE); void setWorking(bool working); @@ -129,6 +131,7 @@ public: LLHandle<LLView> mPreviewHandle; bool mAspectRatioCheckOff; bool mNeedRefresh; + bool mAdvanced; EStatus mStatus; }; @@ -146,6 +149,8 @@ public: static void update(); + void onExtendFloater(); + static LLFloaterSnapshot* getInstance(); static LLFloaterSnapshot* findInstance(); /*virtual*/ void saveTexture(); diff --git a/indra/newview/skins/default/xui/en/floater_outfit_snapshot.xml b/indra/newview/skins/default/xui/en/floater_outfit_snapshot.xml index 5941471907..15c480f144 100644 --- a/indra/newview/skins/default/xui/en/floater_outfit_snapshot.xml +++ b/indra/newview/skins/default/xui/en/floater_outfit_snapshot.xml @@ -50,8 +50,8 @@ width="167" /> <button follows="left|top" - control_name="AdvanceSnapshot" - invisibility_control="AdvanceSnapshot" + control_name="AdvanceOutfitSnapshot" + invisibility_control="AdvanceOutfitSnapshot" height="25" is_toggle="true" layout="topleft" @@ -65,8 +65,8 @@ width="31" /> <button follows="left|top" - control_name="AdvanceSnapshot" - visibility_control="AdvanceSnapshot" + control_name="AdvanceOutfitSnapshot" + visibility_control="AdvanceOutfitSnapshot" height="25" is_toggle="true" layout="topleft" |