KToolbar changes
Andras Mantia
amantia at freemail.hu
Fri Jul 4 13:10:03 BST 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Friday 2003 July 04 14:22, Waldo Bastian wrote:
> On Friday 04 July 2003 13:14, Andras Mantia wrote:
> > Hi,
> >
> > As I noticed on 2003-06-30 Waldo committed a change to ktoolbar.cpp
> > which removed the own sizeHint() and minimumSizeHint() methods and
> > started to use the QToolbar ones. This broke the toolbar handling when
> > it's not placed on a KMainWindow in Quanta. With r1.345 or ktoolbar.cpp
> > works, with r1.346 it doesn't.
> >
> > Can I readd the own sizeHint() implementation present in r1.345?
>
> I would like to look into the problem that Quanta experiences first, if
> there isn't an easy fix possible I will revert it. Is there anything in
> particular that needs to be done to make the problem visible in Quanta?
The problem in Quanta is that I have a QTabWidget derivated class which holds
the KToolBar derivated toolbars. The classes are derivated only to gain some
extra functionality, like react to mouse events.
The buttons on the toolbars are actions plugged into them. The plugging is
done in the MainWindow::createContainer(). Now the problem is that the
resulting widget height will not be correct, and you will see only the Tabs
of the QTabWidget, but not the buttons themselves.
Now after the actions are plugged, there is some tests about the
minimuSizeHint() of the KToolBar and according to the result the height of
the KToolBar and QTabWidget is adjusted. The code (quanta.cpp;
createContainer()) looks a bit strange, and I just found and fixed a bug in
it, but it took me several days to find the best solution that works in all
cases.
With r1.345 the minimumSizeHint().height() is 27, with 1.346 it is 16. My
settings are 22x22 for toolbar icons, so I believe that a KToolBar should
never return a value less than 22.
So with the corrected Quanta code the toolbar buttons are only half visible
with r1.346 and fully visible with r1.345.
The relevant codes are:
quanta.cpp: 1556 - 1572
toolbartabwidget.cpp & .h contains the KToolBar and QTabWidget derived
classes.
Andras
>
> Cheers,
> Waldo
- --
Quanta Plus developer - http://quanta.sourceforge.net
K Desktop Environment - http://www.kde.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE/BW6cTQdfac6L/08RAiqFAJ0Rq6Eie9aeA0YSdus5dMwCOZlLywCfb/kU
MNq64IplSJx9r91xmc4PaIY=
=0KMV
-----END PGP SIGNATURE-----
More information about the kde-core-devel
mailing list