Re: Colors
- From: Liam R E Quin <liam holoweb net>
- To: Przemysław Sitek <psitek rams pl>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Colors
- Date: Sat, 03 Sep 2005 12:39:36 -0400
On Sat, 2005-09-03 at 11:08 +0200, Przemysław Sitek wrote:
I am writing a widget that draws a custom background under its
child. I do this by subclassing GtkEventBox (since it has its own
window) and overwriting expose virtual method. How can I get background
color (or base color) ina a "selected" state (I want background to be
drawn in that color).
Not an answer (sorry) but a caution --
* make sure that a user whose theme has white text on a black background
can still read your widget's text.
* make sure that a user who needs reduced contrast is not presented
with black and white, but the appropriate greys.
* remember to handle the case that the window is partially obscured
and loses focus
Having said all that, it sounds like really you could just use the
widget's style.
But do ask yourself why you are doing this. If it's to draw the
user's attention to something maybe it should be an alert box. If
it's for decoration, better not to do it :-) If it's for displaying
a colour swatch, there's already a widget for that.
Best,
Liam
--
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org www.advogato.org
Liam on the Web: http://www.holoweb.net/~liam/
- Follow-Ups:
- Re: Colors
- From: =?ISO-8859-2?Q?Przemys=B3aw_Sitek?=
- References:
- Colors
- From: =?ISO-8859-2?Q?Przemys=B3aw_Sitek?=
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]