-rw-r--r-- | noncore/applets/volumeapplet2/volumeapplet.cpp | 3 | ||||
-rw-r--r-- | noncore/applets/volumeapplet2/volumeapplet.h | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/noncore/applets/volumeapplet2/volumeapplet.cpp b/noncore/applets/volumeapplet2/volumeapplet.cpp index 946616f..fad8e42 100644 --- a/noncore/applets/volumeapplet2/volumeapplet.cpp +++ b/noncore/applets/volumeapplet2/volumeapplet.cpp | |||
@@ -132,49 +132,50 @@ void VolumeAppletControl::showEvent( QShowEvent* e ) | |||
132 | odebug << "showEvent" << oendl; | 132 | odebug << "showEvent" << oendl; |
133 | QWidget::showEvent( e ); | 133 | QWidget::showEvent( e ); |
134 | } | 134 | } |
135 | 135 | ||
136 | 136 | ||
137 | void VolumeAppletControl::hideEvent( QHideEvent* e ) | 137 | void VolumeAppletControl::hideEvent( QHideEvent* e ) |
138 | { | 138 | { |
139 | odebug << "hideEvent" << oendl; | 139 | odebug << "hideEvent" << oendl; |
140 | QWidget::hideEvent( e ); | 140 | QWidget::hideEvent( e ); |
141 | } | 141 | } |
142 | 142 | ||
143 | 143 | ||
144 | QSize VolumeAppletControl::sizeHint() const | 144 | QSize VolumeAppletControl::sizeHint() const |
145 | { | 145 | { |
146 | int wd = QPEApplication::desktop()->width(); | 146 | int wd = QPEApplication::desktop()->width(); |
147 | return QSize( wd, 200 ); //QFrame::sizeHint(); | 147 | return QSize( wd, 200 ); //QFrame::sizeHint(); |
148 | } | 148 | } |
149 | 149 | ||
150 | 150 | ||
151 | VolumeApplet::VolumeApplet( QWidget *parent, const char *name ) | 151 | VolumeApplet::VolumeApplet( QWidget *parent, const char *name ) |
152 | :OTaskbarApplet( parent, name ) | 152 | :OTaskbarApplet( parent, name ) |
153 | { | 153 | { |
154 | setFixedHeight( AppLnk::smallIconSize() +4); | 154 | setFixedHeight( AppLnk::smallIconSize() +4); |
155 | setFixedWidth( AppLnk::smallIconSize() ); | 155 | setFixedWidth( AppLnk::smallIconSize() ); |
156 | _pixmap = new QPixmap (Opie::Core::OResource::loadPixmap( "volume", Opie::Core::OResource::SmallIcon )); | 156 | _pixmap = Opie::Core::OResource::loadPixmap( "volume", Opie::Core::OResource::SmallIcon ); |
157 | // _pixmap = new QPixmap (Opie::Core::OResource::loadPixmap( "volume", Opie::Core::OResource::SmallIcon )); | ||
157 | _control = new VolumeAppletControl( this, "control" ); | 158 | _control = new VolumeAppletControl( this, "control" ); |
158 | } | 159 | } |
159 | 160 | ||
160 | 161 | ||
161 | VolumeApplet::~VolumeApplet() | 162 | VolumeApplet::~VolumeApplet() |
162 | { | 163 | { |
163 | } | 164 | } |
164 | 165 | ||
165 | 166 | ||
166 | int VolumeApplet::position() | 167 | int VolumeApplet::position() |
167 | { | 168 | { |
168 | return 4; | 169 | return 4; |
169 | } | 170 | } |
170 | 171 | ||
171 | 172 | ||
172 | void VolumeApplet::paintEvent( QPaintEvent* ) | 173 | void VolumeApplet::paintEvent( QPaintEvent* ) |
173 | { | 174 | { |
174 | QPainter p(this); | 175 | QPainter p(this); |
175 | p.drawPixmap(0, 2, _pixmap ); | 176 | p.drawPixmap(0, 2, _pixmap ); |
176 | 177 | ||
177 | /* | 178 | /* |
178 | p. drawPixmap ( (width()- _pixmap->width())/2, QMAX( (height()-4-_pixmap->height() )/2, 1), *_pixmap ); | 179 | p. drawPixmap ( (width()- _pixmap->width())/2, QMAX( (height()-4-_pixmap->height() )/2, 1), *_pixmap ); |
179 | p. setPen ( darkGray ); | 180 | p. setPen ( darkGray ); |
180 | p. drawRect ( 1, height() - 4, width() - 2, 4 ); | 181 | p. drawRect ( 1, height() - 4, width() - 2, 4 ); |
diff --git a/noncore/applets/volumeapplet2/volumeapplet.h b/noncore/applets/volumeapplet2/volumeapplet.h index 953c305..e5dd4b9 100644 --- a/noncore/applets/volumeapplet2/volumeapplet.h +++ b/noncore/applets/volumeapplet2/volumeapplet.h | |||
@@ -84,29 +84,29 @@ class VolumeAppletControl : public QFrame | |||
84 | protected: | 84 | protected: |
85 | virtual void showEvent( QShowEvent* ); | 85 | virtual void showEvent( QShowEvent* ); |
86 | virtual void hideEvent( QHideEvent* ); | 86 | virtual void hideEvent( QHideEvent* ); |
87 | void build(); | 87 | void build(); |
88 | 88 | ||
89 | private: | 89 | private: |
90 | 90 | ||
91 | QGridLayout* l; | 91 | QGridLayout* l; |
92 | }; | 92 | }; |
93 | 93 | ||
94 | 94 | ||
95 | class VolumeApplet : public Opie::Ui::OTaskbarApplet | 95 | class VolumeApplet : public Opie::Ui::OTaskbarApplet |
96 | { | 96 | { |
97 | public: | 97 | public: |
98 | VolumeApplet( QWidget* parent = 0, const char* name = 0 ); | 98 | VolumeApplet( QWidget* parent = 0, const char* name = 0 ); |
99 | ~VolumeApplet(); | 99 | ~VolumeApplet(); |
100 | 100 | ||
101 | static int position(); | 101 | static int position(); |
102 | protected: | 102 | protected: |
103 | virtual void paintEvent( QPaintEvent* ); | 103 | virtual void paintEvent( QPaintEvent* ); |
104 | virtual void mousePressEvent( QMouseEvent* ); | 104 | virtual void mousePressEvent( QMouseEvent* ); |
105 | 105 | ||
106 | private: | 106 | private: |
107 | VolumeAppletControl* _control; | 107 | VolumeAppletControl* _control; |
108 | QPixmap* _pixmap; | 108 | QPixmap _pixmap; |
109 | }; | 109 | }; |
110 | 110 | ||
111 | #endif | 111 | #endif |
112 | 112 | ||