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:
@@ -558,7 +558,10 @@ BControlLook::DrawRadioButton(BView* view, BRect& rect, const BRect& updateRect,
|
|||||||
rgb_color markColor;
|
rgb_color markColor;
|
||||||
if (_RadioButtonAndCheckBoxMarkColor(base, markColor, flags)) {
|
if (_RadioButtonAndCheckBoxMarkColor(base, markColor, flags)) {
|
||||||
view->SetHighColor(markColor);
|
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);
|
view->FillEllipse(rect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user