From 18290fa004c661ecf1e4eb879560afd5c9614a95 Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Thu, 15 Oct 2020 09:35:43 -0400 Subject: [PATCH] Implements #28 by raising snapshot to inventory resolution limit to 1024x1024 --- indra/newview/llfloatersnapshot.cpp | 4 ++-- indra/newview/llpanelsnapshot.cpp | 2 +- indra/newview/llpanelsnapshotinventory.cpp | 2 +- indra/newview/llsnapshotlivepreview.cpp | 2 +- .../skins/default/xui/en/panel_snapshot_inventory.xml | 10 +++++++--- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 7d6fb1b99bb..cde499937c1 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -52,7 +52,7 @@ LLSnapshotFloaterView* gSnapshotFloaterView = NULL; const F32 AUTO_SNAPSHOT_TIME_DELAY = 1.f; const S32 MAX_POSTCARD_DATASIZE = 1572864; // 1.5 megabyte, similar to simulator limit -const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512 +const S32 MAX_TEXTURE_SIZE = 1024 ; //max upload texture size 1024 * 1024 static LLDefaultChildRegistry::Register<LLSnapshotFloaterView> r("snapshot_floater_view"); @@ -702,7 +702,7 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL new_width = spanel->getTypedPreviewWidth(); new_height = spanel->getTypedPreviewHeight(); - // Limit custom size for inventory snapshots to 512x512 px. + // Limit custom size for inventory snapshots to 1024x1024 px. if (getActiveSnapshotType(view) == LLSnapshotModel::SNAPSHOT_TEXTURE) { new_width = llmin(new_width, MAX_TEXTURE_SIZE); diff --git a/indra/newview/llpanelsnapshot.cpp b/indra/newview/llpanelsnapshot.cpp index c3524a8c879..a5b4243cbe5 100644 --- a/indra/newview/llpanelsnapshot.cpp +++ b/indra/newview/llpanelsnapshot.cpp @@ -41,7 +41,7 @@ #include "llagentbenefits.h" -const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512 +const S32 MAX_TEXTURE_SIZE = 1024 ; //max upload texture size 1024 * 1024 S32 power_of_two(S32 sz, S32 upper) { diff --git a/indra/newview/llpanelsnapshotinventory.cpp b/indra/newview/llpanelsnapshotinventory.cpp index 9e56a04b3b4..f5cb64c2a7d 100644 --- a/indra/newview/llpanelsnapshotinventory.cpp +++ b/indra/newview/llpanelsnapshotinventory.cpp @@ -148,7 +148,7 @@ void LLPanelSnapshotInventory::updateControls(const LLSD& info) void LLPanelSnapshotInventory::onResolutionCommit(LLUICtrl* ctrl) { - BOOL current_window_selected = (getChild<LLComboBox>(getImageSizeComboName())->getCurrentIndex() == 3); + BOOL current_window_selected = (getChild<LLComboBox>(getImageSizeComboName())->getCurrentIndex() == 0); getChild<LLSpinCtrl>(getWidthSpinnerName())->setVisible(!current_window_selected); getChild<LLSpinCtrl>(getHeightSpinnerName())->setVisible(!current_window_selected); } diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index 171ce842481..3fa43c9c948 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -66,7 +66,7 @@ F32 FALL_TIME = 0.6f; S32 BORDER_WIDTH = 6; S32 TOP_PANEL_HEIGHT = 30; -const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512 +const S32 MAX_TEXTURE_SIZE = 1024 ; //max upload texture size 1024 * 1024 std::set<LLSnapshotLivePreview*> LLSnapshotLivePreview::sList; LLPointer<LLImageFormatted> LLSnapshotLivePreview::sSaveLocalImage = NULL; diff --git a/indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml b/indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml index 8cc27d9eef1..1456b7ea52e 100644 --- a/indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml @@ -47,6 +47,10 @@ name="texture_size_combo" right="-5" top_pad="5"> + <combo_box.item + label="Current Window(1024x1024)" + name="CurrentWindow" + value="[i0,i0]" /> <combo_box.item label="Small (128x128)" name="Small(128x128)" @@ -60,9 +64,9 @@ name="Large(512x512)" value="[i512,i512]" /> <combo_box.item - label="Current Window(512x512)" - name="CurrentWindow" - value="[i0,i0]" /> + label="Extra Large (1024x1024)" + name="Large(1024x1024)" + value="[i1024,i1024]" /> <combo_box.item label="Custom" name="Custom" -- GitLab