From: Robin Dunn Date: Wed, 19 Jan 2005 22:06:13 +0000 (+0000) Subject: Adjust the bounding box of the labels to client coordinants X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/b5c4505960515b5a9809286670ca9089f46e378c Adjust the bounding box of the labels to client coordinants git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31506 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/slider95.cpp b/src/msw/slider95.cpp index 1668ce9f0d..705ca4bd7f 100644 --- a/src/msw/slider95.cpp +++ b/src/msw/slider95.cpp @@ -346,7 +346,11 @@ wxRect wxSlider95::GetBoundingBox() const wxRect rect(x, y, w, h); if ( m_labels ) - rect.Union(m_labels->GetBoundingBox()); + { + wxRect lrect = m_labels->GetBoundingBox(); + GetParent()->ScreenToClient(&lrect.x, &lrect.y); + rect.Union(lrect); + } return rect; }