RadioButton: Scale mark to font size

This way the amount of inset varies, small font get small inset,
large fonts get large inset.
This commit is contained in:
John Scipione 2015-03-16 18:39:52 -04:00
parent c7756ee15a
commit 22af0f18be

View File

@ -558,7 +558,10 @@ BControlLook::DrawRadioButton(BView* view, BRect& rect, const BRect& updateRect,
rgb_color markColor;
if (_RadioButtonAndCheckBoxMarkColor(base, markColor, flags)) {
view->SetHighColor(markColor);
rect.InsetBy(3, 3);
BFont font;
view->GetFont(&font);
float inset = roundf(font.Size() / 4);
rect.InsetBy(inset, inset);
view->FillEllipse(rect);
}
}