From 8f658804bc34d26457a65e3a1ff4487c19448f64 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 19 Aug 2024 08:47:24 +0300 Subject: viewer#2310 Highlight image size when over limit for profile feed --- indra/newview/llfloatersnapshot.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'indra/newview') 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("file_size_label")->setTextArg("[SIZE]", got_snap ? bytes_string : floater->getString("unknown")); - floater->getChild("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("file_size_label")->setColor(color); // Update the width and height spinners based on the corresponding resolution combos. (?) switch(shot_type) -- cgit v1.2.3