summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarius Storm-Olsen <marius.storm-olsen@nokia.com>2010-10-05 16:28:35 (GMT)
committerMarius Storm-Olsen <marius.storm-olsen@nokia.com>2010-10-05 16:28:35 (GMT)
commitcace0a51e21ff8275b887025b562fc79bec9f32f (patch)
tree64b5b1e795e50ec7f24a9d4636c972be2272170a /src
parent8ed3d9e33de7b4ee93b007ebde16ce42885ba95c (diff)
downloadQt-cace0a51e21ff8275b887025b562fc79bec9f32f.zip
Qt-cace0a51e21ff8275b887025b562fc79bec9f32f.tar.gz
Qt-cace0a51e21ff8275b887025b562fc79bec9f32f.tar.bz2
Revert "QWorkspace: fix hardcoded min size overwriting the real min size"
This reverts commit b3a46493a1a74bd7918bd68638c28cf6e84eb57f.
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/qworkspace.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/gui/widgets/qworkspace.cpp b/src/gui/widgets/qworkspace.cpp
index 3a9b30c..7180c4d 100644
--- a/src/gui/widgets/qworkspace.cpp
+++ b/src/gui/widgets/qworkspace.cpp
@@ -2551,6 +2551,7 @@ QWorkspaceChild::QWorkspaceChild(QWidget* window, QWorkspace *parent, Qt::Window
this, SLOT(titleBarDoubleClicked()));
}
+ setMinimumSize(128, 0);
int fw = style()->pixelMetric(QStyle::PM_MdiSubWindowFrameWidth, 0, this);
setContentsMargins(fw, fw, fw, fw);
@@ -2701,15 +2702,11 @@ QSize QWorkspaceChild::sizeHint() const
QSize QWorkspaceChild::minimumSizeHint() const
{
- QSize s;
- if (!childWidget) {
- s = QWidget::minimumSizeHint();
- } else {
- s = childWidget->minimumSize();
- if (s.isEmpty())
- s = childWidget->minimumSizeHint();
- }
- s = s.expandedTo(QSize(128, 0));
+ if (!childWidget)
+ return QWidget::minimumSizeHint() + baseSize();
+ QSize s = childWidget->minimumSize();
+ if (s.isEmpty())
+ s = childWidget->minimumSizeHint();
return s + baseSize();
}