summaryrefslogtreecommitdiffabout
path: root/microkde/kdeui
authorzautrix <zautrix>2005-10-22 14:12:43 (UTC)
committer zautrix <zautrix>2005-10-22 14:12:43 (UTC)
commita72d70beb381b9cd6f2af301b52ca82cdcafb299 (patch) (side-by-side diff)
treef5b068e80395821abb5717fb07757a17d805f770 /microkde/kdeui
parenta72f3f3acfac791715a1c512fc4cc4c3facdbb62 (diff)
downloadkdepimpi-a72d70beb381b9cd6f2af301b52ca82cdcafb299.zip
kdepimpi-a72d70beb381b9cd6f2af301b52ca82cdcafb299.tar.gz
kdepimpi-a72d70beb381b9cd6f2af301b52ca82cdcafb299.tar.bz2
fix
Diffstat (limited to 'microkde/kdeui') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdeui/ktoolbar.cpp14
-rw-r--r--microkde/kdeui/ktoolbar.h4
2 files changed, 15 insertions, 3 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;
diff --git a/microkde/kdeui/ktoolbar.h b/microkde/kdeui/ktoolbar.h
index 7a5c114..3319fa8 100644
--- a/microkde/kdeui/ktoolbar.h
+++ b/microkde/kdeui/ktoolbar.h
@@ -1081,7 +1081,9 @@ private slots:
void slotContextAboutToShow();
void widgetDestroyed();
-private:
+private:
+ int sizeHintW;
+ int sizeHintH;
void init( bool readConfig = true, bool honorStyle = false );
void doConnections( KToolBarButton *button );
void insertWidgetInternal( QWidget *w, int &index, int id );