Re: Color Select





Ah.... nevermind. I have found my bug. I had a guchar->gdouble conversion
that was happening in the wrong place during a divide and as a result I
was either getting 1 or 0 and nothing in between... It works just fine
now...

Thanks anyway.

-Christopher
cpa ece cmu edu




On Mon, 17 Sep 2001, Black wrote:



On 17 Sep 2001, Havoc Pennington wrote:


Black <cpa ece cmu edu> writes: 
  However, my first problem is with the behavior of the color
selector. Why doesn't the wheel colors darken with the bar next to it? I
fired up gimp, which uses this same color selector and noticed that that
one had the same problem, so I assume there isn't a work around for
this...

That's just how it works, the colors in the wheel always stay at full
value so you can see them even if you are at a low value.
 
  My second problem is not as obvious, however. When I open the
selector, I disable the spinners. However, I still want to be able to
"pick up" colors with the mouse. I tried to reset the open selector with
the same gtk_color_selection_set_color(), but now it just turns black, no
matter what color I've picked. Why would this work before I show it and
not after? Is there something I'm missing? Any help would be greatly
appreciated...

I'm not sure what you're asking here. You call
gtk_widget_set_sensitive() on the spinners, and then you can't
drag-and-drop?

I'll try again... The gtk_widget_set_sensitive() doesn't have anything to
do with my problem really...

Okay, the paint app has two main modes. In one, I can set the color by
setting it on the spinners, or I can grab a color with the mouse from the
drawing area (i.e. read the rgb values of the pixel and use them to set my
brush color). 

Alternativly, the user can open up a window with the color selector in it.
This disables the spinners (since they aren't needed). However, If the
user is drawing with the color select window open, I'd still like to be
able to use the mouse to grab colors from the drawing area, and have the
color select change to reflect that. The pixel read still sets the brush
color, I jsut can't get the color select to update to reflect the change.
I tried to use gtk_color_selection_set_color() with the new color (which
is how I set the inital color that the color select shows when it opens),
but gtk_color_selection_set_color() doesn't seem to work after the color
select window is open. It does change, it just changes to black every
time.


-Christopher
cpa ece cmu edu


_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]