DrawLine normalized; wxStaticBitmap fixed for Dialog Editor

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2000-02-16 21:44:35 +00:00
parent 2aa59ef436
commit d0b223a148
6 changed files with 17 additions and 17 deletions

View 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

View 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

View 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));
}
}
}

View 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);

View 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,

View 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")
{