]> git.saurik.com Git - wxWidgets.git/commitdiff
DrawLine normalized; wxStaticBitmap fixed for Dialog Editor
authorJulian Smart <julian@anthemion.co.uk>
Wed, 16 Feb 2000 21:44:35 +0000 (21:44 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Wed, 16 Feb 2000 21:44:35 +0000 (21:44 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

distrib/msw/generic.rsp
src/common/resource.cpp
src/generic/sashwin.cpp
src/msw/dc.cpp
src/msw/statbmp.cpp
utils/dialoged/src/reseditr.cpp

index b9c4079b6640666e8716b074cf013b4ebded259a..a22375a3a86d0af7b73d64e8ab878a2cdccbb2b5 100644 (file)
@@ -1055,6 +1055,7 @@ demos/fractal/*.ico
 demos/fractal/*.rc
 
 demos/life/*.cpp
+demos/life/*.inc
 demos/life/*.h
 demos/life/makefile*
 demos/life/*.rc
index 98b983adf0e1587c51277cad63ccba3b1717670c..b162f9abcc50402cff585fcc53c148f72c46fd25 100644 (file)
@@ -337,7 +337,7 @@ wxControl *wxResourceTable::CreateItem(wxWindow *parent, const wxItemResource* c
           }
           if (bitmap.Ok())
            control = new wxBitmapButton(parent, id, bitmap, pos, size,
-               childResource->GetStyle(), wxDefaultValidator, childResource->GetName());
+               childResource->GetStyle() | wxBU_AUTODRAW, wxDefaultValidator, childResource->GetName());
         }
         else
           // Normal, text button
index b326c0caee146038ca7150f65bcbc2da27c98a0f..87a02961b803c240eda359182d9beaf2d87febb4 100644 (file)
@@ -480,16 +480,16 @@ void wxSashWindow::DrawSash(wxSashEdgePosition edge, wxDC& dc)
         {
             if (edge == wxSASH_LEFT)
             {
-                // Draw a black line on the left to indicate that the
+                // Draw a dark grey line on the left to indicate that the
                 // sash is raised
-                dc.SetPen(blackPen);
+                dc.SetPen(mediumShadowPen);
                 dc.DrawLine(GetEdgeMargin(edge), 0, GetEdgeMargin(edge), h);
             }
             else
             {
-                // Draw a white line on the right to indicate that the
+                // Draw a light grey line on the right to indicate that the
                 // sash is raised
-                dc.SetPen(whitePen);
+                dc.SetPen(lightShadowPen);
                 dc.DrawLine(w - GetEdgeMargin(edge), 0, w - GetEdgeMargin(edge), h);
             }
         }
@@ -510,17 +510,17 @@ void wxSashWindow::DrawSash(wxSashEdgePosition edge, wxDC& dc)
         {
             if (edge == wxSASH_BOTTOM)
             {
-                // Draw a black line on the bottom to indicate that the
+                // Draw a light grey line on the bottom to indicate that the
                 // sash is raised
-                dc.SetPen(blackPen);
-                dc.DrawLine(0, h - GetEdgeMargin(edge), w, h - GetEdgeMargin(edge));
+                dc.SetPen(lightShadowPen);
+                dc.DrawLine(0, h - GetEdgeMargin(edge), w-1, h - GetEdgeMargin(edge));
             }
             else
             {
-                // Draw a white line on the top to indicate that the
+                // Draw a drak grey line on the top to indicate that the
                 // sash is raised
-                dc.SetPen(whitePen);
-                dc.DrawLine(0, GetEdgeMargin(edge), w, GetEdgeMargin(edge));
+                dc.SetPen(mediumShadowPen);
+                dc.DrawLine(1, GetEdgeMargin(edge), w-1, GetEdgeMargin(edge));
             }
         }
     }
index c6bd96b07331b62f3699491f0649220735b5c04a..a3bbadbeec809d9ffc81343e160b33f96d8be9d6 100644 (file)
@@ -360,10 +360,8 @@ void wxDC::DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2)
     (void)MoveToEx(GetHdc(), XLOG2DEV(x1), YLOG2DEV(y1), NULL);
     (void)LineTo(GetHdc(), XLOG2DEV(x2), YLOG2DEV(y2));
 
-    /* MATTHEW: [6] New normalization */
-#if WX_STANDARD_GRAPHICS
+    // Normalization: Windows doesn't draw the last point of the line
     (void)LineTo(GetHdc(), XLOG2DEV(x2) + 1, YLOG2DEV(y2));
-#endif
 
     CalcBoundingBox(x1, y1);
     CalcBoundingBox(x2, y2);
index 909a09c5325afee6f66e70241dba40d1dcbb3c57..2f54f08674ce4c368af38db30a08d7cc6600838d 100644 (file)
@@ -112,7 +112,8 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id,
                        (
                         classname,
                         wxT(""),
-                        winstyle | WS_CHILD | WS_VISIBLE | WS_DISABLED,
+                        // NOT DISABLED!!! We want to move it in Dialog Editor.
+                        winstyle | WS_CHILD | WS_VISIBLE, // | WS_DISABLED,
                         0, 0, 0, 0,
                         (HWND)parent->GetHWND(),
                         (HMENU)m_windowId,
index 14166498d43d6b92155859a374513cfa0c4433cc..1e831519df4f4b08b76741f3f14b497802901bc5 100644 (file)
@@ -1059,7 +1059,7 @@ bool wxResourceManager::CreatePanelItem(wxItemResource *panelResource, wxPanel *
       MakeUniqueName("button", buf);
       res->SetName(buf);
       if (isBitmap)
-        newItem = new wxBitmapButton(panel, -1, * m_bitmapImage, wxPoint(x, y), wxSize(-1, -1), 0, wxDefaultValidator, buf);
+        newItem = new wxBitmapButton(panel, -1, * m_bitmapImage, wxPoint(x, y), wxSize(-1, -1), wxBU_AUTODRAW, wxDefaultValidator, buf);
       else
         newItem = new wxButton(panel, -1, "Button", wxPoint(x, y), wxSize(-1, -1), 0, wxDefaultValidator, buf);
     }
@@ -1068,7 +1068,7 @@ bool wxResourceManager::CreatePanelItem(wxItemResource *panelResource, wxPanel *
       prefix = "ID_BITMAPBUTTON";
       MakeUniqueName("button", buf);
       res->SetName(buf);
-      newItem = new wxBitmapButton(panel, -1, * m_bitmapImage, wxPoint(x, y), wxSize(-1, -1), 0, wxDefaultValidator, buf);
+      newItem = new wxBitmapButton(panel, -1, * m_bitmapImage, wxPoint(x, y), wxSize(-1, -1), wxBU_AUTODRAW, wxDefaultValidator, buf);
     }
   else if (itemType == "wxMessage" || itemType == "wxStaticText")
     {