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/branches/WX_3_0_BRANCH@77984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-10-09 15:36:39 +00:00
parent d0d4e49209
commit 75ce7fb68b
2 changed files with 6 additions and 4 deletions

View File

@@ -581,6 +581,10 @@ All (GUI):
- Fix several floating point rounding bugs in wxPropertyGrid (Artur Wieczorek).
wxMSW:
- Fix best height of wxSlider with labels but without ticks (Artur Wieczorek).
3.0.2: (released 2014-10-06)
----------------------------

View File

@@ -544,10 +544,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.