-rw-r--r-- | microkde/kdeui/ktoolbar.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/microkde/kdeui/ktoolbar.cpp b/microkde/kdeui/ktoolbar.cpp index df2aad8..027e5e9 100644 --- a/microkde/kdeui/ktoolbar.cpp +++ b/microkde/kdeui/ktoolbar.cpp @@ -255,6 +255,8 @@ KToolBar::~KToolBar() void KToolBar::init( bool readConfig, bool honorStyle ) { + sizeHintW = 240; + sizeHintH = 22; inshutdownprocess = false; d = new KToolBarPrivate; setFullSize( TRUE ); @@ -1439,8 +1441,16 @@ QSizePolicy KToolBar::sizePolicy() const } QSize KToolBar::sizeHint() const -{ - return QToolBar::sizeHint(); +{ + QSize sh = QToolBar::sizeHint(); + //qDebug("%x KToolBar::sizeHint() %d %d ",this, QToolBar::sizeHint().width(),QToolBar::sizeHint().height() ); + if ( sh.height() <= 20 || sh.width() < 60 ) + return QSize( sizeHintW, sizeHintH ); + KToolBar* ttt = (KToolBar*) this; + ttt->sizeHintW = sh.width(); + ttt->sizeHintH = sh.height(); + return sh; + //return QToolBar::sizeHint(); #if 0 QWidget::polish(); static int iii = 0; |