diff options
author | McCabe Maxsted | 2009-09-27 13:53:56 -0700 |
---|---|---|
committer | McCabe Maxsted | 2009-09-27 13:53:56 -0700 |
commit | aa3b33c107964d423131219c915030aea124a8df (patch) | |
tree | a37ed32c409036137c4187a6349a5aa5f9398815 /linden | |
parent | Deleted duplicate Torley windlight sky preset (diff) | |
download | meta-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 'linden')
-rw-r--r-- | linden/indra/newview/llfloatersnapshot.cpp | 17 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/floater_snapshot.xml | 8 |
2 files changed, 14 insertions, 11 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 | ///---------------------------------------------------------------------------- |
81 | S32 LLFloaterSnapshot::sUIWinHeightLong = 526 ; | 81 | S32 LLFloaterSnapshot::sUIWinHeightLong = 546 ; |
82 | S32 LLFloaterSnapshot::sUIWinHeightShort = LLFloaterSnapshot::sUIWinHeightLong - 230 ; | 82 | S32 LLFloaterSnapshot::sUIWinHeightShort = LLFloaterSnapshot::sUIWinHeightLong - 250 ; |
83 | S32 LLFloaterSnapshot::sUIWinWidth = 215 ; | 83 | S32 LLFloaterSnapshot::sUIWinWidth = 215 ; |
84 | 84 | ||
85 | LLSnapshotFloaterView* gSnapshotFloaterView = NULL; | 85 | LLSnapshotFloaterView* 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 | ||
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_snapshot.xml b/linden/indra/newview/skins/default/xui/en-us/floater_snapshot.xml index 9333153..0299100 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_snapshot.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_snapshot.xml | |||
@@ -1,6 +1,6 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
2 | <floater bottom="-300" can_close="true" can_drag_on_left="false" can_minimize="true" | 2 | <floater bottom="-320" can_close="true" can_drag_on_left="false" can_minimize="true" |
3 | can_resize="false" follows="left|top" height="526" name="Snapshot" | 3 | can_resize="false" follows="left|top" height="546" name="Snapshot" |
4 | rect_control="FloaterSnapshotRect" title="Snapshot Preview" width="215"> | 4 | rect_control="FloaterSnapshotRect" title="Snapshot Preview" width="215"> |
5 | <text bottom_delta="-40" follows="top|left" height="15" left="10" name="type_label" | 5 | <text bottom_delta="-40" follows="top|left" height="15" left="10" name="type_label" |
6 | width="195"> | 6 | width="195"> |
@@ -140,9 +140,9 @@ | |||
140 | <check_box bottom_delta="-20" follows="left|top" label="Constrain Proportions" left="10" | 140 | <check_box bottom_delta="-20" follows="left|top" label="Constrain Proportions" left="10" |
141 | name="keep_aspect_check" /> | 141 | name="keep_aspect_check" /> |
142 | <slider bottom_delta="-20" decimal_digits="0" follows="left|top" height="15" | 142 | <slider bottom_delta="-20" decimal_digits="0" follows="left|top" height="15" |
143 | increment="1" initial_val="75" label="Image Quality" left="10" | 143 | increment="1" initial_val="75" label="Image Quality" left="10" label_width="80" |
144 | max_val="100" min_val="0" name="image_quality_slider" width="210" /> | 144 | max_val="100" min_val="0" name="image_quality_slider" width="210" /> |
145 | <check_box bottom_delta="0" follows="left|top" label="High resolution snapshot" | 145 | <check_box bottom_delta="-20" follows="left|top" label="High resolution snapshot" |
146 | left="10" name="high_res_check" /> | 146 | left="10" name="high_res_check" /> |
147 | <text bottom_delta="-28" follows="left|top" height="20" left="10" | 147 | <text bottom_delta="-28" follows="left|top" height="20" left="10" |
148 | name="layer_type_label" width="50"> | 148 | name="layer_type_label" width="50"> |