X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b18ebec9568bcfc59b3c22d45c37fd73bdf1718c..f72ed385786eccca7a73cbace9bae975e3a2ae21:/src/msw/anybutton.cpp diff --git a/src/msw/anybutton.cpp b/src/msw/anybutton.cpp index a2382422e7..0e3da82ea3 100644 --- a/src/msw/anybutton.cpp +++ b/src/msw/anybutton.cpp @@ -819,9 +819,9 @@ void DrawButtonText(HDC hdc, // now center this rect inside the entire button area const LONG w = rc.right - rc.left; const LONG h = rc.bottom - rc.top; - rc.left = (pRect->right - pRect->left)/2 - w/2; + rc.left = pRect->left + (pRect->right - pRect->left)/2 - w/2; rc.right = rc.left+w; - rc.top = (pRect->bottom - pRect->top)/2 - h/2; + rc.top = pRect->top + (pRect->bottom - pRect->top)/2 - h/2; rc.bottom = rc.top+h; ::DrawText(hdc, text.wx_str(), text.length(), &rc, flags);