Account for the extra border around the thumb in wxMSW wxSlider
Without the extra margin, part of the thumb was truncated when wxSL_TICKS was not used, but wxSL_BOTH (which makes the thumb bigger than without it) was.
This commit is contained in:
@@ -548,7 +548,11 @@ wxSize wxSlider::DoGetBestSize() const
|
|||||||
{
|
{
|
||||||
// this value is arbitrary:
|
// this value is arbitrary:
|
||||||
const int length = FromDIP(100);
|
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);
|
const int tickSize = FromDIP(TICK);
|
||||||
|
|
||||||
int *width;
|
int *width;
|
||||||
|
Reference in New Issue
Block a user