From a649df28acc8e373f6bdc18618a2cf5578baddc1 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Fri, 26 Aug 2022 21:23:29 -0400 Subject: [PATCH] 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. --- src/kits/interface/Alert.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kits/interface/Alert.cpp b/src/kits/interface/Alert.cpp index 77ee49bc42..a56a49705e 100644 --- a/src/kits/interface/Alert.cpp +++ b/src/kits/interface/Alert.cpp @@ -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;