From 63dcd7ba32b374b7e6480b1565df145470c1b35b Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Thu, 7 Mar 2013 20:43:33 -0500 Subject: [PATCH] Snapshot floater aesthetics Restores the cancel button with new functionality! In Freeze mode, it will exit freeze! Otherwise it will just close the floater as it used to do. Lines up everything nicely, and removes overly complex tool tips. Does not change or remove any existing functionality. --- indra/newview/llfloatersnapshot.cpp | 23 ++- .../default/xui/en-us/floater_snapshot.xml | 143 +++++++++--------- 2 files changed, 89 insertions(+), 77 deletions(-) diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index ef9c0c631..2671f0543 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -295,6 +295,7 @@ public: mAvatarPauseHandles.clear(); mQualityMouseUpConnection.disconnect(); } + static void onClickDiscard(void* data); static void onClickKeep(void* data); static void onCommitSave(LLUICtrl* ctrl, void* data); static void onClickNewSnapshot(void* data); @@ -1861,7 +1862,7 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater, bool de floater->childSetVisible("keep_aspect", is_advance); floater->childSetVisible("type_label3", is_advance); floater->childSetVisible("format_label", is_advance && is_local); - floater->childSetVisible("local_format_combo", is_local); + floater->childSetVisible("local_format_combo", is_advance && is_local); floater->childSetVisible("layer_types", is_advance); floater->childSetVisible("layer_type_label", is_advance); floater->childSetVisible("aspect_one_label", is_advance); @@ -1873,7 +1874,7 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater, bool de floater->childSetVisible("keep_open_check", is_advance); floater->childSetVisible("freeze_time_check", is_advance); floater->childSetVisible("auto_snapshot_check", is_advance); - floater->childSetVisible("image_quality_slider", show_slider); + floater->childSetVisible("image_quality_slider", is_advance && show_slider); floater->childSetVisible("temp_check", is_advance); BOOL got_bytes = previewp && previewp->getDataSize() > 0; @@ -1941,6 +1942,23 @@ void LLFloaterSnapshot::Impl::checkAutoSnapshot(LLSnapshotLivePreview* previewp, } } +// static +void LLFloaterSnapshot::Impl::onClickDiscard(void* data) +{ + LLFloaterSnapshot* view = static_cast(data); + if (gSavedSettings.getBOOL("FreezeTime")) + { + LLSnapshotLivePreview* previewp = view->impl.getPreviewView(); + if (previewp && previewp->getShowFreezeFrameSnapshot()) + previewp->showFreezeFrameSnapshot(false); + view->impl.freezeTime(false); + } + else + { + view->close(); + } +} + // static void LLFloaterSnapshot::Impl::onCommitFeedResolution(LLUICtrl* ctrl, void* data) { @@ -2934,6 +2952,7 @@ BOOL LLFloaterSnapshot::postBuild() childSetAction("send_btn", Impl::onClickKeep, this); childSetAction("feed_btn", Impl::onClickKeep, this); childSetCommitCallback("save_btn", Impl::onCommitSave, this); + childSetAction("discard_btn", Impl::onClickDiscard, this); childSetCommitCallback("image_quality_slider", Impl::onCommitQuality, this); childSetValue("image_quality_slider", gSavedSettings.getS32("SnapshotQuality")); diff --git a/indra/newview/skins/default/xui/en-us/floater_snapshot.xml b/indra/newview/skins/default/xui/en-us/floater_snapshot.xml index cb9d8cfda..f8ecc510a 100644 --- a/indra/newview/skins/default/xui/en-us/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/en-us/floater_snapshot.xml @@ -1,91 +1,72 @@ - + File size: [SIZE] KB - + Target - - Post to my.secondlife.com feed + Post to profile feed Send via email - Save to my inventory ([UPLOADFEE]) + Save to inventory ([UPLOADFEE]) - Save to my hard drive + Save to hard drive -