From: Vadim Zeitlin Date: Sat, 25 Dec 2010 13:46:29 +0000 (+0000) Subject: Make the margin between wxSpinCtrlGeneric sub-windows compatible with MSW. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/3013861102292eb82391e361bee1dc090783c653?ds=inline Make the margin between wxSpinCtrlGeneric sub-windows compatible with MSW. Native MSW wxSpinCtrl uses a single pixel margin between the text part and the spin button while the generic version used 2 pixels which resulted in a slightly different appearance (see #12767). Use the same margin as MSW now in the generic version too, it should be fine for the other platforms as well and if it isn't we can always tweak them later. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66444 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/spinctlg.cpp b/src/generic/spinctlg.cpp index 67d9caaa31..1f2f3c2492 100644 --- a/src/generic/spinctlg.cpp +++ b/src/generic/spinctlg.cpp @@ -46,8 +46,12 @@ IMPLEMENT_DYNAMIC_CLASS(wxSpinDoubleEvent, wxNotifyEvent) // constants // ---------------------------------------------------------------------------- -// the margin between the text control and the spin -static const wxCoord MARGIN = 2; +// The margin between the text control and the spin: the value here is the same +// as the margin between the spin button and its "buddy" text control in wxMSW +// so the generic control looks similarly to the native one there, we might +// need to use different value for the other platforms (and maybe even +// determine it dynamically?). +static const wxCoord MARGIN = 1; #define SPINCTRLBUT_MAX 32000 // large to avoid wrap around trouble