Created attachment 40872 [details] Screenshot Currently, buttons are drawn on a background to take alpha-enabled buttons into account. Here's how it's done (clone/libs-gui/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx" line 1225): // Buttons must paint opaque since some themes have alpha-channel enabled buttons gtk_paint_flat_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_NONE, &clipRect, m_pWindow, "base", x, y, w, h ); This fails for themes with non-white background. In this case a rectangle of non-background color is seen around the button on the startup window, as in the screenshot attached. Of course, this looks ugly. A fix would be to trigger native repaint of background before drawing the button instead of calling gtk_paint_flat_box().
Created attachment 42314 [details] This patch remove the problem This code is useless IMO. The comments before the code to draw the background says that a button can be transparent, but I think it is false, gtk only supports rgb, not rgba (it was a project, but it has been abandonned). So, please apply the patch, the buttons look really better: without the patch: http://pix.toile-libre.org/upload/original/1295720276.png (take a look at the buttons borders) with it: http://pix.toile-libre.org/upload/original/1295720242.png Since Ubuntu 11.04 will have LO by default, with the theme I showed in the screenshot (maybe not *exactly* the same theme, but it will look like it), it would be better if we could not have this glitch ^^.
(In reply to comment #1) In fact, what this patch does was first what i tried - just removing these lines. But: 1. This doesn't work when a button had glow when prelit, then became pressed (and shouldn't have any glow in pressed state), but here's what i get: http://simplest-image-hosting.net/png-0-shot-040 2. > button can be transparent, but I think it is false, gtk only > supports rgb, not rgba (it was a project, but it has been abandonned). You're wrong. Oxygen supports ARGB pretty well. In fact, one can make internal images (GdkPixbuf's, cairo surfaces) have alpha channel as well as windows. See, e.g. oxygen-gtk engine (notice smooth menus corners and translucent tooltips (not for blacklisted apps for now though)). The screenshot above proves this. Also see this: http://mikehearn.wordpress.com/2006/03/26/gtk-windows-with-alpha-channels/ Conclusion: there should be call to invalidate the rectangle to draw native background first, before drawing the button.
Hum, yes, sorry, my patch was wrong. I understand the problem now. We try to repain the base of the current button, but not the base of the window, so, it doesn't work. I am making another patch, and I am quite sure it will work fine :) Sorry for the inconvenience :/
Created attachment 42317 [details] Fix some gtk widgets problem. So, here is the patch, now, I am sure it should work. We repaint the background of the window, not the background of the button (which is not properly set). It also imacted scrollbars, and listbox. There is still some issue with the "home page" of Libre Office, since it repaints the window background, which doesn't always equal the "home page" background (which is white).
So, for comparison, I made some screenshots: http://pix.toile-libre.org/upload/original/1295729745.png At left, Libre Office "hacked", and at right, the standard one.
Created attachment 42335 [details] Here is a screenshot of the improvements I made
Created attachment 42336 [details] the patch Please apply it, I think it doesn't cause any regressions. And if it causes a regression, I think it is a lot better now with most of the theme, like clearlooks (default gnome theme), or Ambiance (default Ubuntu theme).
Created attachment 42337 [details] Comparison between LO/LO patched/Standard GTK Again, the screenshot of the improvements I made, sorry, it is the first time I use bugzilla -.-
Latest patch (from comment #7) really makes most widgets look more as they should look, including menus which were broken since some openoffice version. But entries are now broken: http://simplest-image-hosting.net/png-0-shot-081
(In reply to comment #9) > Latest patch (from comment #7) really makes most widgets look more as they > should look, including menus which were broken since some openoffice version. > But entries are now broken: http://simplest-image-hosting.net/png-0-shot-081 Oh, well, not entries - i mean spinboxes.
assigning to caolan ( I think he would be interested ) :-)
Lucas - great work ! :-) normally, we expect patches to get sent to the dev mailing list: that is the best way to get wide review. Noel assigned this to Caolan - but I could review it (eg.). Can you confirm, that you are taking the semantics of paint_flat_box / paint_box etc. from reading the gtk+ theme code more carefully than the original author ? :-) Any chance you could test with the MeeGo theme - which does some very odd things to menu styles / coloring; cf. http://www.gnome.org/~michael/moblin-gtk-engine-1.2.3.tar.gz :-) If so - we should merge this.
*** Bug 33473 has been marked as a duplicate of this bug. ***
By private mail from Lucas: [snip] > Also - I assume your changes are under the LGPLv3+/MPL combination we > > recommend - can you confirm that ! Yes, they are under LGPLv3+/MPL. [/snip] just for the records :-)
fixes committed to master; I'm slightly nervous about putting them into 3.3.0 - but they'll be in 3.4.0 - coming soon; cf. http://wiki.documentfoundation.org/ReleasePlan
I am not sure if this can be fixed the same way as the glitch with the buttons, but I noticed that there are still some issues with the Ambiance theme. There is a 1px border and even thnative-gtk look differs from that. See for reference: http://dl.dropbox.com/u/12598822/LOmenu.png http://dl.dropbox.com/u/12598822/LOmenu2.png
Re-opening a four month closed bug for a similar bug is a bad idea, please open a new bug for the other problem please.