aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-02-10 10:17:26 +1100
committerNeil <nyamatongwe@gmail.com>2021-02-10 10:17:26 +1100
commit5cdcdc0f01f8fcee4f0caac755b78a246c815364 (patch)
treebeb1f9779064df741e5e81a9964c8e504a00074f
parent3e9d5d99e9322906b11cc6e4958bbe34140e730a (diff)
parentf5af58162f689c4159cb245d0aea9244aa972009 (diff)
downloadscintilla-mirror-5cdcdc0f01f8fcee4f0caac755b78a246c815364.tar.gz
Merged with macOS changes.
-rw-r--r--cocoa/PlatCocoa.mm7
1 files changed, 7 insertions, 0 deletions
diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm
index da30ac4f4..5eb5bf018 100644
--- a/cocoa/PlatCocoa.mm
+++ b/cocoa/PlatCocoa.mm
@@ -1782,6 +1782,13 @@ PRectangle ListBoxImpl::GetDesiredRect() {
rcDesired.right = rcDesired.left + maxItemWidth + aveCharWidth;
rcDesired.right += 4; // Ensures no truncation of text
+ if (@available(macOS 11, *)) {
+ // macOS 11 requires some extra space possibly due to the rounded highlight.
+ // There may be a better way to discover how much space is required
+ // but an extra 22 pixels fixes it for almost all tested cases.
+ rcDesired.right += 22;
+ }
+
if (Length() > rows) {
[scroller setHasVerticalScroller: YES];
rcDesired.right += [NSScroller scrollerWidthForControlSize: NSControlSizeRegular