Index: qt4/toolbar/common-uimstateindicator.cpp =================================================================== --- qt4/toolbar/common-uimstateindicator.cpp (revision 6128) +++ qt4/toolbar/common-uimstateindicator.cpp (working copy) @@ -129,7 +129,9 @@ return; QHelperPopupMenu *popupMenu = 0; +#ifdef PLASMA_APPLET_UIM int prevCount = m_layout->count(); +#endif foreach ( QHelperToolbarButton *button, buttons ) { if ( m_layout->indexOf( button ) >= 0 ) @@ -206,10 +208,10 @@ } } +#ifdef PLASMA_APPLET_UIM if ( m_layout->count() != prevCount ) +#endif emit indicatorResized(); - - parentWidget()->show(); } void UimStateIndicator::helper_disconnect_cb() Index: qt4/toolbar/standalone-qt4.cpp =================================================================== --- qt4/toolbar/standalone-qt4.cpp (revision 6128) +++ qt4/toolbar/standalone-qt4.cpp (working copy) @@ -62,11 +62,11 @@ setLayout( layout ); adjustSize(); - UimToolbarDraggingHandler *h = new UimToolbarDraggingHandler( this ); - layout->addWidget( h ); - h->adjustSize(); - h->show(); - connect( h, SIGNAL( handleDoubleClicked() ), + handler = new UimToolbarDraggingHandler( this ); + layout->addWidget( handler ); + handler->adjustSize(); + handler->show(); + connect( handler, SIGNAL( handleDoubleClicked() ), this, SLOT( slotToolbarDoubleClicked() ) ); @@ -81,11 +81,12 @@ int panelHeight = 64; // FIXME! int screenwidth = QApplication::desktop()->screenGeometry().width(); int screenheight = QApplication::desktop()->screenGeometry().height(); - QPoint p( screenwidth - panelHeight - toolbar->width() - h->width(), screenheight - height() - panelHeight ); + QPoint p( screenwidth - panelHeight - toolbar->width() - handler->width(), + screenheight - height() - panelHeight ); move( p ); // Enable Dragging Feature - connect( h, SIGNAL( moveTo( const QPoint & ) ), + connect( handler, SIGNAL( moveTo( const QPoint & ) ), this, SLOT( moveTo( const QPoint & ) ) ); // Quit @@ -102,16 +103,22 @@ void UimStandaloneToolbar::slotToolbarResized() { + toolbar->show(); adjustSize(); } void UimStandaloneToolbar::slotToolbarDoubleClicked() { - if (toolbar->isVisible()) - toolbar->hide(); - else - toolbar->show(); + if (toolbar->isVisible()) { + toolbar->hide(); + // shrink this toolbar + int width = maximumWidth(); + setFixedWidth(handler->width()); + setMaximumWidth(width); + } else { + toolbar->show(); + } adjustSize(); } Index: qt4/toolbar/standalone-qt4.h =================================================================== --- qt4/toolbar/standalone-qt4.h (revision 6128) +++ qt4/toolbar/standalone-qt4.h (working copy) @@ -37,6 +37,7 @@ #include class QUimHelperToolbar; +class UimToolbarDraggingHandler; class QPoint; class QMouseEvent; @@ -57,6 +58,7 @@ void moveTo(const QPoint &point); private: + UimToolbarDraggingHandler *handler; QUimHelperToolbar *toolbar; };