-rw-r--r-- | library/qpedecoration_qws.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/library/qpedecoration_qws.cpp b/library/qpedecoration_qws.cpp index fa38180..fb47c14 100644 --- a/library/qpedecoration_qws.cpp +++ b/library/qpedecoration_qws.cpp | |||
@@ -288,79 +288,79 @@ void QPEManager::whatsThisTimeout() | |||
288 | whatsThis = 0; | 288 | whatsThis = 0; |
289 | drawTitle( w ); | 289 | drawTitle( w ); |
290 | } | 290 | } |
291 | wtTimer->stop(); | 291 | wtTimer->stop(); |
292 | } else { | 292 | } else { |
293 | QWhatsThis::enterWhatsThisMode(); | 293 | QWhatsThis::enterWhatsThisMode(); |
294 | helpState = 0; | 294 | helpState = 0; |
295 | updateActive(); | 295 | updateActive(); |
296 | if ( active ) { | 296 | if ( active ) { |
297 | whatsThis = active; | 297 | whatsThis = active; |
298 | drawTitle( active ); | 298 | drawTitle( active ); |
299 | // check periodically to see if we've left whats this mode | 299 | // check periodically to see if we've left whats this mode |
300 | wtTimer->start( 250 ); | 300 | wtTimer->start( 250 ); |
301 | } | 301 | } |
302 | } | 302 | } |
303 | inWhatsThis = !inWhatsThis; | 303 | inWhatsThis = !inWhatsThis; |
304 | } | 304 | } |
305 | } | 305 | } |
306 | 306 | ||
307 | //=========================================================================== | 307 | //=========================================================================== |
308 | 308 | ||
309 | static QImage *okImage( int th ) | 309 | static QImage *okImage( int th ) |
310 | { | 310 | { |
311 | static QImage *i = 0; | 311 | static QImage *i = 0; |
312 | if ( !i || i->height() != th ) { | 312 | if ( !i || ::abs( i->height()-th ) > 4 ) { |
313 | delete i; | 313 | delete i; |
314 | i = new QImage(scaleButton(Resource::loadImage("OKButton"),th)); | 314 | i = new QImage(scaleButton(Resource::loadImage("OKButton"),th)); |
315 | } | 315 | } |
316 | return i; | 316 | return i; |
317 | } | 317 | } |
318 | 318 | ||
319 | static QImage *closeImage( int th ) | 319 | static QImage *closeImage( int th ) |
320 | { | 320 | { |
321 | static QImage *i = 0; | 321 | static QImage *i = 0; |
322 | if ( !i || i->height() != th ) { | 322 | if ( !i || ::abs( i->height()-th ) > 4 ) { |
323 | delete i; | 323 | delete i; |
324 | i = new QImage(scaleButton(Resource::loadImage("CloseButton"),th)); | 324 | i = new QImage(scaleButton(Resource::loadImage("CloseButton"),th)); |
325 | } | 325 | } |
326 | return i; | 326 | return i; |
327 | } | 327 | } |
328 | 328 | ||
329 | static QImage *helpImage( int th ) | 329 | static QImage *helpImage( int th ) |
330 | { | 330 | { |
331 | static QImage *i = 0; | 331 | static QImage *i = 0; |
332 | if ( !i || i->height() != th ) { | 332 | if ( !i || ::abs( i->height()-th ) > 4 ) { |
333 | delete i; | 333 | delete i; |
334 | i = new QImage(scaleButton(Resource::loadImage("HelpButton"),th)); | 334 | i = new QImage(scaleButton(Resource::loadImage("HelpButton"),th)); |
335 | } | 335 | } |
336 | return i; | 336 | return i; |
337 | } | 337 | } |
338 | 338 | ||
339 | static QImage *maximizeImage( int th ) | 339 | static QImage *maximizeImage( int th ) |
340 | { | 340 | { |
341 | static QImage *i = 0; | 341 | static QImage *i = 0; |
342 | if ( !i || i->height() != th ) { | 342 | if ( !i || ::abs( i->height()-th ) > 4 ) { |
343 | delete i; | 343 | delete i; |
344 | i = new QImage(scaleButton(Resource::loadImage("MaximizeButton"),th)); | 344 | i = new QImage(scaleButton(Resource::loadImage("MaximizeButton"),th)); |
345 | } | 345 | } |
346 | return i; | 346 | return i; |
347 | } | 347 | } |
348 | 348 | ||
349 | int WindowDecorationInterface::metric( Metric m, const WindowData *wd ) const | 349 | int WindowDecorationInterface::metric( Metric m, const WindowData *wd ) const |
350 | { | 350 | { |
351 | switch ( m ) { | 351 | switch ( m ) { |
352 | case TitleHeight: | 352 | case TitleHeight: |
353 | if ( QApplication::desktop()->height() > 320 ) | 353 | if ( QApplication::desktop()->height() > 320 ) |
354 | return 19; | 354 | return 19; |
355 | else | 355 | else |
356 | return 15; | 356 | return 15; |
357 | case LeftBorder: | 357 | case LeftBorder: |
358 | case RightBorder: | 358 | case RightBorder: |
359 | case TopBorder: | 359 | case TopBorder: |
360 | case BottomBorder: | 360 | case BottomBorder: |
361 | return 4; | 361 | return 4; |
362 | case OKWidth: | 362 | case OKWidth: |
363 | return okImage(metric(TitleHeight,wd))->width(); | 363 | return okImage(metric(TitleHeight,wd))->width(); |
364 | case CloseWidth: | 364 | case CloseWidth: |
365 | return closeImage(metric(TitleHeight,wd))->width(); | 365 | return closeImage(metric(TitleHeight,wd))->width(); |
366 | case HelpWidth: | 366 | case HelpWidth: |