aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2008-02-16 14:27:52 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2008-02-16 14:27:52 +0000
commit3f1e40c12c484eca214e1cbc988f308eeae8b1c7 (patch)
tree6955a604504a763c20d28297637db258bd28d5ef /src
parent743106083092d3cdfad526de825215ace68f5267 (diff)
downloadqmmp-3f1e40c12c484eca214e1cbc988f308eeae8b1c7.tar.gz
qmmp-3f1e40c12c484eca214e1cbc988f308eeae8b1c7.tar.bz2
qmmp-3f1e40c12c484eca214e1cbc988f308eeae8b1c7.zip
some font and color fixes
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@243 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src')
-rw-r--r--src/ui/listwidget.cpp4
-rw-r--r--src/ui/skin.cpp37
-rw-r--r--src/ui/skin.h6
-rw-r--r--src/ui/textscroller.cpp8
4 files changed, 9 insertions, 46 deletions
diff --git a/src/ui/listwidget.cpp b/src/ui/listwidget.cpp
index fb2173b33..4087c7831 100644
--- a/src/ui/listwidget.cpp
+++ b/src/ui/listwidget.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2006 by Ilya Kotov *
+ * Copyright (C) 2006-2008 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -65,8 +65,6 @@ void ListWidget::readSettings()
{
QSettings settings(QDir::homePath()+"/.qmmp/qmmprc", QSettings::IniFormat);
QString fontname = settings.value("PlayList/Font","").toString();
- if (fontname.isEmpty ())
- fontname = QFont("Helvetica [Cronyx]", 10).toString();
m_font.fromString(fontname);
if (m_update)
diff --git a/src/ui/skin.cpp b/src/ui/skin.cpp
index b7f787ad4..9faceee47 100644
--- a/src/ui/skin.cpp
+++ b/src/ui/skin.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2007 by Ilya Kotov *
+ * Copyright (C) 2007-2008 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -102,8 +102,6 @@ void Skin::setSkin ( const QString& path )
loadVolume();
loadBalance();
loadRegion();
- loadColors();
-
emit skinChanged();
}
@@ -334,7 +332,10 @@ void Skin::loadPLEdit()
break;
}
}
-
+ if(!m_pledit_txt.keys().contains("mbbg"))
+ m_pledit_txt["mbbg"] = m_pledit_txt["normalbg"];
+ if(!m_pledit_txt.keys().contains("mbfg"))
+ m_pledit_txt["mbfg"] = m_pledit_txt["normal"];
}
void Skin::loadEqMain()
@@ -741,31 +742,3 @@ QPixmap * Skin::getDummyPixmap(const QString& name)
qFatal("Skin:: default skin corrupted");
return 0;
}
-
-void Skin::loadColors()
-{
- //extract color from image
- QPixmap pix = m_letters['*'];
- QImage img = pix.toImage();
- img = img.convertToFormat(QImage::Format_Indexed8);
-
- QPixmap pix2 = m_letters[' '];
- QImage img2 = pix2.toImage();
- img2 = img2.convertToFormat(QImage::Format_Indexed8);
- QVector<QRgb> c1 = img.colorTable ();
- QVector<QRgb> c2 = img2.colorTable ();
- //qDebug("%d -- %d", img.numColors (), img2.numColors ());
- QColor color;
- color.setNamedColor(getPLValue("normal"));
-
- for (int i = 0; i < c1.size(); ++i)
- {
- if (c2.indexOf(c1[i]) == -1)
- {
- if(img.numColors () == img2.numColors () + 1)
- color = QColor(c1[i]);
- break;
- }
- }
- m_scroller_color = color;
-}
diff --git a/src/ui/skin.h b/src/ui/skin.h
index d981c4613..1de3f6672 100644
--- a/src/ui/skin.h
+++ b/src/ui/skin.h
@@ -123,10 +123,6 @@ public:
{
return m_plRegion;
};
- const QColor scrollerTextColor() const
- {
- return m_scroller_color;
- };
enum Buttons
{
@@ -304,7 +300,6 @@ private:
QMap<uint, QPixmap> m_parts;
QMap<QChar, QPixmap> m_letters;
QMap<QByteArray, QByteArray> m_pledit_txt;
- QColor m_scroller_color;
QPixmap m_main;
QPixmap posbar;
QList<QPixmap> m_numbers;
@@ -332,7 +327,6 @@ private:
void loadVolume();
void loadBalance();
void loadRegion();
- void loadColors();
QRegion createRegion(const QString &path, const QString &key);
};
diff --git a/src/ui/textscroller.cpp b/src/ui/textscroller.cpp
index 35e4ed4eb..4f3e3be80 100644
--- a/src/ui/textscroller.cpp
+++ b/src/ui/textscroller.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2006 by Ilya Kotov *
+ * Copyright (C) 2006-2008 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -38,7 +38,7 @@ TextScroller::TextScroller ( QWidget *parent )
{
pointer = this;
m_skin = Skin::getPointer();
- m_pixmap = QPixmap ( 154,15 );
+ m_pixmap = QPixmap ( 150,15 );
x = 0;
m_text = "Qt-based Multimedia Player (Qmmp " + QString(QMMP_STR_VERSION) + ")";
m_update = FALSE;
@@ -82,15 +82,13 @@ void TextScroller::setText(const QString& text)
void TextScroller::updateSkin()
{
- m_color.setNamedColor(m_skin->getPLValue("normal"));
+ m_color.setNamedColor(m_skin->getPLValue("mbfg"));
}
void TextScroller::readSettings()
{
QSettings settings(QDir::homePath()+"/.qmmp/qmmprc", QSettings::IniFormat);
QString fontname = settings.value("MainWindow/Font","").toString();
- if (fontname.isEmpty ())
- fontname = QFont("Helvetica [Cronyx]", 9).toString();
m_font.fromString(fontname);
if (m_update)