Re: gnome canvas and gtk menu questions
- From: John Heidemann <johnh isi edu>
- To: Michael Meeks <michael ximian com>
- Cc: gnome-devel-list gnome org
- Subject: Re: gnome canvas and gtk menu questions
- Date: Fri, 20 Jun 2003 11:31:07 -0700
On 20 Jun 2003 17:41:02 BST, Michael Meeks wrote:
> I guess gnome-love gnome org is more appropriate for this kind of
>thing.
Ok, if you say so. It's very hard for an outsider to tell what
mailing list goes to what.
(For example, there's no mention of mailing lists at all
at http://developer.gnome.org/.)
>On Thu, 2003-06-19 at 05:39, John Heidemann wrote:
>> - I miss the smoothed polygons from Tk's polygon option.
>
> Do you mean anti-aliasing ? if so - the canvas has a mode which you can
>turn on to do that (one of the initial shady design decisions).
No, I mean making the polygon faces be bezier curves rather than
straight lines. (Just like in Tk's canvas' itemconfigure -smooth true
on a Tk canvas polygon.)
>> - I want to change the color of a menu item, all the time, to indicate
>
> Mostly this is a terrible idea; IMHO it's a feature that it's hard to
>do.
>
>> Any suggestions about how to change the color of a single menu item?
>> Is this a style/theming problem? (I want to control just one menu
>> entry. I'm happy to let theming work for all the other parts of the
>> menu.)
>
> So what color do you want to set it to ? what if the theme uses that
>color for the background ? will a different coloured menu give the user
>the heebie jeebies - given that no other app does this sort of evilness
>;-)
In general, I would agree with you. But this app has a very specific
reason to do this: when you click on a blob, it represents a process
on your system, and you get a menu that lets you send signals to the
process. That process has a color, keyed to the name of the process.
The menu needs to have visual feedback to indicate that it's working
on the process you want, not something else.
But don't take my word for it, download the Tcl/Tk lavaps code or RPM
from my web page and try it out.
>> - I also want to change the *text* of the menu item dynamically.
>> Unfortunately, I don't see any API to change the label of an existing
>> menu entry. (I would guess gtk_menu_item_set_label.)
>
> Cast GTK_BIN(menu_item)->child to a GTK_LABEL and poke at that.
Thanks--I'll try that out. Although, I must say, that's not the most
intuitive (or type-safe) API.
That probably also solves my background color problem. How do I
change the background color of a label widget? (So far I can only
change the foreground/text color.)
(As with menus, I tried all combinations of
gtk_widget_modify_{base,fg,bg} and
GTK_STATE_{NORMAL,ACTIVE,PRELIGHT,SELECTED}.)
>> But that's *exactly* what I want to do. I'm happy to resize the
>> embedded canvas widget.
>
> Then simply ensure that your canvas requests a really small size; like
>2x2 - and you can fiddle with it on 'size_allocate'. It's a bad idea to
>allocate less than the request I'm sure.
Ok, I suppose. The original (now deprecated) gtk_window_set_policy()
API seems a lot cleaner, though, don't you think?
-John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]