From f081cca8dd79b4970082ecada831633ca6f9a501 Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Tue, 25 Jun 2013 16:11:39 -0700 Subject: ACME-586: Fixing the file size appearing as red. Was using the postcard snap-shot type which is used for e-mailing pictures (red indicates going over 1mb). --- indra/newview/llfloatersocial.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatersocial.cpp b/indra/newview/llfloatersocial.cpp index 9b27024eed..7ca96dd228 100644 --- a/indra/newview/llfloatersocial.cpp +++ b/indra/newview/llfloatersocial.cpp @@ -136,6 +136,7 @@ BOOL LLSocialPhotoPanel::postBuild() LLSnapshotLivePreview* previewp = new LLSnapshotLivePreview(p); mPreviewHandle = previewp->getHandle(); + previewp->setSnapshotType(previewp->SNAPSHOT_WEB); previewp->setThumbnailPlaceholderRect(getThumbnailPlaceholderRect()); return LLPanel::postBuild(); @@ -261,6 +262,7 @@ void LLSocialPhotoPanel::updateControls() LLSnapshotLivePreview* previewp = getPreviewView(); BOOL got_bytes = previewp && previewp->getDataSize() > 0; BOOL got_snap = previewp && previewp->getSnapshotUpToDate(); + LLSnapshotLivePreview::ESnapshotType shot_type = previewp->getSnapshotType(); // *TODO: Separate maximum size for Web images from postcards lldebugs << "Is snapshot up-to-date? " << got_snap << llendl; @@ -275,7 +277,7 @@ void LLSocialPhotoPanel::updateControls() //getChild("file_size_label")->setTextArg("[SIZE]", got_snap ? bytes_string : getString("unknown")); getChild("file_size_label")->setTextArg("[SIZE]", got_snap ? bytes_string : "unknown"); getChild("file_size_label")->setColor( - true + shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD && got_bytes && previewp->getDataSize() > MAX_POSTCARD_DATASIZE ? LLUIColor(LLColor4::red) : LLUIColorTable::instance().getColor( "LabelTextColor" )); -- cgit v1.2.3