aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloatersnapshot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llfloatersnapshot.cpp')
-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 7ec5da2..6597f9d 100644
--- a/linden/indra/newview/llfloatersnapshot.cpp
+++ b/linden/indra/newview/llfloatersnapshot.cpp
@@ -80,8 +80,8 @@
80///---------------------------------------------------------------------------- 80///----------------------------------------------------------------------------
81/// Local function declarations, constants, enums, and typedefs 81/// Local function declarations, constants, enums, and typedefs
82///---------------------------------------------------------------------------- 82///----------------------------------------------------------------------------
83S32 LLFloaterSnapshot::sUIWinHeightLong = 526 ; 83S32 LLFloaterSnapshot::sUIWinHeightLong = 546 ;
84S32 LLFloaterSnapshot::sUIWinHeightShort = LLFloaterSnapshot::sUIWinHeightLong - 230 ; 84S32 LLFloaterSnapshot::sUIWinHeightShort = LLFloaterSnapshot::sUIWinHeightLong - 250 ;
85S32 LLFloaterSnapshot::sUIWinWidth = 215 ; 85S32 LLFloaterSnapshot::sUIWinWidth = 215 ;
86 86
87LLSnapshotFloaterView* gSnapshotFloaterView = NULL; 87LLSnapshotFloaterView* gSnapshotFloaterView = NULL;
@@ -1272,9 +1272,6 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
1272 1272
1273 BOOL is_advance = gSavedSettings.getBOOL("AdvanceSnapshot"); 1273 BOOL is_advance = gSavedSettings.getBOOL("AdvanceSnapshot");
1274 BOOL is_local = shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL; 1274 BOOL is_local = shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL;
1275 BOOL show_slider =
1276 shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD
1277 || (is_local && shot_format == LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG);
1278 1275
1279 floater->childSetVisible("more_btn", !is_advance); // the only item hidden in advanced mode 1276 floater->childSetVisible("more_btn", !is_advance); // the only item hidden in advanced mode
1280 floater->childSetVisible("less_btn", is_advance); 1277 floater->childSetVisible("less_btn", is_advance);
@@ -1287,17 +1284,22 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
1287 floater->childSetVisible("snapshot_height", is_advance); 1284 floater->childSetVisible("snapshot_height", is_advance);
1288 floater->childSetVisible("keep_aspect_check", is_advance); 1285 floater->childSetVisible("keep_aspect_check", is_advance);
1289 floater->childSetVisible("ui_check", is_advance); 1286 floater->childSetVisible("ui_check", is_advance);
1290 floater->childSetVisible("high_res_check", is_advance && is_local); 1287 floater->childSetVisible("high_res_check", is_advance);
1291 floater->childSetVisible("hud_check", is_advance); 1288 floater->childSetVisible("hud_check", is_advance);
1292 floater->childSetVisible("keep_open_check", is_advance); 1289 floater->childSetVisible("keep_open_check", is_advance);
1293 floater->childSetVisible("freeze_frame_check", is_advance); 1290 floater->childSetVisible("freeze_frame_check", is_advance);
1294 floater->childSetVisible("auto_snapshot_check", is_advance); 1291 floater->childSetVisible("auto_snapshot_check", is_advance);
1295 floater->childSetVisible("image_quality_slider", is_advance && show_slider); 1292 floater->childSetVisible("image_quality_slider", is_advance);
1296 1293
1297 LLSnapshotLivePreview* previewp = getPreviewView(floater); 1294 LLSnapshotLivePreview* previewp = getPreviewView(floater);
1298 BOOL got_bytes = previewp && previewp->getDataSize() > 0; 1295 BOOL got_bytes = previewp && previewp->getDataSize() > 0;
1299 BOOL got_snap = previewp->getSnapshotUpToDate(); 1296 BOOL got_snap = previewp->getSnapshotUpToDate();
1300 1297
1298 BOOL show_slider =
1299 shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD
1300 || (is_local && shot_format == LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG);
1301 floater->childSetEnabled("image_quality_slider", show_slider);
1302
1301 floater->childSetEnabled("send_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD && got_snap && previewp->getDataSize() <= MAX_POSTCARD_DATASIZE); 1303 floater->childSetEnabled("send_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD && got_snap && previewp->getDataSize() <= MAX_POSTCARD_DATASIZE);
1302 floater->childSetEnabled("upload_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_TEXTURE && got_snap); 1304 floater->childSetEnabled("upload_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_TEXTURE && got_snap);
1303 floater->childSetEnabled("save_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL && got_snap); 1305 floater->childSetEnabled("save_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL && got_snap);
@@ -2131,6 +2133,7 @@ void LLFloaterSnapshot::draw()
2131 childSetTextArg("file_size_label", "[SIZE]", getString("unknown")); 2133 childSetTextArg("file_size_label", "[SIZE]", getString("unknown"));
2132 childSetColor("file_size_label", gColors.getColor( "LabelTextColor" )); 2134 childSetColor("file_size_label", gColors.getColor( "LabelTextColor" ));
2133 } 2135 }
2136
2134 childSetEnabled("upload_btn", previewp->getSnapshotUpToDate()); 2137 childSetEnabled("upload_btn", previewp->getSnapshotUpToDate());
2135 childSetEnabled("save_btn", previewp->getSnapshotUpToDate()); 2138 childSetEnabled("save_btn", previewp->getSnapshotUpToDate());
2136 2139