Hi there, Firstly - nice work - this looks promising, and sorry for the delay, things have been busy today with the 3.3.0 release. On Mon, 2011-01-24 at 19:39 +0100, xapantu wrote:
I have just made a patch to fix some glitch with GTK+: (see this bug: https://bugs.freedesktop.org//show_bug.cgi?id=32186)
Soo ... :-) I had a few comments / queries.
- Fix menubar root items (they was disabled, but they work well :) )
Interesting; it might be nice to capture the type that is, we already have a: ((nType == CTRL_MENUBAR) && ( (nPart==PART_ENTIRE_CONTROL) ) ) || in IsNativeControlSupported, can we just add another nPart to it, as in the other options ?
- Don't draw anything when a disabled menu is hovered: They was drawn using the native GUI engine, which provided bad integration. GTK+ just don't react when we move the cursor on disabled menu items (at least, on most themes), so, we just draw nothing now. (and if we should, drawing nothing for disabled menu is better than draw a bad integration for a menu *which is not used*).
Right; so - this was a fix for a crasher [ incidentally we should prolly dig out similar obsolete fixes in this code ]. Since it affects only the 5 year old Fedora Core 4 (that we know) with crux theme - I added a check like this: @@ -2731,9 +2731,10 @@ BOOL GtkSalGraphics::NWPaintGTKPopupMenu( const OUString& ) { // #i50745# gtk does not draw disabled menu entries (and crux theme - // even crashes), draw them using vcl functionality. - if( nPart == PART_MENU_ITEM && ! (nState & CTRL_STATE_ENABLED) ) - return FALSE; + // even crashes) in very old (Fedora Core 4 vintage) gtk's + if (gtk_major_version <= 2 && gtk_minor_version <= 8 && + nPart == PART_MENU_ITEM && ! (nState & CTRL_STATE_ENABLED) ) + return TRUE; Hopefully it does what we want and mitigates the risk :-)
- Fix background of GtkEntry/GtkSpinButton: gtk_paint_flat_box was used, just replace it by gtk_paint_box. gtk_paint_flat_box just draws a… flat rectangle, but the background can be rounded. So, on dark theme it could caused some glitchs (see screenshot).
That is fine.
- Fix GtkButton/GtkSpinButton background (and maybe some others widget) : In the code, we redrew the background before drawing the widgets, because they could be transparent, but it wasn't the good style for the background (widgets background instead of window background).
Hmm, that makes some sense - but it still concerns me ;-) I hope you know what you're doing.
This patch belongs to the libs-gui branch, vcl module.
I've pushed it - thanks so much ! if you're in that neck of the woods - do you test with larger theme font sizes ? :-) (cf. my attached toolbar ). Also - I assume your changes are under the LGPLv3+/MPL combination we recommend - can you confirm that ! oh, and if you could close the bug that'd be great too :-) Looking forward to seeing what you get up to next, Many thanks ! Michael. -- michael.meeks@novell.com <><, Pseudo Engineer, itinerant idiot
Attachment:
annoying.png
Description: PNG image