HaikuDepot: don't scale bitmaps
* There was an off-by-one error in initialization code; BRect(0, 0, 15, 15) does not create 16x16 bitmap - it is 15x15. As a result vector icons were rendered at 15x15 and then scaled to 16x16. Change-Id: If1b57148e5a887a4bf71e01606d3d0d6fd0ed149 Reviewed-on: https://review.haiku-os.org/585 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
parent
753e006611
commit
2ba2d60351
@ -332,7 +332,7 @@ PackageColumn::DrawField(BField* field, BRect rect, BView* parent)
|
||||
const BBitmap* bitmap = bitmapField->Bitmap();
|
||||
|
||||
// Scale the bitmap to 16x16
|
||||
BRect r = BRect(0, 0, 15, 15);
|
||||
BRect r = BRect(0, 0, 16, 16);
|
||||
|
||||
// figure out the placement
|
||||
float x = 0.0;
|
||||
|
@ -204,7 +204,7 @@ SharedBitmap::_CreateBitmapFromMimeType(int32 size) const
|
||||
if (status != B_OK)
|
||||
return NULL;
|
||||
|
||||
BBitmap* bitmap = new BBitmap(BRect(0, 0, size - 1, size - 1), 0, B_RGBA32);
|
||||
BBitmap* bitmap = new BBitmap(BRect(0, 0, size, size), 0, B_RGBA32);
|
||||
status = bitmap->InitCheck();
|
||||
if (status == B_OK)
|
||||
status = mimeType.GetIcon(bitmap, B_MINI_ICON);
|
||||
@ -267,7 +267,7 @@ BBitmap*
|
||||
SharedBitmap::_LoadIconFromBuffer(const void* data, size_t dataSize,
|
||||
int32 size) const
|
||||
{
|
||||
BBitmap* bitmap = new BBitmap(BRect(0, 0, size - 1, size - 1), 0,
|
||||
BBitmap* bitmap = new BBitmap(BRect(0, 0, size, size), 0,
|
||||
B_RGBA32);
|
||||
status_t status = bitmap->InitCheck();
|
||||
if (status == B_OK) {
|
||||
|
Loading…
Reference in New Issue
Block a user