Ticket #13222: tracker.patch

File tracker.patch, 2.2 KB (added by diver, 7 years ago)

proof of concept patch

  • src/kits/tracker/IconMenuItem.cpp

    diff --git a/src/kits/tracker/IconMenuItem.cpp b/src/kits/tracker/IconMenuItem.cpp
    index 03dcee79dc..27a2c3c27e 100644
    a b ModelMenuItem::DrawContent()  
    126126{
    127127    if (fDrawText) {
    128128        BPoint drawPoint(ContentLocation());
    129         drawPoint.x += 20 + (fExtraPad ? 6 : 0);
     129        drawPoint.x += 36 + (fExtraPad ? 6 : 0);
    130130        if (fHeightDelta > 0)
    131131            drawPoint.y += ceil(fHeightDelta / 2);
    132132        Menu()->MovePenTo(drawPoint);
    ModelMenuItem::DrawIcon()  
    164164    // draw small icon, synchronously
    165165    if (IsEnabled()) {
    166166        IconCache::sIconCache->Draw(fModel.ResolveIfLink(), Menu(), where,
    167             kNormalIcon, B_MINI_ICON);
     167            kNormalIcon, B_LARGE_ICON);
    168168    } else {
    169169        // dimmed, for now use a special blitter; icon cache should
    170170        // know how to blit one eventually
    171171        IconCache::sIconCache->SyncDraw(fModel.ResolveIfLink(), Menu(), where,
    172             kNormalIcon, B_MINI_ICON, DimmedIconBlitter);
     172            kNormalIcon, B_LARGE_ICON, DimmedIconBlitter);
    173173    }
    174174
    175175    Menu()->PopState();
    void  
    180180ModelMenuItem::GetContentSize(float* width, float* height)
    181181{
    182182    _inherited::GetContentSize(width, height);
    183     fHeightDelta = 16 - *height;
    184     if (*height < 16)
    185         *height = 16;
     183    fHeightDelta = 32 - *height;
     184    if (*height < 32)
     185        *height = 32;
    186186    *width = *width + 20 + (fExtraPad ? 18 : 0);
    187187}
    188188
    IconMenuItem::IconMenuItem(const char* label, BMessage* message,  
    281281        fDeviceIcon = new BBitmap(BRect(0, 0, which - 1, which - 1),
    282282            kDefaultIconDepth);
    283283
    284         if (nodeInfo->GetTrackerIcon(fDeviceIcon, B_MINI_ICON) != B_OK) {
     284        if (nodeInfo->GetTrackerIcon(fDeviceIcon, B_LARGE_ICON) != B_OK) {
    285285            delete fDeviceIcon;
    286286            fDeviceIcon = NULL;
    287287        }
    IconMenuItem::IconMenuItem(BMessage* data)  
    352352    PositionPassingMenuItem(data),
    353353    fDeviceIcon(NULL),
    354354    fHeightDelta(0),
    355     fWhich(B_MINI_ICON)
     355    fWhich(B_LARGE_ICON)
    356356{
    357357    if (data != NULL) {
    358         fWhich = (icon_size)data->GetInt32("_which", B_MINI_ICON);
     358        fWhich = (icon_size)data->GetInt32("_which", B_LARGE_ICON);
    359359
    360360        fDeviceIcon = new BBitmap(BRect(0, 0, fWhich - 1, fWhich - 1),
    361361            kDefaultIconDepth);