VirtualBox

Changeset 23431 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Sep 30, 2009 10:31:04 AM (15 years ago)
Author:
vboxsync
Message:

Branding: fix showing of the branding about image

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxAboutDlg.cpp

    r23425 r23431  
    2424#include "VBoxGlobal.h"
    2525
     26#include <iprt/path.h>
     27
    2628/* Qt includes */
    2729#include <QDir>
     
    3638    retranslateUi();
    3739
     40    QString sPath (":/about.png");
    3841    /* Branding: Use a custom about splash picture if set */
    39     QString sSplash = vboxGlobal().brandingGetKey("UI/AboutSplash");
    40     QDir pathImage(sSplash);
     42    QString sSplash = vboxGlobal().brandingGetKey ("UI/AboutSplash");
    4143    if (vboxGlobal().brandingIsActive() && !sSplash.isEmpty())
    42         mBgImage.load(pathImage.absolutePath());
    43     else /* ... or load the built-in picture */
    44         mBgImage.load(":/about.png");
     44    {
     45        char szExecPath[PATH_MAX];
     46        RTPathExecDir (szExecPath, PATH_MAX);
     47        QString tmpPath = QString ("%1/%2").arg (szExecPath).arg (sSplash);
     48        if (QFile::exists (tmpPath))
     49            sPath = tmpPath;
     50    }
     51
     52    mBgImage.load (sPath);
    4553}
    4654
     
    7684    painter.setFont (font());
    7785
    78     /* Branding: Set a different text color (because splash also could be white), 
     86    /* Branding: Set a different text color (because splash also could be white),
    7987                 otherwise use white as default color */
    8088    QString sColor = vboxGlobal().brandingGetKey("UI/AboutTextColor");
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