Ticket #1697: ShutdownProcess.diff

File ShutdownProcess.diff, 1.7 KB (added by aldeck, 16 years ago)

patch

  • src/servers/registrar/ShutdownProcess.cpp

     
    6161// the shutdown window before closing it automatically.
    6262static const bigtime_t kDisplayAbortingAppTimeout = 3000000; // 3 s
    6363
     64static const int kStripeWidth = 30;
     65static const int kIconVSpacing = 6;
     66static const int kIconSize = 32;
    6467
    6568// message what fields (must not clobber the registrar's message namespace)
    6669enum {
     
    248251        // create the views
    249252
    250253        // root view
    251         fRootView = new(nothrow) TAlertView(BRect(0, 0, 100,  15), "app icons",
     254        fRootView = new(nothrow) TAlertView(BRect(0, 0, 10,  10), "app icons",
    252255            B_FOLLOW_NONE, 0);
    253256        if (!fRootView)
    254257            return B_NO_MEMORY;
     
    351354        fTextView->SetText("two\nlines");
    352355        int textHeight = (int)fTextView->TextHeight(0, 1) + 1;
    353356
    354         int rightPartX = fRootView->Frame().IntegerWidth()
    355             + 1;
     357        int rightPartX = kStripeWidth + kIconSize / 2   + 1;
    356358        int textX = rightPartX + kInnerHSpacing;
    357359        int textY = kVSpacing;
    358360        int buttonsY = textY + textHeight + kInnerVSpacing;
     
    533535        virtual void Draw(BRect updateRect)
    534536        {
    535537            BRect stripeRect = Bounds();
    536             stripeRect.right = 30;
     538            stripeRect.right = kStripeWidth;
    537539            SetHighColor(tint_color(ViewColor(), B_DARKEN_1_TINT));
    538540            FillRect(stripeRect);
    539541           
     
    544546                } else
    545547                    SetDrawingMode(B_OP_OVER);
    546548               
    547                 DrawBitmapAsync(fAppInfo->largeIcon, BPoint(18, 6));
     549                DrawBitmapAsync(fAppInfo->largeIcon, BPoint(kStripeWidth - kIconSize / 2, kIconVSpacing));
    548550            }
    549551        }
    550552