summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--library/qpedecoration_qws.cpp8
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
@@ -308,9 +308,9 @@ void QPEManager::whatsThisTimeout()
static QImage *okImage( int th )
{
static QImage *i = 0;
- if ( !i || i->height() != th ) {
+ if ( !i || ::abs( i->height()-th ) > 4 ) {
delete i;
i = new QImage(scaleButton(Resource::loadImage("OKButton"),th));
}
return i;
@@ -318,9 +318,9 @@ static QImage *okImage( int th )
static QImage *closeImage( int th )
{
static QImage *i = 0;
- if ( !i || i->height() != th ) {
+ if ( !i || ::abs( i->height()-th ) > 4 ) {
delete i;
i = new QImage(scaleButton(Resource::loadImage("CloseButton"),th));
}
return i;
@@ -328,9 +328,9 @@ static QImage *closeImage( int th )
static QImage *helpImage( int th )
{
static QImage *i = 0;
- if ( !i || i->height() != th ) {
+ if ( !i || ::abs( i->height()-th ) > 4 ) {
delete i;
i = new QImage(scaleButton(Resource::loadImage("HelpButton"),th));
}
return i;
@@ -338,9 +338,9 @@ static QImage *helpImage( int th )
static QImage *maximizeImage( int th )
{
static QImage *i = 0;
- if ( !i || i->height() != th ) {
+ if ( !i || ::abs( i->height()-th ) > 4 ) {
delete i;
i = new QImage(scaleButton(Resource::loadImage("MaximizeButton"),th));
}
return i;