From d0b223a1483141d4a6535af46141943f30e5a40b Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Wed, 16 Feb 2000 21:44:35 +0000 Subject: [PATCH] DrawLine normalized; wxStaticBitmap fixed for Dialog Editor git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- distrib/msw/generic.rsp | 1 + src/common/resource.cpp | 2 +- src/generic/sashwin.cpp | 20 ++++++++++---------- src/msw/dc.cpp | 4 +--- src/msw/statbmp.cpp | 3 ++- utils/dialoged/src/reseditr.cpp | 4 ++-- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/distrib/msw/generic.rsp b/distrib/msw/generic.rsp index b9c4079b66..a22375a3a8 100644 --- a/distrib/msw/generic.rsp +++ b/distrib/msw/generic.rsp @@ -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 diff --git a/src/common/resource.cpp b/src/common/resource.cpp index 98b983adf0..b162f9abcc 100644 --- a/src/common/resource.cpp +++ b/src/common/resource.cpp @@ -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 diff --git a/src/generic/sashwin.cpp b/src/generic/sashwin.cpp index b326c0caee..87a02961b8 100644 --- a/src/generic/sashwin.cpp +++ b/src/generic/sashwin.cpp @@ -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)); } } } diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index c6bd96b073..a3bbadbeec 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -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); diff --git a/src/msw/statbmp.cpp b/src/msw/statbmp.cpp index 909a09c532..2f54f08674 100644 --- a/src/msw/statbmp.cpp +++ b/src/msw/statbmp.cpp @@ -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, diff --git a/utils/dialoged/src/reseditr.cpp b/utils/dialoged/src/reseditr.cpp index 14166498d4..1e831519df 100644 --- a/utils/dialoged/src/reseditr.cpp +++ b/utils/dialoged/src/reseditr.cpp @@ -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") { -- 2.45.2