[FIX] Toolbars well positioned
Rafael Fernández López
ereslibre at kde.org
Fri Aug 22 18:04:52 BST 2008
Hi all,
I am really happy to announce a total fix of the toolbar positioning. After
having committed the way toolbars are saved in KDE (using the save/restore Qt
system for mainwindows), I was told by Maksim about the existence of this bug:
http://bugs.kde.org/show_bug.cgi?id=169580
OK. I could reproduce it, and it seemed the problem was of the kind:
Toolbar A | Toolbar B
- Icons bigger than 22x22. When restarting the app you were getting:
1st restart: Toolbar A | Toolbar B
2nd restart: Toolbar A | Toolbar B
...
- Same when you set only text, text alongside icons, or text under icons.
- With 22x22 and only icons everything worked smoothly.
After having worked with KDE sources and having reread absolutely everything
more than 4 times I couldnt find where the heck the bug was. It wasn't in KDE.
Now, I went to qt-copy, and generated a patch (fast) which is probably wrong
(as a fix directly), because it doesn't take in count if there is not enough
space for the toolbar.
What I wanted to demonstrate with this patch is that all toolbars positioning
problems are fixed. So the logic that is used on Qt for calculating the
starting point of a toolbar is wrong. Here, what I do is to simplify to the
extreme the beginning of the toolbar. This gives really interesting results.
Everything works perfectly.
I am also sending this to qt-bugs, but I am sorry I have tried to create a Qt
standalone app to reproduce this problem and I haven't succeeded.
However, now that I found the logic of Qt on toolbars seems to be the
"culprit", I will go further on this issue and will try to provide a patch to
Trolltech with a real fix, that can be directly applied on their repository.
After all this talk (and almost going to cry because of the finding :P), here
is the patch:
http://media.ereslibre.es/2008/08/qt-copy-toolbars-fix.diff
Regards,
Rafael Fernández López.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080822/7500ea94/attachment.sig>
More information about the kde-core-devel
mailing list