Merge pull request #33500 from nekomatata/button-icon-override-crash-2
Fixed crash when using icon override in button
This commit is contained in:
commit
f2cd52ddd7
1 changed files with 1 additions and 1 deletions
|
@ -179,7 +179,7 @@ void Button::_notification(int p_what) {
|
||||||
|
|
||||||
if (icon_width > _size.width) {
|
if (icon_width > _size.width) {
|
||||||
icon_width = _size.width;
|
icon_width = _size.width;
|
||||||
icon_height = icon->get_height() * icon_width / _icon->get_width();
|
icon_height = _icon->get_height() * icon_width / _icon->get_width();
|
||||||
}
|
}
|
||||||
|
|
||||||
icon_region = Rect2(style->get_offset() + Point2(icon_ofs_region, (_size.height - icon_height) / 2), Size2(icon_width, icon_height));
|
icon_region = Rect2(style->get_offset() + Point2(icon_ofs_region, (_size.height - icon_height) / 2), Size2(icon_width, icon_height));
|
||||||
|
|
Loading…
Reference in a new issue