Skip to content

Commit

Permalink
UI|ToggleWidget: Ensure a disabled toggle’s state can be seen
Browse files Browse the repository at this point in the history
The “flipper” of the toggle is now drawn with a larger-than-one
alpha so that it will be opaque even if the widget as a whole has
transparency.
  • Loading branch information
skyjake committed Dec 11, 2013
1 parent 89a6266 commit 62c53bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion doomsday/client/src/ui/widgets/togglewidget.cpp
Expand Up @@ -83,7 +83,8 @@ DENG2_OBSERVES(ButtonWidget, Press)
Rectanglei flip = Rectanglei::fromSize(recti.topLeft +
Vector2i(1 + de::round<int>(p * (size().x - flipWidth)), 1),
Vector2ui(flipWidth, size().y) - Vector2ui(2, 2));
verts.makeQuad(flip, _bgColor, atlas().imageRectf(_owner.root().solidWhitePixel()).middle());
verts.makeQuad(flip, _bgColor * Vector4f(1, 1, 1, 3),
atlas().imageRectf(_owner.root().solidWhitePixel()).middle());
}

void updateStyle()
Expand Down

0 comments on commit 62c53bb

Please sign in to comment.