Improved slider color theme when active/inactive
This commit is contained in:
parent
f813057288
commit
ed31f6849d
1 changed files with 9 additions and 3 deletions
12
external/libguisan/src/widgets/slider.cpp
vendored
12
external/libguisan/src/widgets/slider.cpp
vendored
|
@ -130,11 +130,17 @@ namespace gcn
|
|||
|
||||
void Slider::draw(Graphics* graphics)
|
||||
{
|
||||
auto shadowColor = getBaseColor() - 0x101010;
|
||||
const auto alpha = getBaseColor().a;
|
||||
shadowColor.a = alpha;
|
||||
auto faceColor = getBaseColor();
|
||||
faceColor.a = alpha;
|
||||
|
||||
graphics->setColor(shadowColor);
|
||||
auto backCol = getBackgroundColor();
|
||||
if (isEnabled())
|
||||
backCol = backCol - 0x303030;
|
||||
else
|
||||
backCol = faceColor - 0x101010;
|
||||
|
||||
graphics->setColor(backCol);
|
||||
graphics->fillRectangle(Rectangle(0, 0, getWidth(), getHeight()));
|
||||
|
||||
drawMarker(graphics);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue