diff options
author | Sami Merila <sami.merila@nokia.com> | 2010-07-01 11:43:18 (GMT) |
---|---|---|
committer | Sami Merila <sami.merila@nokia.com> | 2010-07-01 11:43:18 (GMT) |
commit | 30fbf43186521c10b9cd36577da57688be7f600d (patch) | |
tree | 2c1a981b273b07d3f95a554540e14ae101e6d042 /src | |
parent | cb2b4a12ac17adf56074d3630efe4feb50ae0e2b (diff) | |
download | Qt-30fbf43186521c10b9cd36577da57688be7f600d.zip Qt-30fbf43186521c10b9cd36577da57688be7f600d.tar.gz Qt-30fbf43186521c10b9cd36577da57688be7f600d.tar.bz2 |
QProgressDialog text is too close to dialog border
This is due to that in Symbian, dialog border is not definitive.
The actual border might be few pixels inside the dialog area to support
partial transparency of dialog corners. Therefore laying out labels
to near border (to y coordinate 0) makes the label cross the dialog
border area for some themes.
Fixed, by moving the dialog content down
PM_DefaultTopLevelMargin pixels.
Task-number: QT-3511
Reviewed-by: Alessandro Portale
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/dialogs/qprogressdialog.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gui/dialogs/qprogressdialog.cpp b/src/gui/dialogs/qprogressdialog.cpp index a2d7b23..d64c847 100644 --- a/src/gui/dialogs/qprogressdialog.cpp +++ b/src/gui/dialogs/qprogressdialog.cpp @@ -153,6 +153,13 @@ void QProgressDialogPrivate::layout() const bool centered = bool(q->style()->styleHint(QStyle::SH_ProgressDialog_CenterCancelButton, 0, q)); + int additionalSpacing = 0; +#ifdef Q_OS_SYMBIAN + //In Symbian, we need to have wider margins for dialog borders, as the actual border is some pixels + //inside the dialog area (to enable transparent borders) + additionalSpacing = mlr; +#endif + QSize cs = cancel ? cancel->sizeHint() : QSize(0,0); QSize bh = bar->sizeHint(); int cspc; @@ -185,8 +192,8 @@ void QProgressDialogPrivate::layout() } if (label) - label->setGeometry(mlr, 0, q->width()-mlr*2, lh); - bar->setGeometry(mlr, lh+sp, q->width()-mlr*2, bh.height()); + label->setGeometry(mlr, additionalSpacing, q->width() - mlr * 2, lh); + bar->setGeometry(mlr, lh + sp + additionalSpacing, q->width() - mlr * 2, bh.height()); } void QProgressDialogPrivate::retranslateStrings() |