Diffstat (limited to 'core/multimedia/opieplayer/audiowidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/audiowidget.cpp | 11 |
1 files changed, 11 insertions, 0 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 | |||
@@ -112,39 +112,50 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : | |||
112 | if ( !qRed( imgMask.pixel( x, y ) ) ) | 112 | if ( !qRed( imgMask.pixel( x, y ) ) ) |
113 | line[x] = i + 1; | 113 | line[x] = i + 1; |
114 | } | 114 | } |
115 | } | 115 | } |
116 | 116 | ||
117 | } | 117 | } |
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 | 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 | } | ||
124 | setBackgroundPixmap( *pixBg ); | 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); |
131 | // songInfo.setFrameStyle( QFrame::WinPanel | QFrame::Sunken ); | 141 | // songInfo.setFrameStyle( QFrame::WinPanel | QFrame::Sunken ); |
132 | //NoFrame | 142 | //NoFrame |
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 ); |
145 | 156 | ||
146 | resizeEvent( NULL ); | 157 | resizeEvent( NULL ); |
147 | 158 | ||
148 | connect( &slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); | 159 | connect( &slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); |
149 | connect( &slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); | 160 | connect( &slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); |
150 | 161 | ||