Skip to content

Commit

Permalink
Fixed|UI|Client: Alignment issue due unsigned math
Browse files Browse the repository at this point in the history
The "No LOD" label of a slider was missing because negative values
were interpreted as large positive values.
  • Loading branch information
skyjake committed Sep 16, 2013
1 parent 6d8dd58 commit a2bf919
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doomsday/client/include/ui/uidefs.h
Expand Up @@ -96,7 +96,7 @@ typename RectType::Corner applyAlignment(Alignment align, SizeType const &size,
}
else if(!align.testFlag(AlignTop))
{
p.y += de::floor(double(bounds.height() - size.y) / 2.0);
p.y += de::floor((double(bounds.height()) - double(size.y)) / 2.0);
}

return p;
Expand Down
2 changes: 1 addition & 1 deletion doomsday/client/src/ui/widgets/sliderwidget.cpp
Expand Up @@ -260,7 +260,7 @@ DENG_GUI_PIMPL(SliderWidget)
verts.makeFlexibleFrame(slider.expanded(5), 6, Vector4f(1, 1, 1, frameOpacity),
atlas().imageRectf(root().gradientFrame()));

// Labels.
// Labels.
if(labels[Start].isReady())
{
labels[Start].makeVertices(verts,
Expand Down

0 comments on commit a2bf919

Please sign in to comment.