Fixed dropdown widget text when disabled

This commit is contained in:
Dimitris Panokostas 2020-05-17 10:39:39 +02:00
parent fa16462092
commit ad5cde455a

View file

@ -162,7 +162,11 @@ namespace gcn
graphics->setColor(backCol);
graphics->fillRectangle(Rectangle(0, 0, getWidth(), h));
graphics->setColor(getForegroundColor());
if (isEnabled())
graphics->setColor(getForegroundColor());
else
graphics->setColor(Color(128, 128, 128));
graphics->setFont(getFont());
if (isFocused())
@ -175,9 +179,6 @@ namespace gcn
if (mListBox->getListModel() && mListBox->getSelected() >= 0)
graphics->drawText(mListBox->getListModel()->getElementAt(mListBox->getSelected()), 2, 1);
if (!isEnabled())
graphics->drawText("N/A", 2, 1);
drawButton(graphics);
if (mDroppedDown)