summaryrefslogtreecommitdiffabout
path: root/microkde/kdeui/ktoolbar.cpp
Side-by-side diff
Diffstat (limited to 'microkde/kdeui/ktoolbar.cpp') (more/less context) (show whitespace changes)
-rw-r--r--microkde/kdeui/ktoolbar.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/microkde/kdeui/ktoolbar.cpp b/microkde/kdeui/ktoolbar.cpp
index 36ede81..df2aad8 100644
--- a/microkde/kdeui/ktoolbar.cpp
+++ b/microkde/kdeui/ktoolbar.cpp
@@ -1370,103 +1370,103 @@ void KToolBar::childEvent( QChildEvent *e )
if ( !widget2id.contains( w ) )
{
int dummy = -1;
insertWidgetInternal( w, dummy, -1 );
}
}
} else {
removeWidgetInternal( w );
}
if ( isVisibleTo( 0 ) )
{
QBoxLayout *l = boxLayout();
// QLayout *l = layout();
// clear the old layout so that we don't get unnecassery layout
// changes till we have rebuild the thing
QLayoutIterator it = l->iterator();
while ( it.current() ) {
it.deleteCurrent();
}
layoutTimer->start( 50, TRUE );
}
}
QToolBar::childEvent( e );
}
void KToolBar::insertWidgetInternal( QWidget *w, int &index, int id )
{
// we can't have it in widgets, or something is really wrong
//widgets.removeRef( w );
connect( w, SIGNAL( destroyed() ),
this, SLOT( widgetDestroyed() ) );
if ( index == -1 || index > (int)widgets.count() ) {
widgets.append( w );
index = (int)widgets.count();
}
else
widgets.insert( index, w );
if ( id == -1 )
id = id2widget.count();
id2widget.insert( id, w );
widget2id.insert( w, id );
}
void KToolBar::repaintMe()
{
setUpdatesEnabled( true );
QToolBar::repaint( true );
- //qDebug(" KToolBar::repaintMe() ");
+ qDebug(" KToolBar::repaintMe() ");
}
void KToolBar::showEvent( QShowEvent *e )
{
- QToolBar::showEvent( e );
rebuildLayout();
+ QToolBar::showEvent( e );
}
void KToolBar::setStretchableWidget( QWidget *w )
{
QToolBar::setStretchableWidget( w );
stretchableWidget = w;
}
QSizePolicy KToolBar::sizePolicy() const
{
if ( orientation() == Horizontal )
return QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
else
return QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Expanding );
}
QSize KToolBar::sizeHint() const
{
return QToolBar::sizeHint();
#if 0
QWidget::polish();
static int iii = 0;
++iii;
qDebug("++++++++ KToolBar::sizeHint() %d ", iii );
int margin = static_cast<QWidget*>(ncThis)->layout()->margin();
switch( barPos() )
{
case KToolBar::Top:
case KToolBar::Bottom:
for ( QWidget *w = widgets.first(); w; w =widgets.next() )
{
if ( w->inherits( "KToolBarSeparator" ) &&
!( static_cast<KToolBarSeparator*>(w)->showLine() ) )
{
minSize += QSize(6, 0);
}
else
{
QSize sh = w->sizeHint();
if (!sh.isValid())
sh = w->minimumSize();
minSize = minSize.expandedTo(QSize(0, sh.height()));
minSize += QSize(sh.width()+1, 0);
}
}
/*US
minSize += QSize(QApplication::style().pixelMetric( QStyle::PM_DockWindowHandleExtent ), 0);
*/