summaryrefslogtreecommitdiffstats
path: root/clients/tde/src/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'clients/tde/src/app/views')
-rw-r--r--clients/tde/src/app/views/instrumentview.cpp18
-rw-r--r--clients/tde/src/app/views/instrumentview.h2
2 files changed, 13 insertions, 7 deletions
diff --git a/clients/tde/src/app/views/instrumentview.cpp b/clients/tde/src/app/views/instrumentview.cpp
index 3182bc1..9f4b061 100644
--- a/clients/tde/src/app/views/instrumentview.cpp
+++ b/clients/tde/src/app/views/instrumentview.cpp
@@ -62,7 +62,7 @@ bool InstrumentView::eventFilter(TQObject *o, TQEvent *e) {
if (childPartWidget) {
if (o == childPartWidget) {
if (e->type() == TQEvent::Resize) {
- setChildSizeToHint();
+ setChildSizeData();
}
}
}
@@ -71,7 +71,7 @@ bool InstrumentView::eventFilter(TQObject *o, TQEvent *e) {
return FALSE;
}
-void InstrumentView::setChildSizeToHint() {
+void InstrumentView::setChildSizeData() {
if (m_instrumentPart) {
TQWidget *childPartWidget = m_instrumentPart->widget();
if (childPartWidget) {
@@ -79,8 +79,14 @@ void InstrumentView::setChildSizeToHint() {
setFixedSize(childPartWidget->sizeHint());
}
else {
- TQSize childSizeHint = childPartWidget->sizeHint();
- setMinimumSize(childSizeHint.width(), childSizeHint.height());
+ TQSize minimumSizeHint;
+ if (childPartWidget->layout()) {
+ minimumSizeHint = childPartWidget->layout()->minimumSize();
+ }
+ else {
+ minimumSizeHint = childPartWidget->minimumSize();
+ }
+ setMinimumSize(minimumSizeHint.width(), minimumSizeHint.height());
resize(childPartWidget->size());
}
}
@@ -93,11 +99,11 @@ void InstrumentView::setUsingFixedSize(bool fixed) {
setMinimumSize(0, 0);
setMaximumSize(TQWIDGETSIZE_MAX, TQWIDGETSIZE_MAX);
}
- setChildSizeToHint();
+ setChildSizeData();
}
void InstrumentView::resizeEvent(TQResizeEvent *) {
- setChildSizeToHint();
+ setChildSizeData();
}
TQPtrList<KAction> InstrumentView::menuActionList() {
diff --git a/clients/tde/src/app/views/instrumentview.h b/clients/tde/src/app/views/instrumentview.h
index ed592dd..fa4551a 100644
--- a/clients/tde/src/app/views/instrumentview.h
+++ b/clients/tde/src/app/views/instrumentview.h
@@ -39,7 +39,7 @@ class InstrumentView : public KMdiChildView
private slots:
void setStatusMessage(const TQString& message);
void setUsingFixedSize(bool fixed);
- void setChildSizeToHint();
+ void setChildSizeData();
signals:
void statusMessageSet(const TQString&);