From 5daf817e7ecc170d36e21d171cca344d38872895 Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Thu, 10 Jan 2013 19:42:19 +0100 Subject: [PATCH] Upload larger original to profile feed. --- indra/newview/llfloatersnapshot.cpp | 11 ++++++++++- .../skins/default/xui/en-us/floater_snapshot.xml | 12 ++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index b25aa9383..512c8eb38 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -1624,7 +1624,7 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp) S32 delta_height = 0; if (!gSavedSettings.getBOOL("AdvanceSnapshot")) { - floaterp->getChild("feed_size_combo")->setCurrentByIndex(2); // 500x375 + floaterp->getChild("feed_size_combo")->setCurrentByIndex(2); // 500x375 (4:3) gSavedSettings.setS32("SnapshotFeedLastResolution", 2); floaterp->getChild("postcard_size_combo")->setCurrentByIndex(0); // Current window @@ -2505,6 +2505,15 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, bool previewp->setSize(gSavedSettings.getS32(lastSnapshotWidthName()), gSavedSettings.getS32(lastSnapshotHeightName())); } } + else if (height == -2) + { + // The size is actually the source aspect now, encoded in the width. + F32 source_aspect = width / 630.f; + // Use the size of the current window, cropped to the required aspect. + width = llmin(gViewerWindow->getWindowDisplayWidth(), llround(gViewerWindow->getWindowDisplayHeight() * source_aspect)); + height = llmin(gViewerWindow->getWindowDisplayHeight(), llround(gViewerWindow->getWindowDisplayWidth() / source_aspect)); + previewp->setSize(width, height); + } else { // use the resolution from the selected pre-canned drop-down choice diff --git a/indra/newview/skins/default/xui/en-us/floater_snapshot.xml b/indra/newview/skins/default/xui/en-us/floater_snapshot.xml index 5045c0c80..8142c0f2b 100644 --- a/indra/newview/skins/default/xui/en-us/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/en-us/floater_snapshot.xml @@ -69,22 +69,22 @@ Current Window - + 500x500 (1:1) - + 500x375 (4:3) - + 500x350 (10:7) - + 500x313 (16:10) - + 500x281 (16:9) - + 500x250 (2:1)