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:
@@ -1055,6 +1055,7 @@ demos/fractal/*.ico
|
|||||||
demos/fractal/*.rc
|
demos/fractal/*.rc
|
||||||
|
|
||||||
demos/life/*.cpp
|
demos/life/*.cpp
|
||||||
|
demos/life/*.inc
|
||||||
demos/life/*.h
|
demos/life/*.h
|
||||||
demos/life/makefile*
|
demos/life/makefile*
|
||||||
demos/life/*.rc
|
demos/life/*.rc
|
||||||
|
@@ -337,7 +337,7 @@ wxControl *wxResourceTable::CreateItem(wxWindow *parent, const wxItemResource* c
|
|||||||
}
|
}
|
||||||
if (bitmap.Ok())
|
if (bitmap.Ok())
|
||||||
control = new wxBitmapButton(parent, id, bitmap, pos, size,
|
control = new wxBitmapButton(parent, id, bitmap, pos, size,
|
||||||
childResource->GetStyle(), wxDefaultValidator, childResource->GetName());
|
childResource->GetStyle() | wxBU_AUTODRAW, wxDefaultValidator, childResource->GetName());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
// Normal, text button
|
// Normal, text button
|
||||||
|
@@ -480,16 +480,16 @@ void wxSashWindow::DrawSash(wxSashEdgePosition edge, wxDC& dc)
|
|||||||
{
|
{
|
||||||
if (edge == wxSASH_LEFT)
|
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
|
// sash is raised
|
||||||
dc.SetPen(blackPen);
|
dc.SetPen(mediumShadowPen);
|
||||||
dc.DrawLine(GetEdgeMargin(edge), 0, GetEdgeMargin(edge), h);
|
dc.DrawLine(GetEdgeMargin(edge), 0, GetEdgeMargin(edge), h);
|
||||||
}
|
}
|
||||||
else
|
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
|
// sash is raised
|
||||||
dc.SetPen(whitePen);
|
dc.SetPen(lightShadowPen);
|
||||||
dc.DrawLine(w - GetEdgeMargin(edge), 0, w - GetEdgeMargin(edge), h);
|
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)
|
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
|
// sash is raised
|
||||||
dc.SetPen(blackPen);
|
dc.SetPen(lightShadowPen);
|
||||||
dc.DrawLine(0, h - GetEdgeMargin(edge), w, h - GetEdgeMargin(edge));
|
dc.DrawLine(0, h - GetEdgeMargin(edge), w-1, h - GetEdgeMargin(edge));
|
||||||
}
|
}
|
||||||
else
|
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
|
// sash is raised
|
||||||
dc.SetPen(whitePen);
|
dc.SetPen(mediumShadowPen);
|
||||||
dc.DrawLine(0, GetEdgeMargin(edge), w, GetEdgeMargin(edge));
|
dc.DrawLine(1, GetEdgeMargin(edge), w-1, GetEdgeMargin(edge));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -360,10 +360,8 @@ void wxDC::DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2)
|
|||||||
(void)MoveToEx(GetHdc(), XLOG2DEV(x1), YLOG2DEV(y1), NULL);
|
(void)MoveToEx(GetHdc(), XLOG2DEV(x1), YLOG2DEV(y1), NULL);
|
||||||
(void)LineTo(GetHdc(), XLOG2DEV(x2), YLOG2DEV(y2));
|
(void)LineTo(GetHdc(), XLOG2DEV(x2), YLOG2DEV(y2));
|
||||||
|
|
||||||
/* MATTHEW: [6] New normalization */
|
// Normalization: Windows doesn't draw the last point of the line
|
||||||
#if WX_STANDARD_GRAPHICS
|
|
||||||
(void)LineTo(GetHdc(), XLOG2DEV(x2) + 1, YLOG2DEV(y2));
|
(void)LineTo(GetHdc(), XLOG2DEV(x2) + 1, YLOG2DEV(y2));
|
||||||
#endif
|
|
||||||
|
|
||||||
CalcBoundingBox(x1, y1);
|
CalcBoundingBox(x1, y1);
|
||||||
CalcBoundingBox(x2, y2);
|
CalcBoundingBox(x2, y2);
|
||||||
|
@@ -112,7 +112,8 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id,
|
|||||||
(
|
(
|
||||||
classname,
|
classname,
|
||||||
wxT(""),
|
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,
|
0, 0, 0, 0,
|
||||||
(HWND)parent->GetHWND(),
|
(HWND)parent->GetHWND(),
|
||||||
(HMENU)m_windowId,
|
(HMENU)m_windowId,
|
||||||
|
@@ -1059,7 +1059,7 @@ bool wxResourceManager::CreatePanelItem(wxItemResource *panelResource, wxPanel *
|
|||||||
MakeUniqueName("button", buf);
|
MakeUniqueName("button", buf);
|
||||||
res->SetName(buf);
|
res->SetName(buf);
|
||||||
if (isBitmap)
|
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
|
else
|
||||||
newItem = new wxButton(panel, -1, "Button", wxPoint(x, y), wxSize(-1, -1), 0, wxDefaultValidator, buf);
|
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";
|
prefix = "ID_BITMAPBUTTON";
|
||||||
MakeUniqueName("button", buf);
|
MakeUniqueName("button", buf);
|
||||||
res->SetName(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")
|
else if (itemType == "wxMessage" || itemType == "wxStaticText")
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user