author | llornkcor <llornkcor> | 2002-07-28 15:18:09 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-07-28 15:18:09 (UTC) |
commit | e87f032ca687227532187667d06b1de899b6bb8c (patch) (unidiff) | |
tree | 63f5e4a81e7e15c1df2af30864313b17ce7abcdc | |
parent | 414f7334dc8daa69c616961f6857ba972af3cd1c (diff) | |
download | opie-e87f032ca687227532187667d06b1de899b6bb8c.zip opie-e87f032ca687227532187667d06b1de899b6bb8c.tar.gz opie-e87f032ca687227532187667d06b1de899b6bb8c.tar.bz2 |
changed skins pics dir to opieplayer
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 9f384cc..31687b9 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp | |||
@@ -84,49 +84,49 @@ const char *skin_mask_file_names[11] = { | |||
84 | "down", "loop", "playlist", "forward", "back" | 84 | "down", "loop", "playlist", "forward", "back" |
85 | }; | 85 | }; |
86 | 86 | ||
87 | 87 | ||
88 | static void changeTextColor( QWidget *w ) { | 88 | static void changeTextColor( QWidget *w ) { |
89 | QPalette p = w->palette(); | 89 | QPalette p = w->palette(); |
90 | p.setBrush( QColorGroup::Background, QColor( 167, 212, 167 ) ); | 90 | p.setBrush( QColorGroup::Background, QColor( 167, 212, 167 ) ); |
91 | p.setBrush( QColorGroup::Base, QColor( 167, 212, 167 ) ); | 91 | p.setBrush( QColorGroup::Base, QColor( 167, 212, 167 ) ); |
92 | w->setPalette( p ); | 92 | w->setPalette( p ); |
93 | } | 93 | } |
94 | 94 | ||
95 | static const int numButtons = (sizeof(audioButtons)/sizeof(MediaButton)); | 95 | static const int numButtons = (sizeof(audioButtons)/sizeof(MediaButton)); |
96 | 96 | ||
97 | 97 | ||
98 | AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : | 98 | AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : |
99 | QWidget( parent, name, f ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ) | 99 | QWidget( parent, name, f ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ) |
100 | setCaption( tr("OpiePlayer") ); | 100 | setCaption( tr("OpiePlayer") ); |
101 | 101 | ||
102 | Config cfg("OpiePlayer"); | 102 | Config cfg("OpiePlayer"); |
103 | cfg.setGroup("AudioWidget"); | 103 | cfg.setGroup("AudioWidget"); |
104 | skin = cfg.readEntry("Skin","default"); | 104 | skin = cfg.readEntry("Skin","default"); |
105 | //skin = "scaleTest"; | 105 | //skin = "scaleTest"; |
106 | // color of background, frame, degree of transparency | 106 | // color of background, frame, degree of transparency |
107 | 107 | ||
108 | QString skinPath = "mediaplayer/skins/" + skin; | 108 | QString skinPath = "opieplayer/skins/" + skin; |
109 | pixBg = new QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); | 109 | pixBg = new QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); |
110 | imgUp = new QImage( Resource::loadImage( QString("%1/skin_up").arg(skinPath) ) ); | 110 | imgUp = new QImage( Resource::loadImage( QString("%1/skin_up").arg(skinPath) ) ); |
111 | imgDn = new QImage( Resource::loadImage( QString("%1/skin_down").arg(skinPath) ) ); | 111 | imgDn = new QImage( Resource::loadImage( QString("%1/skin_down").arg(skinPath) ) ); |
112 | 112 | ||
113 | imgButtonMask = new QImage( imgUp->width(), imgUp->height(), 8, 255 ); | 113 | imgButtonMask = new QImage( imgUp->width(), imgUp->height(), 8, 255 ); |
114 | imgButtonMask->fill( 0 ); | 114 | imgButtonMask->fill( 0 ); |
115 | 115 | ||
116 | for ( int i = 0; i < 11; i++ ) { | 116 | for ( int i = 0; i < 11; i++ ) { |
117 | QString filename = QString(getenv("OPIEDIR")) + "/pics/" + skinPath + "/skin_mask_" + skin_mask_file_names[i] + ".png"; | 117 | QString filename = QString(getenv("OPIEDIR")) + "/pics/" + skinPath + "/skin_mask_" + skin_mask_file_names[i] + ".png"; |
118 | masks[i] = new QBitmap( filename ); | 118 | masks[i] = new QBitmap( filename ); |
119 | 119 | ||
120 | if ( !masks[i]->isNull() ) { | 120 | if ( !masks[i]->isNull() ) { |
121 | QImage imgMask = masks[i]->convertToImage(); | 121 | QImage imgMask = masks[i]->convertToImage(); |
122 | uchar **dest = imgButtonMask->jumpTable(); | 122 | uchar **dest = imgButtonMask->jumpTable(); |
123 | for ( int y = 0; y < imgUp->height(); y++ ) { | 123 | for ( int y = 0; y < imgUp->height(); y++ ) { |
124 | uchar *line = dest[y]; | 124 | uchar *line = dest[y]; |
125 | for ( int x = 0; x < imgUp->width(); x++ ) | 125 | for ( int x = 0; x < imgUp->width(); x++ ) |
126 | if ( !qRed( imgMask.pixel( x, y ) ) ) | 126 | if ( !qRed( imgMask.pixel( x, y ) ) ) |
127 | line[x] = i + 1; | 127 | line[x] = i + 1; |
128 | } | 128 | } |
129 | } | 129 | } |
130 | 130 | ||
131 | } | 131 | } |
132 | 132 | ||