[wx-dev] inheritable colours again
Vadim Zeitlin
vadim at wxwindows.org
Sat Aug 5 15:54:29 PDT 2006
On Sun, 6 Aug 2006 08:38:07 +1000 (EST) Jamie Gadd <jrgadd2 at cs.latrobe.edu.au> wrote:
JG> On Sat, 5 Aug 2006, Vadim Zeitlin wrote:
JG>
JG> > I thought we fixed this problem already but as the thread starting from
JG> >
JG> > http://article.gmane.org/gmane.comp.lib.wxwindows.general/45397
JG> >
JG> > demonstrates, we didn't. Basically the problem is that it seems to be
JG> > currently impossible to make the background colour to apply to the window
JG> > and all of its children -- unlike, for example, foreground colour or font.
JG>
JG> It seems this change was done while correcting the notebook themes on XP.
JG>
JG> src/msw/notebook.cpp, rev 1.125 (Dec 13 2004) VZ:
JG> "implemented MSWGetBgBrush/ColourForChild() to propagate themed notebook
JG> background to children"
JG>
JG> src/common/wincmn.cpp, rev 1.212 (Dec 19 2004) VZ:
JG> "do not inherit background colour in InheritAttributes() as it totally
JG> breaks themed backgrounds"
Right, I should have mentioned this and avoid you the trouble of having to
search for it. But it had been also done, IIRC, before SetOwnBackgroundColour()
was added.
JG> > 3. Let SetBackgroundColour() behave as SetForegroundColour(), i.e. change
JG> > the colour for the window and all its descendants at once.
JG> >
JG> > + Allows to change the background for the entire panel/dialog at once
JG> > + All methods behave in consistent way
JG> > - Incompatible with the current behaviour
JG>
JG> + Compatible with the current documentation.
JG>
JG> This could be considered a bug fix.
JG>
JG> > What would you prefer? My order is probably 1,3,2. Or is there something
JG> > else/better to do?
JG>
JG> 3,1,2.
Taking into account your opinion and Kevin's remark about OS X (where,
apparently, it already behaves as if (3) were implemented) it looks like
(3) is indeed preferable.
Are there any objections to doing this post-2.7.0?
Thanks,
VZ
More information about the wx-dev
mailing list