Diffstat (limited to 'noncore/multimedia/opieplayer2/mediawidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/mediawidget.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/mediawidget.cpp b/noncore/multimedia/opieplayer2/mediawidget.cpp index edef2a7..46e7b6e 100644 --- a/noncore/multimedia/opieplayer2/mediawidget.cpp +++ b/noncore/multimedia/opieplayer2/mediawidget.cpp | |||
@@ -47,48 +47,49 @@ void MediaWidget::setupButtons( const SkinButtonInfo *skinInfo, uint buttonCount | |||
47 | buttonMask = skin.buttonMask( skinInfo, buttonCount ); | 47 | buttonMask = skin.buttonMask( skinInfo, buttonCount ); |
48 | 48 | ||
49 | buttons.clear(); | 49 | buttons.clear(); |
50 | buttons.reserve( buttonCount ); | 50 | buttons.reserve( buttonCount ); |
51 | 51 | ||
52 | for ( uint i = 0; i < buttonCount; ++i ) { | 52 | for ( uint i = 0; i < buttonCount; ++i ) { |
53 | Button button = setupButton( skinInfo[ i ], skin ); | 53 | Button button = setupButton( skinInfo[ i ], skin ); |
54 | buttons.push_back( button ); | 54 | buttons.push_back( button ); |
55 | } | 55 | } |
56 | } | 56 | } |
57 | 57 | ||
58 | MediaWidget::Button MediaWidget::setupButton( const SkinButtonInfo &buttonInfo, const Skin &skin ) | 58 | MediaWidget::Button MediaWidget::setupButton( const SkinButtonInfo &buttonInfo, const Skin &skin ) |
59 | { | 59 | { |
60 | Button button; | 60 | Button button; |
61 | button.command = buttonInfo.command; | 61 | button.command = buttonInfo.command; |
62 | button.type = buttonInfo.type; | 62 | button.type = buttonInfo.type; |
63 | button.mask = skin.buttonMaskImage( buttonInfo.fileName ); | 63 | button.mask = skin.buttonMaskImage( buttonInfo.fileName ); |
64 | 64 | ||
65 | return button; | 65 | return button; |
66 | } | 66 | } |
67 | 67 | ||
68 | void MediaWidget::loadDefaultSkin( const GUIInfo &guiInfo ) | 68 | void MediaWidget::loadDefaultSkin( const GUIInfo &guiInfo ) |
69 | { | 69 | { |
70 | Skin skin( guiInfo.fileNameInfix ); | 70 | Skin skin( guiInfo.fileNameInfix ); |
71 | skin.setCachable( false ); | ||
71 | loadSkin( guiInfo.buttonInfo, guiInfo.buttonCount, skin ); | 72 | loadSkin( guiInfo.buttonInfo, guiInfo.buttonCount, skin ); |
72 | } | 73 | } |
73 | 74 | ||
74 | void MediaWidget::loadSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const Skin &skin ) | 75 | void MediaWidget::loadSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const Skin &skin ) |
75 | { | 76 | { |
76 | backgroundPixmap = skin.backgroundPixmap(); | 77 | backgroundPixmap = skin.backgroundPixmap(); |
77 | buttonUpImage = skin.buttonUpImage(); | 78 | buttonUpImage = skin.buttonUpImage(); |
78 | buttonDownImage = skin.buttonDownImage(); | 79 | buttonDownImage = skin.buttonDownImage(); |
79 | 80 | ||
80 | setupButtons( skinInfo, buttonCount, skin ); | 81 | setupButtons( skinInfo, buttonCount, skin ); |
81 | } | 82 | } |
82 | 83 | ||
83 | void MediaWidget::closeEvent( QCloseEvent * ) | 84 | void MediaWidget::closeEvent( QCloseEvent * ) |
84 | { | 85 | { |
85 | mediaPlayerState.setList(); | 86 | mediaPlayerState.setList(); |
86 | } | 87 | } |
87 | 88 | ||
88 | void MediaWidget::paintEvent( QPaintEvent *pe ) | 89 | void MediaWidget::paintEvent( QPaintEvent *pe ) |
89 | { | 90 | { |
90 | QPainter p( this ); | 91 | QPainter p( this ); |
91 | 92 | ||
92 | if ( mediaPlayerState.isFullscreen() ) { | 93 | if ( mediaPlayerState.isFullscreen() ) { |
93 | // Clear the background | 94 | // Clear the background |
94 | p.setBrush( QBrush( Qt::black ) ); | 95 | p.setBrush( QBrush( Qt::black ) ); |