From 4e2c07efa430fb26928e5f07f6affdfbf550a1b3 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Thu, 25 Aug 2022 17:10:59 -0400 Subject: [PATCH] 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. --- src/kits/shared/IconButton.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/kits/shared/IconButton.cpp b/src/kits/shared/IconButton.cpp index bcfb58a4f7..005953ae05 100644 --- a/src/kits/shared/IconButton.cpp +++ b/src/kits/shared/IconButton.cpp @@ -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;