]> git.saurik.com Git - wxWidgets.git/commitdiff
got rid of (unused since a long time) wxNO_3D and wxUSER_COLOURS
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 8 Jul 2003 22:23:54 +0000 (22:23 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 8 Jul 2003 22:23:54 +0000 (22:23 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21780 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/defs.h
src/msw/dc.cpp

index ce1fbb21ad3e2f2ac30da5dad2145742087ec10f..50e98c4c471cbec00ba0e434d97e5a6164e20d74 100644 (file)
@@ -967,19 +967,10 @@ enum wxBorder
 #define wxSTATIC_BORDER         wxBORDER_STATIC
 #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,
 // 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
-//     wxUSER_COLOURS/wxNO_3D, we reuse the same style value
+// NB: as this style is only supported by wxUniversal and wxMSW so far
 #define wxALWAYS_SHOW_SB        0x00800000
 
 // Clip children when painting, which reduces flicker in e.g. frames and
@@ -1075,7 +1066,10 @@ enum wxBorder
 
 // obsolete styles, unused any more
 #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
index 8caa96a2e7df9b950a12eac3346d7e5de65b9a66..a795a51b5e0f52b20a7a0fd6b8d23fbd4d4acfdf 100644 (file)
@@ -1399,40 +1399,9 @@ void wxDC::SetBackground(const wxBrush& brush)
 
     m_backgroundBrush = brush;
 
-    if (!m_backgroundBrush.Ok())
-        return;
-
-    if (m_canvas)
-    {
-        bool customColours = TRUE;
-        // 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();
+    if ( m_backgroundBrush.Ok() )
     {
-        (void)SetBkColor(GetHdc(), new_color);
+        (void)SetBkColor(GetHdc(), m_backgroundBrush.GetColour().GetPixel());
     }
 }