hsgg / lxpanel

Temporary branch of lxpanel fixes

Home Page:lxde.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add a bit more cairo drawing

galtgendo opened this issue · comments

Let's call this a second part of my patch.
This one simplifies panel background drawing a bit and fixes a subtle bug (try setting alpha to 255 - it gets saved as 254 without this fix).

The patch is in the same place the first one - on sourcefoge.

Unfortunately, it seems it's as far as it can go in gtk2.
For gtk3 some of the functions will need to be significantly rewritten.
I'm not talking simply about expose-event -> draw, panel_determine_background works on GdkPixmaps for the sake of gdk_window_set_back_pixmap - in gtk3, the closest to it is gdk_window_set_background_pattern, which takes a cairo_pattern_t. This means, that the converting will have to be done differently, to prevent going between GdkPixbuf and cairo_surface_t more than once and loosing info.