got rid of (unused since a long time) wxNO_3D and wxUSER_COLOURS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21780 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -967,19 +967,10 @@ enum wxBorder
|
|||||||
#define wxSTATIC_BORDER wxBORDER_STATIC
|
#define wxSTATIC_BORDER wxBORDER_STATIC
|
||||||
#define wxNO_BORDER wxBORDER_NONE
|
#define wxNO_BORDER wxBORDER_NONE
|
||||||
|
|
||||||
// Override CTL3D etc. control colour processing to allow own background
|
|
||||||
// colour.
|
|
||||||
// Override CTL3D or native 3D styles for children
|
|
||||||
#define wxNO_3D 0x00800000
|
|
||||||
|
|
||||||
// OBSOLETE - use wxNO_3D instead
|
|
||||||
#define wxUSER_COLOURS wxNO_3D
|
|
||||||
|
|
||||||
// wxALWAYS_SHOW_SB: instead of hiding the scrollbar when it is not needed,
|
// wxALWAYS_SHOW_SB: instead of hiding the scrollbar when it is not needed,
|
||||||
// disable it - but still show (see also wxLB_ALWAYS_SB style)
|
// disable it - but still show (see also wxLB_ALWAYS_SB style)
|
||||||
//
|
//
|
||||||
// NB: as this style is only supported by wxUniversal so far as it doesn't use
|
// NB: as this style is only supported by wxUniversal and wxMSW so far
|
||||||
// wxUSER_COLOURS/wxNO_3D, we reuse the same style value
|
|
||||||
#define wxALWAYS_SHOW_SB 0x00800000
|
#define wxALWAYS_SHOW_SB 0x00800000
|
||||||
|
|
||||||
// Clip children when painting, which reduces flicker in e.g. frames and
|
// Clip children when painting, which reduces flicker in e.g. frames and
|
||||||
@@ -1075,7 +1066,10 @@ enum wxBorder
|
|||||||
|
|
||||||
// obsolete styles, unused any more
|
// obsolete styles, unused any more
|
||||||
#define wxDIALOG_MODAL 0x0020 // free flag value 0x0020
|
#define wxDIALOG_MODAL 0x0020 // free flag value 0x0020
|
||||||
#define wxDIALOG_MODELESS 0x0000
|
#define wxDIALOG_MODELESS 0
|
||||||
|
#define wxNO_3D 0
|
||||||
|
#define wxUSER_COLOURS 0
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MDI parent frame style flags
|
* MDI parent frame style flags
|
||||||
|
@@ -1399,40 +1399,9 @@ void wxDC::SetBackground(const wxBrush& brush)
|
|||||||
|
|
||||||
m_backgroundBrush = brush;
|
m_backgroundBrush = brush;
|
||||||
|
|
||||||
if (!m_backgroundBrush.Ok())
|
if ( m_backgroundBrush.Ok() )
|
||||||
return;
|
|
||||||
|
|
||||||
if (m_canvas)
|
|
||||||
{
|
{
|
||||||
bool customColours = TRUE;
|
(void)SetBkColor(GetHdc(), m_backgroundBrush.GetColour().GetPixel());
|
||||||
// If we haven't specified wxUSER_COLOURS, don't allow the panel/dialog box to
|
|
||||||
// change background colours from the control-panel specified colours.
|
|
||||||
if (m_canvas->IsKindOf(CLASSINFO(wxWindow)) && ((m_canvas->GetWindowStyleFlag() & wxUSER_COLOURS) != wxUSER_COLOURS))
|
|
||||||
customColours = FALSE;
|
|
||||||
|
|
||||||
if (customColours)
|
|
||||||
{
|
|
||||||
if (m_backgroundBrush.GetStyle()==wxTRANSPARENT)
|
|
||||||
{
|
|
||||||
m_canvas->SetTransparent(TRUE);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// New behaviour, 10/2/99: setting the background brush of a DC
|
|
||||||
// doesn't affect the window background colour. However,
|
|
||||||
// I'm leaving in the transparency setting because it's needed by
|
|
||||||
// various controls (e.g. wxStaticText) to determine whether to draw
|
|
||||||
// transparently or not. TODO: maybe this should be a new function
|
|
||||||
// wxWindow::SetTransparency(). Should that apply to the child itself, or the
|
|
||||||
// parent?
|
|
||||||
// m_canvas->SetBackgroundColour(m_backgroundBrush.GetColour());
|
|
||||||
m_canvas->SetTransparent(FALSE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
COLORREF new_color = m_backgroundBrush.GetColour().GetPixel();
|
|
||||||
{
|
|
||||||
(void)SetBkColor(GetHdc(), new_color);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user