[wx-dev] Re: CanApplyThemeBorder()
Julian Smart
julian at anthemion.co.uk
Wed Jan 2 05:08:24 PST 2008
Vadim Zeitlin wrote:
> On Tue, 01 Jan 2008 16:42:53 +0000 Julian Smart <julian at anthemion.co.uk> wrote:
>
> JS> Whether a control already draws its theme, or whether the wxMSW
> JS> implementation should draw it explicitly, has nothing to do with the
> JS> platform-independent border styles in wxWidgets. It's entirely an
> JS> implementational detail.
>
> Ok, but then we should:
>
> a) rename this CanApplyThemeBorder() to MSWDrawsThemeBorder() or something
> like that to make it clear that it's MSW-specific
>
True...
> b) make it return false in wxControl as native controls do draw their
> (themed or not) border themselves
>
> shouldn't we?
>
But not all of them. Also I would have thought most new, custom
wxControl-derived classes will need themed borders.
> JS> Huh? No, you'll get the themed border if you specify wxBORDER_THEME if
> JS> it makes sense for the control - so, there won't be a border for a
> JS> wxStaticText, but there will be for a wxListBox or a wxRichTextCtrl. I
> JS> don't think there's a problem here.
>
> I think there is a big problem here. The border styles used to work
> consistently: you got default border if you didn't specify any border style
> and the given border if you used an explicit border style. With
> wxBORDER_THEME you get either themed border or no border at all depending
> on the control. I still believe that this a very bad idea and that it
> should work in exactly the same way as the other styles, i.e. draw the
> themed border if it's specified even for wxStaticText. The problem with
> CanApplyThemeBorder() might be unrelated (or at least secondary) to this
> one, but I still think that the current behaviour (as per your description
> above) is a problem.
>
I don't think we ever got a correctly drawn themed wxStaticText with
border (did we?) so I don't think we're any worse off than we were. But
I'm sure it would be easy to remedy. I'm just surprised you'd ever want
a border for a static text - I thought it was taken as correct behaviour
that some controls never ever had any borders. So we need to work out
what MSWDrawsThemeBorder should return for the static controls, since
I've no idea whether they draw their own themed border or not.
Regards,
Julian
--
Julian Smart, Anthemion Software Ltd.
28/5 Gillespie Crescent, Edinburgh, Midlothian, EH10 4HU
www.anthemion.co.uk | +44 (0)131 229 5306
Tools for writers: www.writerscafe.co.uk
wxWidgets RAD: www.anthemion.co.uk/dialogblocks
More information about the wx-dev
mailing list