Refactor: Use dedicated methods to manipulate wxRect members.
This commit is contained in:
@@ -861,7 +861,7 @@ void wxPropertyGrid::OnComboItemPaint( const wxPGComboBox* pCb,
|
|||||||
if ( useCustomPaintProcedure )
|
if ( useCustomPaintProcedure )
|
||||||
{
|
{
|
||||||
pt.x += wxCC_CUSTOM_IMAGE_MARGIN1;
|
pt.x += wxCC_CUSTOM_IMAGE_MARGIN1;
|
||||||
wxRect r(pt.x,pt.y,cis.x,cis.y);
|
wxRect r(pt, cis);
|
||||||
|
|
||||||
if ( flags & wxODCB_PAINTING_CONTROL )
|
if ( flags & wxODCB_PAINTING_CONTROL )
|
||||||
{
|
{
|
||||||
@@ -1883,8 +1883,7 @@ void wxPropertyGrid::FixPosForTextCtrl( wxWindow* ctrl,
|
|||||||
finalPos.x += textCtrlXAdjust;
|
finalPos.x += textCtrlXAdjust;
|
||||||
finalPos.width -= textCtrlXAdjust;
|
finalPos.width -= textCtrlXAdjust;
|
||||||
|
|
||||||
finalPos.x += offset.x;
|
finalPos.Offset(offset);
|
||||||
finalPos.y += offset.y;
|
|
||||||
|
|
||||||
ctrl->SetSize(finalPos);
|
ctrl->SetSize(finalPos);
|
||||||
}
|
}
|
||||||
|
@@ -111,8 +111,7 @@ void wxPGCellRenderer::DrawEditorValue( wxDC& dc, const wxRect& rect,
|
|||||||
if ( editor )
|
if ( editor )
|
||||||
{
|
{
|
||||||
wxRect rect2(rect);
|
wxRect rect2(rect);
|
||||||
rect2.x += xOffset;
|
rect2.Offset(xOffset, yOffset);
|
||||||
rect2.y += yOffset;
|
|
||||||
rect2.height -= yOffset;
|
rect2.height -= yOffset;
|
||||||
editor->DrawValue( dc, rect2, property, text );
|
editor->DrawValue( dc, rect2, property, text );
|
||||||
}
|
}
|
||||||
|
@@ -1929,7 +1929,7 @@ void wxPropertyGrid::DrawExpanderButton( wxDC& dc, const wxRect& rect,
|
|||||||
{
|
{
|
||||||
// Prepare rectangle to be used
|
// Prepare rectangle to be used
|
||||||
wxRect r(rect);
|
wxRect r(rect);
|
||||||
r.x += m_gutterWidth; r.y += m_buttonSpacingY;
|
r.Offset(m_gutterWidth, m_buttonSpacingY);
|
||||||
r.width = m_iconWidth; r.height = m_iconHeight;
|
r.width = m_iconWidth; r.height = m_iconHeight;
|
||||||
|
|
||||||
#if (wxPG_USE_RENDERER_NATIVE)
|
#if (wxPG_USE_RENDERER_NATIVE)
|
||||||
|
Reference in New Issue
Block a user