Skip to content

Commit

Permalink
Merge pull request #391 from openvanilla/dev/honor-overlay-style
Browse files Browse the repository at this point in the history
Honor the NSScroller.Style.overlay scrollbar style
  • Loading branch information
zonble authored Nov 27, 2023
2 parents 44d47a1 + 35b41f5 commit 4764a32
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -327,13 +327,6 @@ extension VerticalCandidateController: NSTableViewDataSource, NSTableViewDelegat
}

keyLabelStripView.setNeedsDisplay(keyLabelStripView.frame)

// fix a subtle OS X "bug" that, since we force the scroller to appear,
// scrolling sometimes shows a temporarily "broken" scroll bar
// (but quickly disappears)
if scrollView.hasVerticalScroller {
scrollView.verticalScroller?.setNeedsDisplay()
}
}
}

Expand Down Expand Up @@ -450,8 +443,10 @@ extension VerticalCandidateController: NSTableViewDataSource, NSTableViewDelegat
scrollView.hasVerticalScroller = true
let verticalScroller = scrollView.verticalScroller
verticalScroller?.controlSize = controlSize
verticalScroller?.scrollerStyle = .legacy
scrollerWidth = NSScroller.scrollerWidth(for: controlSize, scrollerStyle: .legacy)
verticalScroller?.scrollerStyle = NSScroller.preferredScrollerStyle
if NSScroller.preferredScrollerStyle == .legacy {
scrollerWidth = NSScroller.scrollerWidth(for: controlSize, scrollerStyle: NSScroller.preferredScrollerStyle)
}
}

keyLabelStripView.keyLabelFont = keyLabelFont
Expand Down

0 comments on commit 4764a32

Please sign in to comment.