diff --git a/src/msw/slider.cpp b/src/msw/slider.cpp index 49e4bb07cb..d859ea5d55 100644 --- a/src/msw/slider.cpp +++ b/src/msw/slider.cpp @@ -548,7 +548,11 @@ wxSize wxSlider::DoGetBestSize() const { // this value is arbitrary: const int length = FromDIP(100); - const int thumbSize = GetThumbLength(); + + // We need 2 extra pixels (which are not scaled by the DPI by the native + // control) on either side to account for the focus rectangle. + const int thumbSize = GetThumbLength() + 4; + const int tickSize = FromDIP(TICK); int *width;