summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp6
-rw-r--r--microkde/kapplication.cpp4
-rw-r--r--microkde/kdeui/ktoolbar.cpp14
-rw-r--r--microkde/kdeui/ktoolbar.h4
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
@@ -843,18 +843,21 @@ void KABCore::beamMySelf()
843} 843}
844void KABCore::updateMainWindow() 844void KABCore::updateMainWindow()
845{ 845{
846 mMainWindow->showMaximized(); 846 mMainWindow->showMaximized();
847 //mMainWindow->repaint(); 847 //mMainWindow->repaint();
848} 848}
849void KABCore::resizeEvent(QResizeEvent* e ) 849void KABCore::resizeEvent(QResizeEvent* e )
850{ 850{
851 if ( !mMiniSplitter ) 851 if ( !mMiniSplitter ) {
852 QWidget::resizeEvent( e );
852 return; 853 return;
854 }
855#ifndef DESKTOP_VERSION
853 static int desktop_width = 0; 856 static int desktop_width = 0;
854 //qDebug("KABCore::resizeEvent %d %d ",desktop_width,QApplication::desktop()->width() ); 857 //qDebug("KABCore::resizeEvent %d %d ",desktop_width,QApplication::desktop()->width() );
855 if ( desktop_width != QApplication::desktop()->width() ) 858 if ( desktop_width != QApplication::desktop()->width() )
856 if ( QApplication::desktop()->width() >= 480 ) { 859 if ( QApplication::desktop()->width() >= 480 ) {
857 if (QApplication::desktop()->width() == 640 ) { // e.g. 640x480 860 if (QApplication::desktop()->width() == 640 ) { // e.g. 640x480
858 //qDebug("640 "); 861 //qDebug("640 ");
859 if ( mMiniSplitter->orientation() == Qt::Vertical ) { 862 if ( mMiniSplitter->orientation() == Qt::Vertical ) {
860 //qDebug("switch V->H "); 863 //qDebug("switch V->H ");
@@ -891,16 +894,17 @@ void KABCore::resizeEvent(QResizeEvent* e )
891 mViewManager->getFilterAction()->setComboWidth( 0 ); 894 mViewManager->getFilterAction()->setComboWidth( 0 );
892 } 895 }
893 if ( shot ) 896 if ( shot )
894 QTimer::singleShot( 1, this , SLOT ( updateMainWindow())); 897 QTimer::singleShot( 1, this , SLOT ( updateMainWindow()));
895 } 898 }
896 } 899 }
897 } 900 }
898 desktop_width = QApplication::desktop()->width(); 901 desktop_width = QApplication::desktop()->width();
902#endif
899 QWidget::resizeEvent( e ); 903 QWidget::resizeEvent( e );
900 904
901} 905}
902void KABCore::export2phone() 906void KABCore::export2phone()
903{ 907{
904 908
905 QStringList uids; 909 QStringList uids;
906 XXPortSelectDialog dlg( this, false, this ); 910 XXPortSelectDialog dlg( this, false, this );
diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp
index f36c5ae..d7c12bb 100644
--- a/microkde/kapplication.cpp
+++ b/microkde/kapplication.cpp
@@ -46,23 +46,25 @@ void KApplication::showLicence()
46{ 46{
47 KApplication::showFile( "KDE-Pim/Pi licence", "kdepim/licence.txt" ); 47 KApplication::showFile( "KDE-Pim/Pi licence", "kdepim/licence.txt" );
48} 48}
49 49
50void KApplication::testCoords( int* x, int* y, int* wid, int * hei ) 50void KApplication::testCoords( int* x, int* y, int* wid, int * hei )
51{ 51{
52 int dWid = QApplication::desktop()->width() ; 52 int dWid = QApplication::desktop()->width() ;
53 int dHei = QApplication::desktop()->height(); 53 int dHei = QApplication::desktop()->height();
54 if ( *x < 0 ) *x = 0;
55 if ( *y < 20 ) *y = 20 ;
54 if ( *x + *wid > dWid ) { 56 if ( *x + *wid > dWid ) {
55 *x = 0; 57 *x = 0;
56 if ( *wid > dWid ) 58 if ( *wid > dWid )
57 *wid = dWid; 59 *wid = dWid;
58 } 60 }
59 if ( *y + *hei > dHei ) { 61 if ( *y + *hei > dHei ) {
60 *y = 0; 62 *y = 20;
61 if ( *hei > dHei ) 63 if ( *hei > dHei )
62 *hei = dHei; 64 *hei = dHei;
63 } 65 }
64} 66}
65void KApplication::showFile(QString caption, QString fn) 67void KApplication::showFile(QString caption, QString fn)
66{ 68{
67 QString text; 69 QString text;
68 QString fileName; 70 QString fileName;
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
@@ -250,16 +250,18 @@ KToolBar::~KToolBar()
250{ 250{
251 inshutdownprocess = true; 251 inshutdownprocess = true;
252 emit toolbarDestroyed(); 252 emit toolbarDestroyed();
253 delete d; 253 delete d;
254} 254}
255 255
256void KToolBar::init( bool readConfig, bool honorStyle ) 256void KToolBar::init( bool readConfig, bool honorStyle )
257{ 257{
258 sizeHintW = 240;
259 sizeHintH = 22;
258 inshutdownprocess = false; 260 inshutdownprocess = false;
259 d = new KToolBarPrivate; 261 d = new KToolBarPrivate;
260 setFullSize( TRUE ); 262 setFullSize( TRUE );
261 d->m_honorStyle = honorStyle; 263 d->m_honorStyle = honorStyle;
262 context = 0; 264 context = 0;
263 layoutTimer = new QTimer( this ); 265 layoutTimer = new QTimer( this );
264 connect( layoutTimer, SIGNAL( timeout() ), 266 connect( layoutTimer, SIGNAL( timeout() ),
265 this, SLOT( rebuildLayout() ) ); 267 this, SLOT( rebuildLayout() ) );
@@ -1434,18 +1436,26 @@ QSizePolicy KToolBar::sizePolicy() const
1434{ 1436{
1435 if ( orientation() == Horizontal ) 1437 if ( orientation() == Horizontal )
1436 return QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); 1438 return QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
1437 else 1439 else
1438 return QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Expanding ); 1440 return QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Expanding );
1439} 1441}
1440 1442
1441QSize KToolBar::sizeHint() const 1443QSize KToolBar::sizeHint() const
1442{ 1444{
1443 return QToolBar::sizeHint(); 1445 QSize sh = QToolBar::sizeHint();
1446 //qDebug("%x KToolBar::sizeHint() %d %d ",this, QToolBar::sizeHint().width(),QToolBar::sizeHint().height() );
1447 if ( sh.height() <= 20 || sh.width() < 60 )
1448 return QSize( sizeHintW, sizeHintH );
1449 KToolBar* ttt = (KToolBar*) this;
1450 ttt->sizeHintW = sh.width();
1451 ttt->sizeHintH = sh.height();
1452 return sh;
1453 //return QToolBar::sizeHint();
1444#if 0 1454#if 0
1445 QWidget::polish(); 1455 QWidget::polish();
1446 static int iii = 0; 1456 static int iii = 0;
1447 ++iii; 1457 ++iii;
1448 qDebug("++++++++ KToolBar::sizeHint() %d ", iii ); 1458 qDebug("++++++++ KToolBar::sizeHint() %d ", iii );
1449 int margin = static_cast<QWidget*>(ncThis)->layout()->margin(); 1459 int margin = static_cast<QWidget*>(ncThis)->layout()->margin();
1450 switch( barPos() ) 1460 switch( barPos() )
1451 { 1461 {
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
@@ -1076,17 +1076,19 @@ private slots:
1076 void rebuildLayout(); 1076 void rebuildLayout();
1077 void slotReadConfig (); 1077 void slotReadConfig ();
1078 void slotAppearanceChanged(); 1078 void slotAppearanceChanged();
1079 void slotIconChanged(int); 1079 void slotIconChanged(int);
1080 void toolBarPosChanged( QToolBar *tb ); 1080 void toolBarPosChanged( QToolBar *tb );
1081 void slotContextAboutToShow(); 1081 void slotContextAboutToShow();
1082 void widgetDestroyed(); 1082 void widgetDestroyed();
1083 1083
1084private: 1084private:
1085 int sizeHintW;
1086 int sizeHintH;
1085 void init( bool readConfig = true, bool honorStyle = false ); 1087 void init( bool readConfig = true, bool honorStyle = false );
1086 void doConnections( KToolBarButton *button ); 1088 void doConnections( KToolBarButton *button );
1087 void insertWidgetInternal( QWidget *w, int &index, int id ); 1089 void insertWidgetInternal( QWidget *w, int &index, int id );
1088 void removeWidgetInternal( QWidget *w ); 1090 void removeWidgetInternal( QWidget *w );
1089 void getAttributes( QString &position, QString &icontext, int &index ); 1091 void getAttributes( QString &position, QString &icontext, int &index );
1090//US KPopupMenu *contextMenu(); 1092//US KPopupMenu *contextMenu();
1091 QPopupMenu *contextMenu(); 1093 QPopupMenu *contextMenu();
1092 1094