diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-08-19 08:47:24 +0300 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2024-08-19 12:22:40 +0300 |
commit | 8f658804bc34d26457a65e3a1ff4487c19448f64 (patch) | |
tree | 7f96f6965d6cf90a57ec55d0b139fb2e61cd0dc7 /indra/newview/llfloatersnapshot.cpp | |
parent | 627d512c473b8429128869f77d4b2fbbe741d067 (diff) |
viewer#2310 Highlight image size when over limit for profile feed
Diffstat (limited to 'indra/newview/llfloatersnapshot.cpp')
-rw-r--r-- | indra/newview/llfloatersnapshot.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index ddd55d0c17..f7c82621fb 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -344,10 +344,22 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshotBase* floater) } floater->getChild<LLUICtrl>("file_size_label")->setTextArg("[SIZE]", got_snap ? bytes_string : floater->getString("unknown")); - floater->getChild<LLUICtrl>("file_size_label")->setColor( - shot_type == LLSnapshotModel::SNAPSHOT_POSTCARD - && got_bytes - && previewp->getDataSize() > MAX_POSTCARD_DATASIZE ? LLUIColor(LLColor4::red) : LLUIColorTable::instance().getColor( "LabelTextColor" )); + + LLUIColor color = LLUIColorTable::instance().getColor( "LabelTextColor" ); + if (shot_type == LLSnapshotModel::SNAPSHOT_POSTCARD + && got_bytes + && previewp->getDataSize() > MAX_POSTCARD_DATASIZE) + { + color = LLUIColor(LLColor4::red); + } + if (shot_type == LLSnapshotModel::SNAPSHOT_WEB + && got_bytes + && previewp->getDataSize() > LLWebProfile::MAX_WEB_DATASIZE) + { + color = LLUIColor(LLColor4::red); + } + + floater->getChild<LLUICtrl>("file_size_label")->setColor(color); // Update the width and height spinners based on the corresponding resolution combos. (?) switch(shot_type) |