Upload larger original to profile feed.

This commit is contained in:
Aleric Inglewood
2013-01-10 19:42:19 +01:00
parent 9175bc0e16
commit 5daf817e7e
2 changed files with 16 additions and 7 deletions

View File

@@ -1624,7 +1624,7 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp)
S32 delta_height = 0;
if (!gSavedSettings.getBOOL("AdvanceSnapshot"))
{
floaterp->getChild<LLComboBox>("feed_size_combo")->setCurrentByIndex(2); // 500x375
floaterp->getChild<LLComboBox>("feed_size_combo")->setCurrentByIndex(2); // 500x375 (4:3)
gSavedSettings.setS32("SnapshotFeedLastResolution", 2);
floaterp->getChild<LLComboBox>("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

View File

@@ -69,22 +69,22 @@
<combo_item name="CurrentWindow" value="[i0,i0]">
Current Window
</combo_item>
<combo_item name="500x500" value="[i500,i500]">
<combo_item name="500x500" value="[i630,i-2]">
500x500 (1:1)
</combo_item>
<combo_item name="500x375" value="[i500,i375]">
<combo_item name="500x375" value="[i840,i-2]">
500x375 (4:3)
</combo_item>
<combo_item name="500x350" value="[i500,i350]">
<combo_item name="500x350" value="[i900,i-2]">
500x350 (10:7)
</combo_item>
<combo_item name="500x313" value="[i500,i313]">
<combo_item name="500x313" value="[i1008,i-2]">
500x313 (16:10)
</combo_item>
<combo_item name="500x281" value="[i500,i281]">
<combo_item name="500x281" value="[i1120,i-2]">
500x281 (16:9)
</combo_item>
<combo_item name="500x250" value="[i500,i250]">
<combo_item name="500x250" value="[i1260,i-2]">
500x250 (2:1)
</combo_item>
<combo_item name="Custom" value="[i-1,i-1]">