summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.cpp10
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.h2
2 files changed, 5 insertions, 7 deletions
diff --git a/noncore/multimedia/opieplayer2/mediawidget.cpp b/noncore/multimedia/opieplayer2/mediawidget.cpp
index 6b304ec..0d1c8b6 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.cpp
+++ b/noncore/multimedia/opieplayer2/mediawidget.cpp
@@ -70,18 +70,16 @@ MediaWidget::Button MediaWidget::setupButton( const SkinButtonInfo &buttonInfo,
70void MediaWidget::loadDefaultSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const QString &fileNameInfix ) 70void MediaWidget::loadDefaultSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const QString &fileNameInfix )
71{ 71{
72 Config cfg( "OpiePlayer" ); 72 Config cfg( "OpiePlayer" );
73 cfg.setGroup( "Options" ); 73 cfg.setGroup( "Options" );
74 QString skin = cfg.readEntry( "Skin","default" ); 74 QString name = cfg.readEntry( "Skin","default" );
75 75
76 loadSkin( skinInfo, buttonCount, skin, fileNameInfix ); 76 Skin skin( name, fileNameInfix );
77 loadSkin( skinInfo, buttonCount, skin );
77} 78}
78 79
79void MediaWidget::loadSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const QString &name, const QString &fileNameInfix ) 80void MediaWidget::loadSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const Skin &skin )
80{ 81{
81 Skin skin( name, fileNameInfix );
82
83 QString skinPath = "opieplayer2/skins/" + name;
84 backgroundPixmap = skin.backgroundImage(); 82 backgroundPixmap = skin.backgroundImage();
85 buttonUpImage = skin.buttonUpImage(); 83 buttonUpImage = skin.buttonUpImage();
86 buttonDownImage = skin.buttonDownImage(); 84 buttonDownImage = skin.buttonDownImage();
87 85
diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h
index 0fe4772..9f13677 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.h
+++ b/noncore/multimedia/opieplayer2/mediawidget.h
@@ -105,9 +105,9 @@ protected:
105 const Skin &skin ); 105 const Skin &skin );
106 Button setupButton( const SkinButtonInfo &buttonInfo, const Skin &skin ); 106 Button setupButton( const SkinButtonInfo &buttonInfo, const Skin &skin );
107 107
108 void loadDefaultSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const QString &fileNameInfix = QString::null ); 108 void loadDefaultSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const QString &fileNameInfix = QString::null );
109 void loadSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const QString &name, const QString &fileNameInfix ); 109 void loadSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const Skin &skin );
110 110
111 virtual void closeEvent( QCloseEvent * ); 111 virtual void closeEvent( QCloseEvent * );
112 112
113 virtual void paintEvent( QPaintEvent *pe ); 113 virtual void paintEvent( QPaintEvent *pe );