[MacViews] Fix Cocoa Overlay Scrollbar Width
There's a bug where the thumb in the Cocoa overlay scrollbar becomes more narrow than the track width. This bug is caused by BaseScrollBarThumb::SetLength() which sets the thumb's size according to its preferred size. Since the CocoaScrollBarThumb::CalculatePreferredSize() returns the thumb's minimum's size, SetLength() would set the thumb's size to be too small. This CL fixes this issue by returning the thumb's current thickness instead of the minimum size in CocoaScrollBarThumb::CalculatePreferredSize(). Additionally, this CL changes the logic so that the thumb and track bounds and size won't be insetted. Instead, the thumb's painting will be inset in the OnPaint() function. The kExpandedScrollbarThumbInset value is also removed. Bug:682466 Change-Id: I59411650df8acfb4e628efbb1a9f0646c2ce385b Reviewed-on: https://chromium-review.googlesource.com/741039 Commit-Queue: Sarah Chan <spqchan@chromium.org> Reviewed-by:Trent Apted <tapted@chromium.org> Cr-Commit-Position: refs/heads/master@{#513047}
Showing
Please register or sign in to comment