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 )
|
||||
{
|
||||
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 )
|
||||
{
|
||||
@@ -1883,8 +1883,7 @@ void wxPropertyGrid::FixPosForTextCtrl( wxWindow* ctrl,
|
||||
finalPos.x += textCtrlXAdjust;
|
||||
finalPos.width -= textCtrlXAdjust;
|
||||
|
||||
finalPos.x += offset.x;
|
||||
finalPos.y += offset.y;
|
||||
finalPos.Offset(offset);
|
||||
|
||||
ctrl->SetSize(finalPos);
|
||||
}
|
||||
|
@@ -111,8 +111,7 @@ void wxPGCellRenderer::DrawEditorValue( wxDC& dc, const wxRect& rect,
|
||||
if ( editor )
|
||||
{
|
||||
wxRect rect2(rect);
|
||||
rect2.x += xOffset;
|
||||
rect2.y += yOffset;
|
||||
rect2.Offset(xOffset, yOffset);
|
||||
rect2.height -= yOffset;
|
||||
editor->DrawValue( dc, rect2, property, text );
|
||||
}
|
||||
|
@@ -1929,7 +1929,7 @@ void wxPropertyGrid::DrawExpanderButton( wxDC& dc, const wxRect& rect,
|
||||
{
|
||||
// Prepare rectangle to be used
|
||||
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;
|
||||
|
||||
#if (wxPG_USE_RENDERER_NATIVE)
|
||||
|
Reference in New Issue
Block a user