viewer#2310 Highlight image size when over limit for profile feed

meow-7.2.2
Andrey Kleshchev 2024-08-19 08:47:24 +03:00 committed by Andrey Kleshchev
parent 627d512c47
commit 8f658804bc
1 changed files with 16 additions and 4 deletions

View File

@ -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)