X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/093475d2675caf0fd178bb93fd79fc5c529801e9..5a2e3d8c47db7f95d504ecd45f58b96c56572dd1:/src/common/sizer.cpp diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index c2320a4d5a..37c790a4bd 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -1053,20 +1053,20 @@ void wxGridSizer::SetItemBounds( wxSizerItem *item, int x, int y, int w, int h ) { if (flag & wxALIGN_CENTER_HORIZONTAL) { - pt.x = x + (w - sz.x) / 2; + pt.x = x + (w - sz.x - m_hgap) / 2; } else if (flag & wxALIGN_RIGHT) { - pt.x = x + (w - sz.x); + pt.x = x + (w - sz.x - m_hgap); } if (flag & wxALIGN_CENTER_VERTICAL) { - pt.y = y + (h - sz.y) / 2; + pt.y = y + (h - sz.y - m_vgap) / 2; } else if (flag & wxALIGN_BOTTOM) { - pt.y = y + (h - sz.y); + pt.y = y + (h - sz.y - m_vgap); } }