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

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

Updated patch for recent changes in trunk.

  • programs/mythfrontend/globalsettings.cpp

    old new  
    29852985
    29862986    void fillSelections(void) {
    29872987        clearSelections();
    2988         addSelection(QObject::tr("Desktop Style"), "");
     2988        addSelection(QObject::tr("Desktop Style"),
     2989                     "UseSystemDefaultDesktopStyle");
    29892990        QStyleFactory factory;
    29902991        QStringList list = factory.keys();
    29912992        QStringList::iterator iter = list.begin();
  • libs/libmythui/mythuihelper.cpp

    old new  
    1010#include <QApplication>
    1111#include <QPainter>
    1212#include <QDesktopWidget>
     13#include <QStyleFactory>
    1314
    1415#include "mythdirs.h"
    1516#include "mythuihelper.h"
     
    389390
    390391    d->m_qtThemeSettings = new Settings;
    391392
    392     QString style = GetMythDB()->GetSetting("Style", "");
    393     if (!style.isEmpty())
     393    QString style = GetMythDB()->GetSetting("Style",
     394                                            "UseSystemDefaultDesktopStyle");
     395    if (QStyleFactory::keys().contains(style))
    394396        qApp->setStyle(style);
    395397
    396398    QString themename = GetMythDB()->GetSetting("Theme");