BIconButton: Use BControlLook::ComposeIconSize().

This isn't perfect as the margins are not yet scaled,
but at least the toolbar buttons in WebPositive now
change with the font size.
This commit is contained in:
Augustin Cavalier
2022-08-25 17:10:59 -04:00
parent 7b3d134fae
commit 4e2c07efa4
+2 -1
View File
@@ -310,7 +310,8 @@ BIconButton::SetIcon(int32 resourceID)
const void* data = resources.LoadResource(B_VECTOR_ICON_TYPE, resourceID,
&size);
if (data != NULL) {
BBitmap bitmap(BRect(0, 0, 31, 31), B_BITMAP_NO_SERVER_LINK, B_RGBA32);
BBitmap bitmap(BRect(BPoint(0, 0), be_control_look->ComposeIconSize(32)),
B_BITMAP_NO_SERVER_LINK, B_RGBA32);
status = bitmap.InitCheck();
if (status != B_OK)
return status;