From 94bdb6fb177c0ab3caf50dd53bfbd99dd641d7bc Mon Sep 17 00:00:00 2001 From: ptv Date: Thu, 30 Nov 2006 13:40:24 +0000 Subject: [PATCH] improve minimum size hint --- src/Qtx/QtxGroupBox.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Qtx/QtxGroupBox.cxx b/src/Qtx/QtxGroupBox.cxx index 6975f779e..c66c2dad5 100644 --- a/src/Qtx/QtxGroupBox.cxx +++ b/src/Qtx/QtxGroupBox.cxx @@ -241,9 +241,9 @@ QSize QtxGroupBox::sizeHint() const if ( myContainer ) { if ( alignment() == AlignCenter ) - sw += 2 * ( myContainer->width() + 5 ); + sw += 2 * ( myContainer->sizeHint().width() + 5 ); else - sw += 1 * ( myContainer->width() + 5 ); + sw += 1 * ( myContainer->sizeHint().width() + 5 ); } sw += frameRect().left(); @@ -258,14 +258,13 @@ QSize QtxGroupBox::minimumSizeHint() const { QSize sz = QGroupBox::minimumSizeHint(); - int sw = titleSize().width() + myContainer ? myContainer->width() + 5 : 0; - + int sw = titleSize().width(); if ( myContainer ) { if ( alignment() == AlignCenter ) - sw += 2 * ( myContainer->width() + 5 ); + sw += 2 * ( myContainer->minimumSizeHint().width() + 5 ); else - sw += 1 * ( myContainer->width() + 5 ); + sw += 1 * ( myContainer->minimumSizeHint().width() + 5 ); } sw += frameRect().left(); -- 2.39.2