[maemo-developers] hildon_color_button & custom colors issue
From: Aniello Del Sorbo anidel at gmail.comDate: Tue Apr 15 21:16:24 EEST 2008
- Previous message: hildon_color_button & custom colors issue
- Next message: hildon_color_button & custom colors issue
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I reply to myself. I was testing the app running it from a remote SSH (root) and not from the user's Menu. It works. Thanks anyway. Aniello On Tue, Apr 15, 2008 at 5:50 PM, Aniello Del Sorbo <anidel at gmail.com> wrote: > Hi, > > while porting Xournal to Maemo I decided to give it as much hildonization > is possible. > Base xournal uses only a bunch of predefined colors (something like 9 or > 10 colors). > > I decided to use the hildon_color_button widget to give the user a much > wide choice of colors. > I get the GdkColor from the color button and have to convert it in RGBA > because Xournal only works with those values > (passing "fill-color-rgba" to the canvas items). It does this, I think, > for being able to make a highlighter tool available in different colors > (by making use of the alpha channel). > > anyway, I convert the GdkColor to RGBA using the macro: > > GdkColor *color; // read from the hildon_color widget > guint alpha = 0xFF; // no transparency > > guint rgba = GNOME_CANVAS_COLOR_A (color->red, color->green, color->blue, > alpha) > > and then use it wherever it is needed. > > This works for the predefined colors in the color chooser dialog. > But if I choose my own custom color it does not. > > If I use the GdkColor as is (thus passing "fill-color-gdk" to the canvas > items), it works, but I can't use the alpha channel (can I ?). > If I convert this custom color to RGBA with the given macro, it paints in > a totally different color. > > Is this some issue with the colormap ? > Is GNOME_CANVAS_COLOR_A not good for this ? > > Any other hints ? > > -- > anidel -- anidel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.maemo.org/pipermail/maemo-developers/attachments/20080415/ca40bc51/attachment.htm
- Previous message: hildon_color_button & custom colors issue
- Next message: hildon_color_button & custom colors issue
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]