From: Vadim Zeitlin Date: Tue, 12 Jul 2011 09:13:39 +0000 (+0000) Subject: Centre wxSlider value correctly when wxSL_MIN_MAX_LABELS is not used. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/b748750e13e48bee0354812ff84d31cc7790fca1?ds=inline Centre wxSlider value correctly when wxSL_MIN_MAX_LABELS is not used. r68230 fixed the width of the value label in this case but not its position: it was left-aligned instead of being centered as it should be. See #13291. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68236 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/slider.cpp b/src/msw/slider.cpp index f7aefdd599..7c1c7103f2 100644 --- a/src/msw/slider.cpp +++ b/src/msw/slider.cpp @@ -490,7 +490,7 @@ void wxSlider::DoMoveWindow(int x, int y, int width, int height) int xLabelValue = x + minLabelWidth + ((width - (minLabelWidth + maxLabelWidth)) / 2) - - (maxLabelWidth / 2); + (longestLabelWidth / 2); int ySlider = y;