aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloatersnapshot.cpp
diff options
context:
space:
mode:
authorMcCabe Maxsted2009-09-27 13:53:56 -0700
committerMcCabe Maxsted2009-09-27 13:53:56 -0700
commitaa3b33c107964d423131219c915030aea124a8df (patch)
treea37ed32c409036137c4187a6349a5aa5f9398815 /linden/indra/newview/llfloatersnapshot.cpp
parentDeleted duplicate Torley windlight sky preset (diff)
downloadmeta-impy-aa3b33c107964d423131219c915030aea124a8df.zip
meta-impy-aa3b33c107964d423131219c915030aea124a8df.tar.gz
meta-impy-aa3b33c107964d423131219c915030aea124a8df.tar.bz2
meta-impy-aa3b33c107964d423131219c915030aea124a8df.tar.xz
Fixed JPEG quality slider displaying over high-res checkbox in snapshot floater (IMP-140)
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llfloatersnapshot.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/linden/indra/newview/llfloatersnapshot.cpp b/linden/indra/newview/llfloatersnapshot.cpp
index 2cecd89..8e3d682 100644
--- a/linden/indra/newview/llfloatersnapshot.cpp
+++ b/linden/indra/newview/llfloatersnapshot.cpp
@@ -78,8 +78,8 @@
78///---------------------------------------------------------------------------- 78///----------------------------------------------------------------------------
79/// Local function declarations, constants, enums, and typedefs 79/// Local function declarations, constants, enums, and typedefs
80///---------------------------------------------------------------------------- 80///----------------------------------------------------------------------------
81S32 LLFloaterSnapshot::sUIWinHeightLong = 526 ; 81S32 LLFloaterSnapshot::sUIWinHeightLong = 546 ;
82S32 LLFloaterSnapshot::sUIWinHeightShort = LLFloaterSnapshot::sUIWinHeightLong - 230 ; 82S32 LLFloaterSnapshot::sUIWinHeightShort = LLFloaterSnapshot::sUIWinHeightLong - 250 ;
83S32 LLFloaterSnapshot::sUIWinWidth = 215 ; 83S32 LLFloaterSnapshot::sUIWinWidth = 215 ;
84 84
85LLSnapshotFloaterView* gSnapshotFloaterView = NULL; 85LLSnapshotFloaterView* gSnapshotFloaterView = NULL;
@@ -1255,9 +1255,6 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
1255 1255
1256 BOOL is_advance = gSavedSettings.getBOOL("AdvanceSnapshot"); 1256 BOOL is_advance = gSavedSettings.getBOOL("AdvanceSnapshot");
1257 BOOL is_local = shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL; 1257 BOOL is_local = shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL;
1258 BOOL show_slider =
1259 shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD
1260 || (is_local && shot_format == LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG);
1261 1258
1262 floater->childSetVisible("more_btn", !is_advance); // the only item hidden in advanced mode 1259 floater->childSetVisible("more_btn", !is_advance); // the only item hidden in advanced mode
1263 floater->childSetVisible("less_btn", is_advance); 1260 floater->childSetVisible("less_btn", is_advance);
@@ -1270,17 +1267,22 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
1270 floater->childSetVisible("snapshot_height", is_advance); 1267 floater->childSetVisible("snapshot_height", is_advance);
1271 floater->childSetVisible("keep_aspect_check", is_advance); 1268 floater->childSetVisible("keep_aspect_check", is_advance);
1272 floater->childSetVisible("ui_check", is_advance); 1269 floater->childSetVisible("ui_check", is_advance);
1273 floater->childSetVisible("high_res_check", is_advance && is_local); 1270 floater->childSetVisible("high_res_check", is_advance);
1274 floater->childSetVisible("hud_check", is_advance); 1271 floater->childSetVisible("hud_check", is_advance);
1275 floater->childSetVisible("keep_open_check", is_advance); 1272 floater->childSetVisible("keep_open_check", is_advance);
1276 floater->childSetVisible("freeze_frame_check", is_advance); 1273 floater->childSetVisible("freeze_frame_check", is_advance);
1277 floater->childSetVisible("auto_snapshot_check", is_advance); 1274 floater->childSetVisible("auto_snapshot_check", is_advance);
1278 floater->childSetVisible("image_quality_slider", is_advance && show_slider); 1275 floater->childSetVisible("image_quality_slider", is_advance);
1279 1276
1280 LLSnapshotLivePreview* previewp = getPreviewView(floater); 1277 LLSnapshotLivePreview* previewp = getPreviewView(floater);
1281 BOOL got_bytes = previewp && previewp->getDataSize() > 0; 1278 BOOL got_bytes = previewp && previewp->getDataSize() > 0;
1282 BOOL got_snap = previewp->getSnapshotUpToDate(); 1279 BOOL got_snap = previewp->getSnapshotUpToDate();
1283 1280
1281 BOOL show_slider =
1282 shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD
1283 || (is_local && shot_format == LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG);
1284 floater->childSetEnabled("image_quality_slider", show_slider);
1285
1284 floater->childSetEnabled("send_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD && got_snap && previewp->getDataSize() <= MAX_POSTCARD_DATASIZE); 1286 floater->childSetEnabled("send_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD && got_snap && previewp->getDataSize() <= MAX_POSTCARD_DATASIZE);
1285 floater->childSetEnabled("upload_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_TEXTURE && got_snap); 1287 floater->childSetEnabled("upload_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_TEXTURE && got_snap);
1286 floater->childSetEnabled("save_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL && got_snap); 1288 floater->childSetEnabled("save_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL && got_snap);
@@ -2111,6 +2113,7 @@ void LLFloaterSnapshot::draw()
2111 childSetTextArg("file_size_label", "[SIZE]", getString("unknown")); 2113 childSetTextArg("file_size_label", "[SIZE]", getString("unknown"));
2112 childSetColor("file_size_label", gColors.getColor( "LabelTextColor" )); 2114 childSetColor("file_size_label", gColors.getColor( "LabelTextColor" ));
2113 } 2115 }
2116
2114 childSetEnabled("upload_btn", previewp->getSnapshotUpToDate()); 2117 childSetEnabled("upload_btn", previewp->getSnapshotUpToDate());
2115 childSetEnabled("save_btn", previewp->getSnapshotUpToDate()); 2118 childSetEnabled("save_btn", previewp->getSnapshotUpToDate());
2116 2119