Remove the test for parent window type when checking if to give a

sunken style automatically


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@21184 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-06-16 22:08:01 +00:00
parent 2a15016acd
commit f30d4a7421

View File

@@ -1164,25 +1164,24 @@ WXDWORD wxWindowMSW::MSWGetStyle(long flags, WXDWORD *exstyle) const
style |= WS_HSCROLL; style |= WS_HSCROLL;
wxBorder border = (wxBorder)(flags & wxBORDER_MASK); wxBorder border = (wxBorder)(flags & wxBORDER_MASK);
// Check if we want to automatically give it a sunken style. // Check if we want to automatically give it a sunken style.
// Note than because 'sunken' actually maps to WS_EX_CLIENTEDGE, which // Note than because 'sunken' actually maps to WS_EX_CLIENTEDGE, which
// is a more neutral term, we don't necessarily get a sunken effect in // is a more neutral term, we don't necessarily get a sunken effect in
// Windows XP. Instead we get the appropriate style for the theme. // Windows XP. Instead we get the appropriate style for the theme.
if (border == wxBORDER_DEFAULT && wxTheApp->GetAuto3D() && if (border == wxBORDER_DEFAULT && wxTheApp->GetAuto3D() &&
IsKindOf(CLASSINFO(wxControl)) && IsKindOf(CLASSINFO(wxControl)) &&
GetParent() && (GetParent()->IsKindOf(CLASSINFO(wxPanel)) || GetParent() &&
GetParent()->IsKindOf(CLASSINFO(wxDialog))) &&
((GetParent()->GetWindowStyleFlag() & wxUSER_COLOURS) != wxUSER_COLOURS)) ((GetParent()->GetWindowStyleFlag() & wxUSER_COLOURS) != wxUSER_COLOURS))
{ {
border = (wxBorder)((flags & wxBORDER_MASK) | wxBORDER_SUNKEN); border = (wxBorder)((flags & wxBORDER_MASK) | wxBORDER_SUNKEN);
} }
// Only give it WS_BORDER for wxBORDER_SIMPLE // Only give it WS_BORDER for wxBORDER_SIMPLE
if (border & wxBORDER_SIMPLE) if (border & wxBORDER_SIMPLE)
style |= WS_BORDER; style |= WS_BORDER;
// now deal with ext style if the caller wants it // now deal with ext style if the caller wants it
if ( exstyle ) if ( exstyle )
{ {