X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8c3c31d4a544271ae70be958f050f70bab440597..18027d49b9daea9f8808052d927246b4489b0ef9:/src/msw/button.cpp diff --git a/src/msw/button.cpp b/src/msw/button.cpp index 492f7d6eed..f9a84f98d2 100644 --- a/src/msw/button.cpp +++ b/src/msw/button.cpp @@ -32,6 +32,8 @@ #include "wx/brush.h" #include "wx/panel.h" #include "wx/bmpbuttn.h" + #include "wx/settings.h" + #include "wx/dcscreen.h" #endif #include "wx/msw/private.h" @@ -95,6 +97,17 @@ bool wxButton::Create(wxWindow *parent, SetSize(pos.x, pos.y, size.x, size.y); + // bad hack added by Robert to make buttons at least + // 80 pixels wide. There are probably better ways... + // TODO. FIXME. + wxSize nsize( GetSize() ); + if ((nsize.x < 80) || (nsize.y < 23)) + { + if ((size.x == -1) && (nsize.x < 80)) nsize.x = 80; + if ((size.y == -1) && (nsize.y < 23)) nsize.y = 23; + SetSize( nsize ); + } + return TRUE; }