Ticket #4853: mythtv-4853-StyleSetting_default-20080703.patch

File mythtv-4853-StyleSetting_default-20080703.patch, 1.4 KB (added by sphery <mtdean@…>, 12 years ago)

Updated patch.

  • programs/mythfrontend/globalsettings.cpp

     
    29192919
    29202920    void fillSelections(void) {
    29212921        clearSelections();
    2922         addSelection(QObject::tr("Desktop Style"), "");
     2922        addSelection(QObject::tr("Desktop Style"),
     2923                     "UseSystemDefaultDesktopStyle");
    29232924        QStyleFactory factory;
    29242925        QStringList list = factory.keys();
    29252926        QStringList::iterator iter = list.begin();
  • libs/libmythui/mythuihelper.cpp

     
    1111#include <QApplication>
    1212#include <QPainter>
    1313#include <QDesktopWidget>
     14#include <QStyleFactory>
    1415
    1516#include "mythdirs.h"
    1617#include "mythuihelper.h"
     
    370371
    371372    d->m_qtThemeSettings = new Settings;
    372373
    373     QString style = GetMythDB()->GetSetting("Style", "");
    374     if (style != "")
     374    QString style = GetMythDB()->GetSetting("Style",
     375                                            "UseSystemDefaultDesktopStyle");
     376    if (QStyleFactory::keys().contains(style))
    375377        qApp->setStyle(style);
    376378
    377379    QString themename = GetMythDB()->GetSetting("Theme");