author | zautrix <zautrix> | 2005-10-22 14:12:43 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-10-22 14:12:43 (UTC) |
commit | a72d70beb381b9cd6f2af301b52ca82cdcafb299 (patch) (side-by-side diff) | |
tree | f5b068e80395821abb5717fb07757a17d805f770 | |
parent | a72f3f3acfac791715a1c512fc4cc4c3facdbb62 (diff) | |
download | kdepimpi-a72d70beb381b9cd6f2af301b52ca82cdcafb299.zip kdepimpi-a72d70beb381b9cd6f2af301b52ca82cdcafb299.tar.gz kdepimpi-a72d70beb381b9cd6f2af301b52ca82cdcafb299.tar.bz2 |
fix
-rw-r--r-- | kaddressbook/kabcore.cpp | 6 | ||||
-rw-r--r-- | microkde/kapplication.cpp | 4 | ||||
-rw-r--r-- | microkde/kdeui/ktoolbar.cpp | 14 | ||||
-rw-r--r-- | microkde/kdeui/ktoolbar.h | 4 |
4 files changed, 23 insertions, 5 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 4e2523e..033e537 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -847,10 +847,13 @@ void KABCore::updateMainWindow() //mMainWindow->repaint(); } void KABCore::resizeEvent(QResizeEvent* e ) { - if ( !mMiniSplitter ) + if ( !mMiniSplitter ) { + QWidget::resizeEvent( e ); return; + } +#ifndef DESKTOP_VERSION static int desktop_width = 0; //qDebug("KABCore::resizeEvent %d %d ",desktop_width,QApplication::desktop()->width() ); if ( desktop_width != QApplication::desktop()->width() ) if ( QApplication::desktop()->width() >= 480 ) { @@ -895,8 +898,9 @@ void KABCore::resizeEvent(QResizeEvent* e ) } } } desktop_width = QApplication::desktop()->width(); +#endif QWidget::resizeEvent( e ); } void KABCore::export2phone() diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp index f36c5ae..d7c12bb 100644 --- a/microkde/kapplication.cpp +++ b/microkde/kapplication.cpp @@ -50,15 +50,17 @@ void KApplication::showLicence() void KApplication::testCoords( int* x, int* y, int* wid, int * hei ) { int dWid = QApplication::desktop()->width() ; int dHei = QApplication::desktop()->height(); + if ( *x < 0 ) *x = 0; + if ( *y < 20 ) *y = 20 ; if ( *x + *wid > dWid ) { *x = 0; if ( *wid > dWid ) *wid = dWid; } if ( *y + *hei > dHei ) { - *y = 0; + *y = 20; if ( *hei > dHei ) *hei = dHei; } } 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 @@ -254,8 +254,10 @@ KToolBar::~KToolBar() } void KToolBar::init( bool readConfig, bool honorStyle ) { + sizeHintW = 240; + sizeHintH = 22; inshutdownprocess = false; d = new KToolBarPrivate; setFullSize( TRUE ); d->m_honorStyle = honorStyle; @@ -1438,10 +1440,18 @@ QSizePolicy KToolBar::sizePolicy() const return QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Expanding ); } 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; ++iii; 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 @@ -1080,9 +1080,11 @@ private slots: void toolBarPosChanged( QToolBar *tb ); 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 ); void removeWidgetInternal( QWidget *w ); |