Skip to content

Commit

Permalink
ScreenSaverSelector: fix drawing of "stop" icon
Browse files Browse the repository at this point in the history
* Use B_SUBPIXEL_PRECISE and remove incorrect rounding
* Drawing the bar of the stop sign just 1 pixel off was really ugly.
  • Loading branch information
pulkomandy committed Oct 20, 2014
1 parent 6177acd commit b544072
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/preferences/screensaver/ScreenCornerSelector.cpp
Expand Up @@ -199,12 +199,15 @@ ScreenCornerSelector::_DrawStop(BRect innerFrame)

SetHighColor(255, 0, 0);
SetPenSize(2);
SetFlags(Flags() | B_SUBPIXEL_PRECISE);

StrokeEllipse(rect);

size -= ceilf(sin(M_PI / 4) * size + 2);
size -= sin(M_PI / 4) * size + 2;
rect.InsetBy(size, size);
StrokeLine(rect.RightTop(), rect.LeftBottom());

SetFlags(Flags() & ~B_SUBPIXEL_PRECISE);
SetPenSize(1);
}

Expand Down

0 comments on commit b544072

Please sign in to comment.