]> git.saurik.com Git - wxWidgets.git/commitdiff
Make the margin between wxSpinCtrlGeneric sub-windows compatible with MSW.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 25 Dec 2010 13:46:29 +0000 (13:46 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 25 Dec 2010 13:46:29 +0000 (13:46 +0000)
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

src/generic/spinctlg.cpp

index 67d9caaa316f7e5d4ee31cb4cc42b45c7afaa9ca..1f2f3c2492edf724edf0923ab9df3e61652cc23d 100644 (file)
@@ -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