Use logical operations instead of bit-wise ones for booleans.

wxUniv "Windows" theme code wrongly used bitwise operations on boolean values,
fix this.

Closes #16796.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78389 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2015-01-19 12:18:47 +00:00
parent e59e6abe7d
commit eec7ef7232

View File

@@ -2026,7 +2026,7 @@ wxRect wxWin32Renderer::GetSliderShaftRect(const wxRect& rectOrig,
if (orient == wxHORIZONTAL)
{
rect.x += SLIDER_MARGIN;
if (left & right)
if (left && right)
{
rect.y += wxMax ((rect.height - 2*BORDER_THICKNESS) / 2, sizeThumb.y/2);
}
@@ -2044,7 +2044,7 @@ wxRect wxWin32Renderer::GetSliderShaftRect(const wxRect& rectOrig,
else // == wxVERTICAL
{
rect.y += SLIDER_MARGIN;
if (left & right)
if (left && right)
{
rect.x += wxMax ((rect.width - 2*BORDER_THICKNESS) / 2, sizeThumb.x/2);
}
@@ -2286,21 +2286,21 @@ void wxWin32Renderer::DrawSliderTicks(wxDC& dc,
{
wxCoord x = x1 + (len*n) / range;
if (left & (y1 > y3))
if (left && (y1 > y3))
{
DrawLine(dc, x, y1, x, y3, orient == wxVERTICAL);
}
if (right & (y4 > y2))
if (right && (y4 > y2))
{
DrawLine(dc, x, y2, x, y4, orient == wxVERTICAL);
}
}
// always draw the line at the end position
if (left & (y1 > y3))
if (left && (y1 > y3))
{
DrawLine(dc, x2, y1, x2, y3, orient == wxVERTICAL);
}
if (right & (y4 > y2))
if (right && (y4 > y2))
{
DrawLine(dc, x2, y2, x2, y4, orient == wxVERTICAL);
}