Merge pull request #63957 from YuriSizov/buttons-in-focus
Round icon position and size in buttons to make them look sharper
This commit is contained in:
commit
15d1af11e2
1 changed files with 2 additions and 1 deletions
|
@ -258,7 +258,8 @@ void Button::_notification(int p_what) {
|
|||
}
|
||||
|
||||
if (icon_region.size.width > 0) {
|
||||
draw_texture_rect_region(_icon, icon_region, Rect2(Point2(), _icon->get_size()), color_icon);
|
||||
Rect2 icon_region_rounded = Rect2(icon_region.position.round(), icon_region.size.round());
|
||||
draw_texture_rect(_icon, icon_region_rounded, false, color_icon);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue