summaryrefslogtreecommitdiff
path: root/library/qpedecoration_qws.cpp
Side-by-side diff
Diffstat (limited to 'library/qpedecoration_qws.cpp') (more/less context) (ignore 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
@@ -288,79 +288,79 @@ void QPEManager::whatsThisTimeout()
whatsThis = 0;
drawTitle( w );
}
wtTimer->stop();
} else {
QWhatsThis::enterWhatsThisMode();
helpState = 0;
updateActive();
if ( active ) {
whatsThis = active;
drawTitle( active );
// check periodically to see if we've left whats this mode
wtTimer->start( 250 );
}
}
inWhatsThis = !inWhatsThis;
}
}
//===========================================================================
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;
}
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;
}
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;
}
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;
}
int WindowDecorationInterface::metric( Metric m, const WindowData *wd ) const
{
switch ( m ) {
case TitleHeight:
if ( QApplication::desktop()->height() > 320 )
return 19;
else
return 15;
case LeftBorder:
case RightBorder:
case TopBorder:
case BottomBorder:
return 4;
case OKWidth:
return okImage(metric(TitleHeight,wd))->width();
case CloseWidth:
return closeImage(metric(TitleHeight,wd))->width();
case HelpWidth: