mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-24 09:08:53 +00:00
AppKit: Size vertical scrollers by scroller style in CPScrollView
CPScrollView's frame and content size calculations sized the vertical scroller with scrollerWidthForControlSize:, passing a scroller style, so it always took the legacy width. * CPScrollView: Use scrollerWidthInStyle: for the vertical scroller in +contentSizeForFrameSize:… and +frameSizeForContentSize:…. * CPScrollViewTest: Add tests for both methods with a scroller whose widths differ by style.
This commit is contained in:
1 parent
99b47c9a29
commit
203bf38b21
2 files changed
+45
-2
No files matched your search
@@ -207,7 +207,7 @@ var CPScrollerStyleGlobal = CPScrollerStyleOverlay,
|
||||
bounds.size.height -= [horizontalScrollerClass scrollerWidthInStyle:scrollerStyle];
|
||||
|
||||
if (verticalScrollerClass)
|
||||
bounds.size.width -= [verticalScrollerClass scrollerWidthForControlSize:scrollerStyle];
|
||||
bounds.size.width -= [verticalScrollerClass scrollerWidthInStyle:scrollerStyle];
|
||||
|
||||
return bounds.size;
|
||||
}
|
||||
@@ -240,7 +240,7 @@ var CPScrollerStyleGlobal = CPScrollerStyleOverlay,
|
||||
frameSize.height += [horizontalScrollerClass scrollerWidthInStyle:scrollerStyle];
|
||||
|
||||
if (verticalScrollerClass)
|
||||
frameSize.width += [verticalScrollerClass scrollerWidthForControlSize:scrollerStyle];
|
||||
frameSize.width += [verticalScrollerClass scrollerWidthInStyle:scrollerStyle];
|
||||
|
||||
return frameSize;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user