/***************************************************************************
 *   Copyright (C) 2003-2005 by liuspider                                  *
 *   liuspider@users.sourceforge.net                                       *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 ***************************************************************************/
#include "scimtoolbar.h"
#include "scimdragableframe.h"
#include "qapplication.h"
#include "qstyle.h"

ScimToolBar::ScimToolBar(QWidget *parent, const char *name)
    : KToolBar(parent, name) {}

ScimToolBar::~ScimToolBar() {}

QSize ScimToolBar::sizeHint() const
{
    return KToolBar::sizeHint()-QSize(20,0);    //get rid of the extension handler, which will never be used
}

void ScimToolBar::adjustSize()
{
    if(ScimDragableFrame * dragframe = dynamic_cast<ScimDragableFrame *>(parentWidget())) {
        dragframe->scheduleAdjustSize();
    }
    else
        parentWidget()->adjustSize();
}
#include "scimtoolbar.moc"
