Revert "HaikuDepot: don't scale bitmaps"
This reverts commit 2ba2d60351.
...and properly fix the scaling issue.
Change-Id: I2c7ef833c1ff592dd95ea7d83d3f7beced42f209
Reviewed-on: https://review.haiku-os.org/589
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
106ae4ec35
commit
42b6e5279f
@@ -332,7 +332,7 @@ PackageColumn::DrawField(BField* field, BRect rect, BView* parent)
|
|||||||
const BBitmap* bitmap = bitmapField->Bitmap();
|
const BBitmap* bitmap = bitmapField->Bitmap();
|
||||||
|
|
||||||
// Scale the bitmap to 16x16
|
// Scale the bitmap to 16x16
|
||||||
BRect r = BRect(0, 0, 16, 16);
|
BRect r = BRect(0, 0, 15, 15);
|
||||||
|
|
||||||
// figure out the placement
|
// figure out the placement
|
||||||
float x = 0.0;
|
float x = 0.0;
|
||||||
@@ -365,7 +365,7 @@ PackageColumn::DrawField(BField* field, BRect rect, BView* parent)
|
|||||||
// draw the bitmap
|
// draw the bitmap
|
||||||
if (bitmap != NULL) {
|
if (bitmap != NULL) {
|
||||||
parent->SetDrawingMode(B_OP_ALPHA);
|
parent->SetDrawingMode(B_OP_ALPHA);
|
||||||
BRect viewRect(x, y, x + 16, y + 16);
|
BRect viewRect(x, y, x + 15, y + 15);
|
||||||
parent->DrawBitmap(bitmap, bitmap->Bounds(), viewRect);
|
parent->DrawBitmap(bitmap, bitmap->Bounds(), viewRect);
|
||||||
parent->SetDrawingMode(B_OP_OVER);
|
parent->SetDrawingMode(B_OP_OVER);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ SharedBitmap::_CreateBitmapFromMimeType(int32 size) const
|
|||||||
if (status != B_OK)
|
if (status != B_OK)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
BBitmap* bitmap = new BBitmap(BRect(0, 0, size, size), 0, B_RGBA32);
|
BBitmap* bitmap = new BBitmap(BRect(0, 0, size - 1, size - 1), 0, B_RGBA32);
|
||||||
status = bitmap->InitCheck();
|
status = bitmap->InitCheck();
|
||||||
if (status == B_OK)
|
if (status == B_OK)
|
||||||
status = mimeType.GetIcon(bitmap, B_MINI_ICON);
|
status = mimeType.GetIcon(bitmap, B_MINI_ICON);
|
||||||
@@ -267,7 +267,7 @@ BBitmap*
|
|||||||
SharedBitmap::_LoadIconFromBuffer(const void* data, size_t dataSize,
|
SharedBitmap::_LoadIconFromBuffer(const void* data, size_t dataSize,
|
||||||
int32 size) const
|
int32 size) const
|
||||||
{
|
{
|
||||||
BBitmap* bitmap = new BBitmap(BRect(0, 0, size, size), 0,
|
BBitmap* bitmap = new BBitmap(BRect(0, 0, size - 1, size - 1), 0,
|
||||||
B_RGBA32);
|
B_RGBA32);
|
||||||
status_t status = bitmap->InitCheck();
|
status_t status = bitmap->InitCheck();
|
||||||
if (status == B_OK) {
|
if (status == B_OK) {
|
||||||
|
|||||||
Reference in New Issue
Block a user