Bug 141125
Description
Peter Backlund
2004-11-29 15:13:37 UTC
Created attachment 107535 [details] Patch to fix things listed in comment #1 Created attachment 107575 [details]
New version or rh-aw patch, fixes menubar text spacing (needs QT patch)
Created attachment 107576 [details]
Adds a GtkStyle to qnamespace.h for Gtk-specific drawing
I've submitted two patches to enable the QT menubar to be drawn exactly like the Gtk one. Look at http://mozer.nailed.org/misc/both.png Old QT (rh-aw 0.97) on the left, QT with these patches in the middle, and Gtk on the right. Also, I've found two more differences: - The checkmark pixmap has i slightly "rounded" right leg in Gtk, but it's completely straight in QT (minor detail though) - The checkmark turns white when item is hovered in Gtk, but stays black in QT. Created attachment 107914 [details]
Updated QT patch to draw sub-popupmenus more like Gtk
Created attachment 107915 [details]
A few more details fixed, see screenshot mentioned in a later comment
I've submitted new versions of the patches today, which fixes 4 things that you can see in this screenshot: http://mozer.nailed.org/misc/qt.png 1. No double line between up-arrow button and scrollbar slider, and the colors on the slider handle are corrected. 2. The color of the separator and the margin to the edges is corrected. 3. The sub-popupmenu "overlap" has been reduced, and the right-arrows are in the correct place. The overlap is still not exactly like Gtk, but it's the best I could do with a non-invasive patch to QT. 4. Nearly correct checkmarks and checkmark margins, including highlighting on mouseover. The checkmarks probably need to be masked somehow, I still haven't figured out exactly how. Taking this bug as my own. Thanks a lot, Peter, for your work as well as for the detailed analyis. I'll test the Bluecurve changes and probably roll them into my own branch as soon as I can. I have to admit that patching Qt (even just to change the static const int declarations) doesn't seem very good to me. It'd be nice if the QStyle API allowed us to customize the QMenuBar more. Hopefully, in Qt4... Have you done any work on the KWin theme yet? I haven't tackled that one yet myself. Hi. The changes to Qt are not really changes, but additions. The modifications will _only_ affect those styles that return GtkStyle when asked about SH_GUIStyle, which at this point only includes Bluecurve. Existing styles won't notice any difference. That kind of "loophole" would be useful for all sorts of Gtk-compability rendering inside Qt, the same way MotifStyle and WindowsStyle is used now. I know that Novell are working on a QIndustrial style, which would benefit from this as well. About KWin: no, I haven't looked at it at all yet. Maybe later. The scrollbar code is not very good right now, and has some weird bugs in certain situations, but I included it anyway just to get an idea of what it should look like. /Peter Ehum, that should be "compatibility" of course... Created attachment 109927 [details] More fixes This patch fixes QSpinWidget, QComboBox and QWidgetStack. Look at http://petrix.se/fedora/qtconfig.png 1. Black and white frame. 2. Up and down arrows are correct size and position. 3. Down arrow button is correct size, and arrow is correctly positioned. Compare this to http://petrix.se/fedora/qtconfig_fc3.png Also, three more things: 1. A pushed button now has the normal background color #e6e6e6, instead of the earlier Qt style where it had a highlighted color. This is however different from the Gtk style, where the button background is darked than normal. I'd like to propose that the Gtk style adapts this look for the pushed button, since it makes the 3d effect symmetrical. 2. Qt has support for Gtk style ComboBox popups, but there is a bug in Qt where the combo box button is disabled if you click outside the popup menu. I'll look into this if I have the time. You can try by un-commenting "case SH_ComboBox_Popup:" on line 2611. 3. I've added a special checkmark pixel array in bits.cpp, to make it look like the Gtk checkmark (in a PopupmenuItem, not checkbox). It's not perfect yet, though. Created attachment 110073 [details] New version, with button fixes Fixed text and pixmap positioning on buttons, and button size. Old look: http://petrix.se/fedora/old_kde_buttons.png New look: http://petrix.se/fedora/new_kde_buttons.png More convenient to look at: http://petrix.se/fedora/kde_buttons.html Created attachment 110094 [details]
Yet another version, with scrollbar and button fixes
This patch fixes highlighting on mouseover on scrollbars, and eliminates a
double line between the slider and the up/down button when the slider is in
either extreme position.
The pixmap/text positioning has been slightly improved as well, and is now
completely symmetrical.
I'll post new screenshots with complete coverage soon.
Created attachment 110285 [details] New version Even more fixes, and an overview page with screenshots: http://petrix.se/fedora/bluecurve Chris, is there a cvs snapshot of Qt Bluecurve with any of my fixes in it, so that I can start patching against something newer? Current TODO list: - The KDE Midlight and Dark colors are different from Qt's, making mouseover highlihgt and pressed buttons look bad. - The lower right corner grab is different. - No mouseover highlight of the splitter bar. - The menutiem checkmark isn't perfect either. And a few minor things. Peter, thanks for your great work here. Chris how can i get access to your cvs? Awesome! Thank you very much Peter! No sighting of any of this in Rawhide yet? I have a few small additions, such as the pushed scollbar arrow buttons. Any CVS snapshot available? Peter, new redhat-artworks will be built in fc4 tree today, your fix is included in this release. Thanks for your patch. That's good to hear, I'll open a new bug and submit patches against that build then. Any news on getting a Gtk mode into Qt 3.4, for the suggested Qt changes? the gtkstyle patch is included in qt-3.3.4-10. Fedora Core 3 is now maintained by the Fedora Legacy project for security updates only. If this problem is a security issue, please reopen and reassign to the Fedora Legacy product. If it is not a security issue and hasn't been resolved in the current FC5 updates or in the FC6 test release, reopen and change the version to match. Thank you! Considering that both of the patches were applied in time for FC4, I'm closing this. Thanks for your help, Peter! |