disable the search clear button if there is no search

This commit is contained in:
HJfod 2024-09-07 23:49:53 +03:00
parent 81d5dc0cae
commit ab9654a596

View file

@ -577,6 +577,7 @@ void ModList::updateState() {
filterSpr->setState(!isDefaultQuery);
auto clearSpr = static_cast<GeodeSquareSprite*>(m_clearFiltersBtn->getNormalImage());
m_clearFiltersBtn->setEnabled(!isDefaultQuery);
clearSpr->setColor(isDefaultQuery ? ccGRAY : ccWHITE);
clearSpr->setOpacity(isDefaultQuery ? 90 : 255);
clearSpr->getTopSprite()->setColor(isDefaultQuery ? ccGRAY : ccWHITE);