Diffstat (limited to 'core/multimedia/opieplayer/audiowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/audiowidget.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/core/multimedia/opieplayer/audiowidget.cpp b/core/multimedia/opieplayer/audiowidget.cpp index b187cb4..44fbe48 100644 --- a/core/multimedia/opieplayer/audiowidget.cpp +++ b/core/multimedia/opieplayer/audiowidget.cpp | |||
@@ -118,13 +118,23 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : | |||
118 | 118 | ||
119 | for ( int i = 0; i < 11; i++ ) { | 119 | for ( int i = 0; i < 11; i++ ) { |
120 | buttonPixUp[i] = NULL; | 120 | buttonPixUp[i] = NULL; |
121 | buttonPixDown[i] = NULL; | 121 | buttonPixDown[i] = NULL; |
122 | } | 122 | } |
123 | 123 | ||
124 | setBackgroundPixmap( *pixBg ); | 124 | QWidget *d = QApplication::desktop(); |
125 | int width = d->width(); | ||
126 | int height = d->height(); | ||
127 | |||
128 | if( (width != pixBg->width() ) || (height != pixBg->height() ) ) { | ||
129 | // qDebug("<<<<<<<< scale image >>>>>>>>>>>>"); | ||
130 | QImage img; | ||
131 | img = pixBg->convertToImage(); | ||
132 | pixBg->convertFromImage( img.smoothScale( width, height)); | ||
133 | } | ||
134 | setBackgroundPixmap( *pixBg); | ||
125 | 135 | ||
126 | songInfo.setFocusPolicy( QWidget::NoFocus ); | 136 | songInfo.setFocusPolicy( QWidget::NoFocus ); |
127 | 137 | ||
128 | // changeTextColor( &songInfo ); | 138 | // changeTextColor( &songInfo ); |
129 | // songInfo.setBackgroundColor( QColor( 167, 212, 167 )); | 139 | // songInfo.setBackgroundColor( QColor( 167, 212, 167 )); |
130 | // songInfo.setFrameStyle( QFrame::NoFrame); | 140 | // songInfo.setFrameStyle( QFrame::NoFrame); |
@@ -133,12 +143,13 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : | |||
133 | // songInfo.setForegroundColor(Qt::white); | 143 | // songInfo.setForegroundColor(Qt::white); |
134 | 144 | ||
135 | slider.setFixedHeight( 20 ); | 145 | slider.setFixedHeight( 20 ); |
136 | slider.setMinValue( 0 ); | 146 | slider.setMinValue( 0 ); |
137 | slider.setMaxValue( 1 ); | 147 | slider.setMaxValue( 1 ); |
138 | slider.setFocusPolicy( QWidget::NoFocus ); | 148 | slider.setFocusPolicy( QWidget::NoFocus ); |
149 | |||
139 | slider.setBackgroundPixmap( *pixBg ); | 150 | slider.setBackgroundPixmap( *pixBg ); |
140 | 151 | ||
141 | time.setFocusPolicy( QWidget::NoFocus ); | 152 | time.setFocusPolicy( QWidget::NoFocus ); |
142 | time.setAlignment( Qt::AlignCenter ); | 153 | time.setAlignment( Qt::AlignCenter ); |
143 | time.setFrame(FALSE); | 154 | time.setFrame(FALSE); |
144 | changeTextColor( &time ); | 155 | changeTextColor( &time ); |