SL-19951 Highlight the selected tab by colored icon

master
Alexander Gavriliuk 2023-07-07 01:08:01 +02:00
parent 9793308a60
commit e7f2fbf2a4
1 changed files with 4 additions and 1 deletions

View File

@ -292,6 +292,7 @@ void LLFloaterEmojiPicker::fillGroups()
if (mGroupButtons.size() == sSelectedGroupIndex)
{
button->setToggleState(TRUE);
button->setUseFontColor(TRUE);
}
mGroupButtons.push_back(button);
@ -479,9 +480,11 @@ void LLFloaterEmojiPicker::onGroupButtonClick(LLUICtrl* ctrl)
if (it == mGroupButtons.end())
return;
mGroupButtons[sSelectedGroupIndex]->setUseFontColor(FALSE);
mGroupButtons[sSelectedGroupIndex]->setToggleState(FALSE);
sSelectedGroupIndex = it - mGroupButtons.begin();
mGroupButtons[sSelectedGroupIndex]->setToggleState(TRUE);
mGroupButtons[sSelectedGroupIndex]->setUseFontColor(TRUE);
LLRect rect = mBadge->getRect();
rect.mLeft = button->getRect().mLeft;
@ -538,7 +541,7 @@ void LLFloaterEmojiPicker::onGroupButtonMouseLeave(LLUICtrl* ctrl)
{
if (LLButton* button = dynamic_cast<LLButton*>(ctrl))
{
button->setUseFontColor(FALSE);
button->setUseFontColor(button->getToggleState());
}
}