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:
@@ -310,7 +310,8 @@ BIconButton::SetIcon(int32 resourceID)
|
|||||||
const void* data = resources.LoadResource(B_VECTOR_ICON_TYPE, resourceID,
|
const void* data = resources.LoadResource(B_VECTOR_ICON_TYPE, resourceID,
|
||||||
&size);
|
&size);
|
||||||
if (data != NULL) {
|
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();
|
status = bitmap.InitCheck();
|
||||||
if (status != B_OK)
|
if (status != B_OK)
|
||||||
return status;
|
return status;
|
||||||
|
|||||||
Reference in New Issue
Block a user