GNOME Bugzilla – Bug 678176
Alpha colour handling
Last modified: 2012-08-01 13:08:06 UTC
I am fixing style_color_new_gdk so that it will not drop the alpha channel. We seem to have other issues not unlike that. For example, in dialog-cell-format.c function border_get_mstyle, we appear to drop alpha. Basically any style_color_new_i{8,16} and maybe style_color_new_pango is suspect. Most come from legacy file formats which do not have alpha, so they're safe.
gnm_xml_out_add_gocolor looks ripe to move to goffice, gaining the ability to save alpha when present.
gnm_xml_out_add_gocolor [writing side] fixed.
What needs to be done here? Actually, the alpha channel is not used as far as I know, and I don't see why we should ever use it.
We aren't using it, but maybe we should. I don't see a reason why a sheet object shouldn't use alpha, for example.
Most sheet objects use GOStyle, not GnmStyle, and they already support alpha.
That's great. The changes mentioned above are really just of the nature that I hate to see (say) xml-writing code make the decision to throw away the alpha channel. I don't know if you're right that nothing in GnmStyle will ever need alpha, but if we have a patterned background, I don't see why a semi-transparent font wouldn't make sense.
OK, so what can I do to fix this bug?
My plan was to turn on the alpha selector in the font color dialog (maybe only when gnm_debug_flag("alpha") for now) and see what breaks and what works. Can we save that? Can we reload it? Does it actually get drawn with alpha?
Created attachment 220019 [details] [review] Initial patch I did not serach whether other formats support alpha, just put 0xff on import for now. We should also add alpha support to GOActionComboColor.
Created attachment 220029 [details] [review] Updated patch This version creates both style_color_new_rgb8 and style_color_new_rgba8. I don't actually get anything with which I can select alpha, but that sounds like a goffice or gtk+ problem.
oh, never mind. I have it in the cell format dialog, but not from the toolbar where it hasn't been turned on.
The toolbar uses GOActionComboColor which does not support alpha.
Created attachment 220036 [details] [review] Updated patch with alpha support in the toolbar. You need the latest goffice in order to build with this patch (I added alpha support to GOActionComboColor).
Looks cool. I like for the renaming alone which is now most of it. Please dump it in.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.