[Libreoffice-commits] core.git: vcl/inc vcl/osx
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Mon Mar 1 07:00:45 UTC 2021
vcl/inc/osx/salnativewidgets.h | 1 -
vcl/osx/salnativewidgets.cxx | 7 +++----
2 files changed, 3 insertions(+), 5 deletions(-)
New commits:
commit 0833f01a3df511871c572c5454a97ef878eb9f67
Author: Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Sun Feb 28 14:32:13 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Mar 1 08:00:10 2021 +0100
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 at collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/vcl/inc/osx/salnativewidgets.h b/vcl/inc/osx/salnativewidgets.h
index 3fdcdc40ca97..86675e0623d6 100644
--- a/vcl/inc/osx/salnativewidgets.h
+++ b/vcl/inc/osx/salnativewidgets.h
@@ -22,7 +22,6 @@
#define TAB_HEIGHT 20 // height of tab header in pixels
#define TAB_TEXT_MARGIN 12 // left/right margin of text within tab headers
-#define VCL_TAB_TEXT_SEPARATOR 2 // Space between two tabs required by VCL
#define FOCUS_RING_WIDTH 4 // width of focus ring in pixels
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));
More information about the Libreoffice-commits
mailing list