From 901fee94302e1b6366a5df2859f1f13ff0c4afca Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 7 Mar 2021 17:58:53 +0200 Subject: [PATCH] tdf#140856 macOS listbox rendering Change-Id: Ib5d4af162da7264d9e6da8742e36c194448bd1fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112132 Tested-by: Jenkins Reviewed-by: Thorsten Wagner Reviewed-by: Noel Grandin --- vcl/osx/salnativewidgets.cxx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/vcl/osx/salnativewidgets.cxx b/vcl/osx/salnativewidgets.cxx index 5dd5929c2fc6..bc132ee88d16 100644 --- a/vcl/osx/salnativewidgets.cxx +++ b/vcl/osx/salnativewidgets.cxx @@ -735,10 +735,6 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType, aTextDrawInfo.kind = kHIThemeFrameListBox; aTextDrawInfo.state = kThemeStateActive; aTextDrawInfo.isFocused = false; - rc.size.width += 2 * kThemeMetricListBoxFrameOutset - 2; - rc.size.height += 2 * kThemeMetricListBoxFrameOutset - 2; - rc.origin.x -= kThemeMetricListBoxFrameOutset - 1; - rc.origin.y -= kThemeMetricListBoxFrameOutset - 1; HIThemeDrawFrame(&rc, &aTextDrawInfo, maContextHolder.get(), kHIThemeOrientationNormal); bOK = true; break; @@ -1046,10 +1042,10 @@ bool AquaSalGraphics::getNativeControlRegion(ControlType nType, } else if (nPart == ControlPart::ListboxWindow) { - w = aCtrlBoundRect.GetWidth() - 2 * kThemeMetricListBoxFrameOutset; - h = aCtrlBoundRect.GetHeight() - 2 * kThemeMetricListBoxFrameOutset; - x += kThemeMetricListBoxFrameOutset; - y += kThemeMetricListBoxFrameOutset; + w = aCtrlBoundRect.GetWidth() - 2; + h = aCtrlBoundRect.GetHeight() - 2; + x += 1; + y += 1; rNativeBoundingRegion = aCtrlBoundRect; rNativeContentRegion = tools::Rectangle(Point(x, y), Size(w, h)); toReturn = true;