mirror of
https://github.com/LIV2/amiberry.git
synced 2025-12-06 06:32:45 +00:00
enhancement: guisan: fix remaining widgets colors
These widgets were also missing their disabled color
This commit is contained in:
parent
f83bda648a
commit
e465e3f845
@ -153,7 +153,10 @@ namespace gcn
|
||||
graphics->drawLine(getWidth() - 1, 1, getWidth() - 1, getHeight() - 1);
|
||||
graphics->drawLine(1, getHeight() - 1, getWidth() - 1, getHeight() - 1);
|
||||
|
||||
graphics->setColor(getForegroundColor());
|
||||
if (isEnabled())
|
||||
graphics->setColor(getForegroundColor());
|
||||
else
|
||||
graphics->setColor(Color(128, 128, 128));
|
||||
|
||||
const int textX = getWidth() / 2 - (mImage ? mImage->getWidth() : 0) / 2;
|
||||
const int textY = getHeight() / 2 - (mImage ? mImage->getHeight() : 0) / 2;
|
||||
|
||||
@ -162,7 +162,10 @@ namespace gcn
|
||||
graphics->drawLine(getWidth() - 1, 1, getWidth() - 1, getHeight() - 1);
|
||||
graphics->drawLine(1, getHeight() - 1, getWidth() - 1, getHeight() - 1);
|
||||
|
||||
graphics->setColor(getForegroundColor());
|
||||
if (isEnabled())
|
||||
graphics->setColor(getForegroundColor());
|
||||
else
|
||||
graphics->setColor(Color(128, 128, 128));
|
||||
|
||||
int imageX, imageY;
|
||||
int textX, textY;
|
||||
|
||||
5
external/libguisan/src/widgets/inputbox.cpp
vendored
5
external/libguisan/src/widgets/inputbox.cpp
vendored
@ -225,7 +225,10 @@ namespace gcn
|
||||
throw GCN_EXCEPTION("Unknown alignment.");
|
||||
}
|
||||
|
||||
graphics->setColor(getForegroundColor());
|
||||
if (isEnabled())
|
||||
graphics->setColor(getForegroundColor());
|
||||
else
|
||||
graphics->setColor(Color(128, 128, 128));
|
||||
graphics->setFont(getFont());
|
||||
graphics->pushClipArea(Rectangle(0, 0, getWidth(), getTitleBarHeight() - 1));
|
||||
graphics->drawText(getCaption(), textX, textY, getAlignment(), isEnabled());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user