[haiku-commits] haiku: hrev52356 - in src/apps/haikudepot: ui_generic ui

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 18 Sep 2018 16:29:43 -0400 (EDT)

hrev52356 adds 1 changeset to branch 'master'
old head: 753e00661139fc4881b36099a9b0097d2d761edf
new head: 2ba2d603518c6d00c8de4ab00b7f39726ba5f02c
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=2ba2d603518c+%5E753e00661139

----------------------------------------------------------------------------

2ba2d603518c: 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@xxxxxxxxx>

                                  [ Kacper Kasper <kacperkasper@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev52356
Commit:      2ba2d603518c6d00c8de4ab00b7f39726ba5f02c
URL:         https://git.haiku-os.org/haiku/commit/?id=2ba2d603518c
Author:      Kacper Kasper <kacperkasper@xxxxxxxxx>
Date:        Tue Sep 18 20:10:41 2018 UTC
Committer:   waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Tue Sep 18 20:29:40 2018 UTC

----------------------------------------------------------------------------

2 files changed, 3 insertions(+), 3 deletions(-)
src/apps/haikudepot/ui/PackageListView.cpp      | 2 +-
src/apps/haikudepot/ui_generic/SharedBitmap.cpp | 4 ++--

----------------------------------------------------------------------------

diff --git a/src/apps/haikudepot/ui/PackageListView.cpp 
b/src/apps/haikudepot/ui/PackageListView.cpp
index 86f8979cb6..c75b37169f 100644
--- a/src/apps/haikudepot/ui/PackageListView.cpp
+++ b/src/apps/haikudepot/ui/PackageListView.cpp
@@ -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;
diff --git a/src/apps/haikudepot/ui_generic/SharedBitmap.cpp 
b/src/apps/haikudepot/ui_generic/SharedBitmap.cpp
index 6bc3f1a75d..58e69c6c2c 100644
--- a/src/apps/haikudepot/ui_generic/SharedBitmap.cpp
+++ b/src/apps/haikudepot/ui_generic/SharedBitmap.cpp
@@ -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) {


Other related posts:

  • » [haiku-commits] haiku: hrev52356 - in src/apps/haikudepot: ui_generic ui - waddlesplash