[gtk-list] Re: changing a widget's background
- From: andrew cogent ca
- To: gtk-list redhat com
- Subject: [gtk-list] Re: changing a widget's background
- Date: Tue, 27 Apr 1999 12:04:28 -0400 (edt)
Owen Taylor writes:
[...]
Thanks for the code snippet. I will replace what we have with the
more robust function you sent.
> For a drawing area, for example, the simplest way is simply
> going to be:
>
> gtk_widget_realize (darea);
> gdk_window_set_background (darea->window, &color);
Certainly in my case, I wanted a mechanism for changing colors that is
independent of the widget type. I am trying to create a GUI builder
in GTK that can be applied to SCADA systems. It is unreasonable for a
plant engineer who wants to create a representation of his process to
have to deal with the philosophy of global customization, or the
differentiation between what GDK knows and what GTK knows.
For much the same reason, a GUI builder for a non-programmer will have
to entirely avoid any of the packing containers, and go with only the
GtkFixed container type. While the GTK+ container model is
interesting and quite powerful, it is a complete mind-blast for
anybody who has worked with virtually any other GUI builder on the
planet.
> [ Standard disclaimer: changing the color scheme (or fonts) of your
> widgets is generally a bad idea, except in unusual circumstances.
>
> - You are overriding the user's preferences, and possibly ending
> up with an illegible result.
>
> - It's just bad graphics design to have a bunch of different fonts
> and colors.
> ]
As above, some programs just don't want to know about user
preferences. Alarms are red, good process states are green (or
whatever colors that particular plant's safety folks say they are).
Regards,
Andrew
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]