[REVIEWED] GTK theming: tab prelight

Ruslan Kabatsayev b7.10110111 at gmail.com
Thu May 31 04:22:51 PDT 2012


Hello,

On Thu, May 31, 2012 at 3:08 PM, Michael Meeks <michael.meeks at suse.com> wrote:
>
>        Yep - so; I'm rather less sure about this patch. If I run gedit, I get
> no pre-lighting behaviour for tabs, and while I can see the attraction
> of a prelight, it makes rather a startling and (IMHO) unpleasant effect
> at least with my default theme - since the tab is rendered as if it is
> in the foreground behind the others, there is a rectangular cut-off
> there that looks a tad unpleasant, cf. the attached.

OK, I was expecting that some themes might appear to look bad.
I have another way of implementing prelight, namely, pass a GObject
data indicating that the tab should be prelit.
This would look like this
"g_object_set_data(G_OBJECT(gdkDrawable),"LibreOffice tab is
prelit",TRUE);", then after calling style paint method, do
g_obect_steal_data() with this key.
This way, the themes which are unaware of this data, won't render any
tab prelight, while those which are, will draw it nicely.

>
>        Is there a better way to achieve the same end ? :-) (and/or any nice
> pictures of your preferred theme)

Here's the screenshot of how this looks with oxygen-gtk (git branch
"libreoffice"):
http://simplest-image-hosting.net/png-0-screenshot-05282012-031111-pm
Toolbars tab is prelit.

(Bg gradient is drawn thanks to another patch, and yet some patches
are waiting to be sent)

Regards,
Ruslan


More information about the LibreOffice mailing list