summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/qdockarea.cpp6
-rw-r--r--src/widgets/qprogressbar.cpp10
2 files changed, 11 insertions, 5 deletions
diff --git a/src/widgets/qdockarea.cpp b/src/widgets/qdockarea.cpp
index 14c63885f..e0764a32a 100644
--- a/src/widgets/qdockarea.cpp
+++ b/src/widgets/qdockarea.cpp
@@ -204,13 +204,15 @@ static int dock_strut( TQDockWindow *w, TQt::Orientation o )
{
if ( o != TQt::Horizontal ) {
int wid;
- if ( ( wid = w->fixedExtent().width() ) != -1 )
+ if ( ( wid = w->fixedExtent().width() ) != -1 ) {
return TQMAX( wid, TQMAX( w->minimumSize().width(), w->minimumSizeHint().width() ) );
+ }
return TQMAX( w->sizeHint().width(), TQMAX( w->minimumSize().width(), w->minimumSizeHint().width() ) );
} else {
int hei;
- if ( ( hei = w->fixedExtent().height() ) != -1 )
+ if ( ( hei = w->fixedExtent().height() ) != -1 ) {
return TQMAX( hei, TQMAX( w->minimumSizeHint().height(), w->minimumSize().height() ) );
+ }
return TQMAX( w->sizeHint().height(), TQMAX( w->minimumSizeHint().height(), w->minimumSize().height() ) );
}
}
diff --git a/src/widgets/qprogressbar.cpp b/src/widgets/qprogressbar.cpp
index bf40d9e45..d1300d3e2 100644
--- a/src/widgets/qprogressbar.cpp
+++ b/src/widgets/qprogressbar.cpp
@@ -429,8 +429,10 @@ void TQProgressBar::drawContents( TQPainter *p )
TQWMatrix oldMatrix = buffer.painter()->worldMatrix();
- TQStyleControlElementData ceData = populateControlElementDataFromWidget(this, TQStyleOption());
- TQStyle::ControlElementFlags elementFlags = getControlElementFlagsForObject(this, ceData.widgetObjectTypes, TQStyleOption());
+ const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(this, TQStyleOption());
+ TQStyle::ControlElementFlags elementFlags = getControlElementFlagsForObject(this, TQStyleOption());
+
+ TQRect ceDataRectOrig = ceData.rect;
// Draw contents
if (m_orientation == TQt::Vertical) {
@@ -447,7 +449,7 @@ void TQProgressBar::drawContents( TQPainter *p )
buffer.painter()->setWorldMatrix(m, TRUE);
- ceData.rect = TQRect(ceData.rect.y(), ceData.rect.x(), ceData.rect.height(), ceData.rect.width());
+ const_cast<TQStyleControlElementData&>(ceData).rect = TQRect(ceData.rect.y(), ceData.rect.x(), ceData.rect.height(), ceData.rect.width());
}
style().drawControl(TQStyle::CE_ProgressBarContents, buffer.painter(), ceData, elementFlags,
@@ -461,6 +463,8 @@ void TQProgressBar::drawContents( TQPainter *p )
TQStyle::visualRect(style().subRect(TQStyle::SR_ProgressBarLabel, this), this ),
colorGroup(), flags);
}
+
+ const_cast<TQStyleControlElementData&>(ceData).rect = ceDataRectOrig;
}
#endif