-rw-r--r-- | microkde/kapplication.cpp | 4 | ||||
-rw-r--r-- | microkde/kdeui/ktoolbar.cpp | 14 | ||||
-rw-r--r-- | microkde/kdeui/ktoolbar.h | 4 |
3 files changed, 18 insertions, 4 deletions
diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp index f36c5ae..d7c12bb 100644 --- a/microkde/kapplication.cpp +++ b/microkde/kapplication.cpp | |||
@@ -51,13 +51,15 @@ void 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 | } |
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() | |||
255 | 255 | ||
256 | void KToolBar::init( bool readConfig, bool honorStyle ) | 256 | void 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 ); |
@@ -1439,8 +1441,16 @@ QSizePolicy KToolBar::sizePolicy() const | |||
1439 | } | 1441 | } |
1440 | 1442 | ||
1441 | QSize KToolBar::sizeHint() const | 1443 | QSize 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; |
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: | |||
1081 | void slotContextAboutToShow(); | 1081 | void slotContextAboutToShow(); |
1082 | void widgetDestroyed(); | 1082 | void widgetDestroyed(); |
1083 | 1083 | ||
1084 | private: | 1084 | private: |
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 ); |