OTHER: Changed default skin to Almond-blue
I don't know under which license CleanAMP is provided, and I don't want to take any risks, so I had to replace it. As the default skin is included in the binary, it might be even necessary for it to be GPL, so I choose the debranded Almond-blue skin for the time beeing. Added creator of Almond-blue to AUTHORS file Also added some magic to make it easier to add new skins through the resource system
This commit is contained in:
parent
7b5c9d2a82
commit
6dbc87ac7e
24 changed files with 110 additions and 26 deletions
|
@ -19,6 +19,8 @@
|
|||
#include <QPainter>
|
||||
#include <QSettings>
|
||||
|
||||
static const QString defaultSkin = ":/skins/Almond-blue/";
|
||||
|
||||
Skin *Skin::singleton = NULL;
|
||||
|
||||
Skin *Skin::getInstance (void)
|
||||
|
@ -36,7 +38,7 @@ Skin::Skin ()
|
|||
setPositions ();
|
||||
|
||||
QSettings settings;
|
||||
setSkin (settings.value("skin/path", ":CleanAMP/").toString ());
|
||||
setSkin (settings.value("skin/path", defaultSkin).toString ());
|
||||
}
|
||||
|
||||
|
||||
|
@ -62,7 +64,7 @@ Skin::setSkin (const QString& name)
|
|||
ParsePLEdit() &&
|
||||
BuildNumbers() &&
|
||||
BuildPlaylist () )) {
|
||||
setSkin (":CleanAMP/");
|
||||
setSkin (defaultSkin);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -19,10 +19,13 @@
|
|||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QIcon>
|
||||
#include <QImageReader>
|
||||
#include <QLabel>
|
||||
#include <QSettings>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include <QtDebug>
|
||||
|
||||
SkinChooser::SkinChooser (QWidget *parent) : QDialog (parent)
|
||||
{
|
||||
|
||||
|
@ -48,8 +51,17 @@ SkinList::SkinList (QWidget *parent) : QListWidget (parent)
|
|||
{
|
||||
setIconSize (QSize (137, 58));
|
||||
|
||||
new SkinChooserItem (QIcon (":CleanAMP/main.png"), "CleanAMP (default)",
|
||||
":CleanAMP/", this);
|
||||
new SkinChooserItem (QIcon (QIcon(Skin::getPixmap("main", ":/skins/Almond-blue"))),
|
||||
"Almond-blue (default)",
|
||||
":/skins/Almond-blue/", this);
|
||||
|
||||
foreach(QString skin, QDir(":/skins").entryList()) {
|
||||
if (skin == "Almond-blue") continue;
|
||||
QString path = ":/skins/" + skin;
|
||||
QIcon icon = QIcon(Skin::getPixmap("main", path));
|
||||
if (icon.isNull()) continue;
|
||||
new SkinChooserItem(icon, skin, path, this);
|
||||
}
|
||||
|
||||
QSettings settings;
|
||||
QStringList searchpath;
|
||||
|
|
|
@ -20,6 +20,7 @@ TARGET = promoe
|
|||
DESTDIR = $$PWD/..
|
||||
|
||||
RESOURCES += ../data/promoe.qrc
|
||||
RESOURCES += ../data/Almond-blue.qrc
|
||||
macx:RC_FILE = promoe.icns
|
||||
macx:INCLUDEPATH = /sw/include
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue