From 3a4cea5b2007bcdfd40d4fb234243b91470f599a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 9 Oct 2014 15:37:45 +0000 Subject: [PATCH] Fix excessive height of wxSlider with labels but no ticks in wxMSW. We shouldn't add the label height to the control best height as the labels are positioned at the same vertical level as the main part of the control. See #16604. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/slider.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/msw/slider.cpp b/src/msw/slider.cpp index c59c668a3d..aea17963ba 100644 --- a/src/msw/slider.cpp +++ b/src/msw/slider.cpp @@ -546,10 +546,8 @@ wxSize wxSlider::DoGetBestSize() const { int labelSize = GetLabelsSize(); - // Min/max labels are compensated by the ticks so we don't need - // extra space for them if we're also showing ticks. - if ( HasFlag(wxSL_MIN_MAX_LABELS) && !HasFlag(wxSL_TICKS) ) - size.y += labelSize; + // Min/max labels are compensated by the thumb so we don't need + // extra space for them // The value label is always on top of the control and so does need // extra space in any case.