VirtualBox

Changeset 2412 in vbox for trunk/src


Ignore:
Timestamp:
Apr 28, 2007 6:49:40 PM (18 years ago)
Author:
vboxsync
Message:

Some more messing about with the dock.

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/VBoxUI.pro

    r2411 r2412  
    242242        images/welcome.png \
    243243        images/about_600px.png \
     244        images/dock_0.png \
     245        images/dock_1.png \
    244246    images/dock_128x128_transparent.png
    245247
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleWnd.h

    r2411 r2412  
    277277    CGImageRef dockImgStateSaving;
    278278    CGImageRef dockImgStateRestoring;
     279    CGImageRef dockImgBack75x75;
     280    CGImageRef dockImgBack100x75;
     281    CGImageRef dockImgOS;
    279282#endif
    280283};
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp

    r2411 r2412  
    161161    , dockImgStateSaving (NULL)
    162162    , dockImgStateRestoring (NULL)
     163    , dockImgBack75x75 (NULL)
     164    , dockImgBack100x75 (NULL)
     165    , dockImgOS (NULL)
    163166#endif
    164167{
     
    530533    dockImgStateSaving    = ::DarwinCreateDockBadge ("state_saving_16px.png");
    531534    dockImgStateRestoring = ::DarwinCreateDockBadge ("state_restoring_16px.png");
     535    dockImgBack75x75      = ::DarwinCreateDockBadge ("dock_0.png");
     536    dockImgBack100x75     = ::DarwinCreateDockBadge ("dock_1.png");
     537    SetApplicationDockTileImage (dockImgOS);
    532538    OverlayApplicationDockTileImage (dockImgStateRunning);
    533539#endif
     
    548554    if (dockImgStateRestoring)
    549555        CGImageRelease (dockImgStateRestoring);
     556    if (dockImgBack75x75)
     557        CGImageRelease (dockImgBack75x75);
     558    if (dockImgBack100x75)
     559        CGImageRelease (dockImgBack100x75);
     560    if (dockImgOS)
     561        CGImageRelease (dockImgOS);
    550562#endif
    551563}
     
    714726    connect (console, SIGNAL (machineStateChanged (CEnums::MachineState)),
    715727             this, SLOT (updateMachineState (CEnums::MachineState)));
     728
     729#ifdef Q_WS_MAC
     730    QString osType = cmachine.GetOSType().GetId();
     731# if 0
     732    QImage osImg75x75 = vboxGlobal().vmGuestOSTypeIcon (osType).convertToImage().smoothScale (75, 75);
     733    QImage osImg = QImage::fromMimeSource ("dock_0.png");
     734    bitBlt (&osImg, 25, 22,
     735            &osImg75x75, 0, 0,
     736            75, 75, /* conversion_flags */ 0);
     737# else
     738    QImage osImg100x75 = vboxGlobal().vmGuestOSTypeIcon (osType).convertToImage().smoothScale (100, 75);
     739    QImage osImg = QImage::fromMimeSource ("dock_1.png");
     740    bitBlt (&osImg, 14, 22,
     741            &osImg100x75, 0, 0,
     742            100, 75, /* conversion_flags */ 0);
     743# endif
     744    if (dockImgOS)
     745        CGImageRelease (dockImgOS);
     746    dockImgOS = ::DarwinQImageToCGImage (&osImg);
     747#endif
    716748
    717749    /* set the correct initial machine_state value */
     
    15371569        else
    15381570            img = NULL;
    1539         RestoreApplicationDockTileImage();
     1571        SetApplicationDockTileImage (dockImgOS);
    15401572        if (img)
    15411573            OverlayApplicationDockTileImage (img);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette