After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 678176 - Alpha colour handling
Alpha colour handling
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: GUI
git master
Other All
: Low enhancement
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2012-06-15 15:34 UTC by Morten Welinder
Modified: 2012-08-01 13:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Initial patch (11.48 KB, patch)
2012-07-31 19:07 UTC, Jean Bréfort
none Details | Review
Updated patch (14.20 KB, patch)
2012-07-31 22:20 UTC, Morten Welinder
none Details | Review
Updated patch with alpha support in the toolbar. (14.68 KB, patch)
2012-08-01 06:59 UTC, Jean Bréfort
none Details | Review

Description Morten Welinder 2012-06-15 15:34:53 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.
Comment 1 Morten Welinder 2012-06-15 16:04:54 UTC
gnm_xml_out_add_gocolor looks ripe to move to goffice, gaining the ability
to save alpha when present.
Comment 2 Morten Welinder 2012-06-18 15:27:36 UTC
gnm_xml_out_add_gocolor [writing side] fixed.
Comment 3 Jean Bréfort 2012-07-31 14:04:16 UTC
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.
Comment 4 Morten Welinder 2012-07-31 14:40:09 UTC
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.
Comment 5 Jean Bréfort 2012-07-31 14:44:58 UTC
Most sheet objects use GOStyle, not GnmStyle, and they already support alpha.
Comment 6 Morten Welinder 2012-07-31 15:04:15 UTC
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.
Comment 7 Jean Bréfort 2012-07-31 16:14:02 UTC
OK, so what can I do to fix this bug?
Comment 8 Morten Welinder 2012-07-31 16:26:44 UTC
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?
Comment 9 Jean Bréfort 2012-07-31 19:07:40 UTC
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.
Comment 10 Morten Welinder 2012-07-31 22:20:04 UTC
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.
Comment 11 Morten Welinder 2012-07-31 22:23:05 UTC
oh, never mind.  I have it in the cell format dialog, but not from the
toolbar where it hasn't been turned on.
Comment 12 Jean Bréfort 2012-08-01 05:35:17 UTC
The toolbar uses GOActionComboColor which does not support alpha.
Comment 13 Jean Bréfort 2012-08-01 06:59:18 UTC
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).
Comment 14 Morten Welinder 2012-08-01 12:54:04 UTC
Looks cool.  I like for the renaming alone which is now most of it.

Please dump it in.
Comment 15 Jean Bréfort 2012-08-01 13:08:06 UTC
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.