diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-02-28 14:32:13 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-03-01 08:00:10 +0100 |
commit | 0833f01a3df511871c572c5454a97ef878eb9f67 (patch) | |
tree | ad0db48d32fb5160d34d18bda05c748935927772 /vcl/osx | |
parent | 6c897e5026a6819c2d706ccdc9720fb1b3f8bea2 (diff) |
macOS spinbox and tab header tweaks
(*) tweak location of SpinBoxes so they line up a little better
(*) tweak the size of the TabItems so they don't overlap,
which causes little extra vertical bars of gray
Change-Id: Ic36be6c97b4b44f5e60b0f4a0f1e172fd7c2af03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111712
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/osx')
-rw-r--r-- | vcl/osx/salnativewidgets.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/vcl/osx/salnativewidgets.cxx b/vcl/osx/salnativewidgets.cxx index 606db5ba9a37..17d1744433f4 100644 --- a/vcl/osx/salnativewidgets.cxx +++ b/vcl/osx/salnativewidgets.cxx @@ -661,8 +661,6 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType, else if (aTabItemDrawInfo.position == kHIThemeTabPositionLast) aTabItemDrawInfo.position = kHIThemeTabPositionFirst; } - rc.size.width += VCL_TAB_TEXT_SEPARATOR; - rc.origin.x -= 1; HIThemeDrawTab(&rc, &aTabItemDrawInfo, maContextHolder.get(), kHIThemeOrientationNormal, nullptr); bOK=true; } @@ -812,7 +810,8 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType, ? kThemeAdornmentDefault : kThemeAdornmentNone; if (nUpperState & ControlState::FOCUSED || nLowerState & ControlState::FOCUSED) aSpinInfo.adornment |= kThemeAdornmentFocus; - rc.origin.x += rc.size.width + 2 * FOCUS_RING_WIDTH; + rc.origin.x += rc.size.width + FOCUS_RING_WIDTH + 1; + rc.origin.y -= 1; rc.size.width = SPIN_BUTTON_WIDTH; rc.size.height = SPIN_LOWER_BUTTON_HEIGHT + SPIN_LOWER_BUTTON_HEIGHT; HIThemeDrawButton(&rc, &aSpinInfo, maContextHolder.get(), kHIThemeOrientationNormal, nullptr); @@ -968,7 +967,7 @@ bool AquaSalGraphics::getNativeControlRegion(ControlType nType, break; case ControlType::TabItem: { - w = aCtrlBoundRect.GetWidth() + 2 * TAB_TEXT_MARGIN - 2 * VCL_TAB_TEXT_SEPARATOR; + w = aCtrlBoundRect.GetWidth() + 2 * TAB_TEXT_MARGIN; h = TAB_HEIGHT + 2; rNativeContentRegion = tools::Rectangle(Point(x, y), Size(w, h)); rNativeBoundingRegion = tools::Rectangle(Point(x, y), Size(w, h)); |