From aa3b33c107964d423131219c915030aea124a8df Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sun, 27 Sep 2009 13:53:56 -0700 Subject: Fixed JPEG quality slider displaying over high-res checkbox in snapshot floater (IMP-140) --- linden/indra/newview/llfloatersnapshot.cpp | 17 ++++++++++------- .../skins/default/xui/en-us/floater_snapshot.xml | 8 ++++---- 2 files changed, 14 insertions(+), 11 deletions(-) (limited to 'linden') 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 @@ ///---------------------------------------------------------------------------- /// Local function declarations, constants, enums, and typedefs ///---------------------------------------------------------------------------- -S32 LLFloaterSnapshot::sUIWinHeightLong = 526 ; -S32 LLFloaterSnapshot::sUIWinHeightShort = LLFloaterSnapshot::sUIWinHeightLong - 230 ; +S32 LLFloaterSnapshot::sUIWinHeightLong = 546 ; +S32 LLFloaterSnapshot::sUIWinHeightShort = LLFloaterSnapshot::sUIWinHeightLong - 250 ; S32 LLFloaterSnapshot::sUIWinWidth = 215 ; LLSnapshotFloaterView* gSnapshotFloaterView = NULL; @@ -1255,9 +1255,6 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) BOOL is_advance = gSavedSettings.getBOOL("AdvanceSnapshot"); BOOL is_local = shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL; - BOOL show_slider = - shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD - || (is_local && shot_format == LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG); floater->childSetVisible("more_btn", !is_advance); // the only item hidden in advanced mode floater->childSetVisible("less_btn", is_advance); @@ -1270,17 +1267,22 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) floater->childSetVisible("snapshot_height", is_advance); floater->childSetVisible("keep_aspect_check", is_advance); floater->childSetVisible("ui_check", is_advance); - floater->childSetVisible("high_res_check", is_advance && is_local); + floater->childSetVisible("high_res_check", is_advance); floater->childSetVisible("hud_check", is_advance); floater->childSetVisible("keep_open_check", is_advance); floater->childSetVisible("freeze_frame_check", is_advance); floater->childSetVisible("auto_snapshot_check", is_advance); - floater->childSetVisible("image_quality_slider", is_advance && show_slider); + floater->childSetVisible("image_quality_slider", is_advance); LLSnapshotLivePreview* previewp = getPreviewView(floater); BOOL got_bytes = previewp && previewp->getDataSize() > 0; BOOL got_snap = previewp->getSnapshotUpToDate(); + BOOL show_slider = + shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD + || (is_local && shot_format == LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG); + floater->childSetEnabled("image_quality_slider", show_slider); + floater->childSetEnabled("send_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD && got_snap && previewp->getDataSize() <= MAX_POSTCARD_DATASIZE); floater->childSetEnabled("upload_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_TEXTURE && got_snap); floater->childSetEnabled("save_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL && got_snap); @@ -2111,6 +2113,7 @@ void LLFloaterSnapshot::draw() childSetTextArg("file_size_label", "[SIZE]", getString("unknown")); childSetColor("file_size_label", gColors.getColor( "LabelTextColor" )); } + childSetEnabled("upload_btn", previewp->getSnapshotUpToDate()); childSetEnabled("save_btn", previewp->getSnapshotUpToDate()); 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 @@ - @@ -140,9 +140,9 @@ - -- cgit v1.1