BAlert: Fix preferred-size computation.

The icon is rendered starting at label-spacing * 3, not * 2.
This meant the icon got cut off in some rare scenarios, mostly
ones where text wrapped.
This commit is contained in:
Augustin Cavalier 2022-08-26 21:23:29 -04:00
parent 8fab9f8a9f
commit a649df28ac

View File

@ -750,7 +750,7 @@ TAlertView::GetPreferredSize(float* _width, float* _height)
{
if (_width != NULL) {
if (fIconBitmap != NULL) {
*_width = (be_control_look->DefaultLabelSpacing() * 2)
*_width = (be_control_look->DefaultLabelSpacing() * 3)
+ fIconBitmap->Bounds().Width();
} else {
*_width = 0;