Revision: 29112
http://sourceforge.net/p/bibdesk/svn/29112
Author: hofman
Date: 2025-04-16 14:50:36 +0000 (Wed, 16 Apr 2025)
Log Message:
-----------
get flag first, no need for separate function
Modified Paths:
--------------
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m 2025-04-16
09:26:21 UTC (rev 29111)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m 2025-04-16
14:50:36 UTC (rev 29112)
@@ -1243,12 +1243,6 @@
return [[scroller class] scrollerWidthForControlSize:[scroller
controlSize]];
}
-static BOOL _scrollViewAutohidesScrollers(NSScrollView *scrollView) {
- if ([scrollView respondsToSelector:@selector(scrollerStyle)] &&
[scrollView scrollerStyle] == NSScrollerStyleOverlay)
- return NO;
- return [scrollView autohidesScrollers];
-}
-
static NSSize _contentSizeForScrollViewHavingVerticalScroller(NSScrollView
*scrollView, CGFloat minWidth, BOOL hasVerticalScroller) {
// NSScrollView does not have a method to get the content size for
arbitrary controlSize, so we substract the scroller widths ourselves
NSSize contentSize = [[scrollView class]
contentSizeForFrameSize:[scrollView frame].size hasHorizontalScroller:NO
hasVerticalScroller:NO borderType:[scrollView borderType]];
@@ -1275,6 +1269,9 @@
{
NSScrollView *scrollView = [self enclosingScrollView];
NSSize contentSize = scrollView ? [scrollView contentSize] : [self
bounds].size;
+ BOOL autoHidesScrollers = NO;
+ if ([scrollView respondsToSelector:@selector(scrollerStyle)] == NO ||
[scrollView scrollerStyle] == NSScrollerStyleLegacy)
+ autoHidesScrollers = [scrollView autohidesScrollers];
if (_fvFlags.displayMode == FVDisplayModeColumn) {
@@ -1282,7 +1279,7 @@
_numberOfRows = [self numberOfIcons];
// if we have an auto-hiding vertical scroller, we may or may not have
scroll bars, which affects the effective width
- if (_scrollViewAutohidesScrollers(scrollView) && [scrollView
hasVerticalScroller]) {
+ if (autoHidesScrollers && [scrollView hasVerticalScroller]) {
CGFloat minWidth = ceil( DEFAULT_PADDING.width +
MIN_AUTO_ICON_SCALE * DEFAULT_ICON_SIZE.width + 2 * DEFAULT_MARGIN.width );
// first assume we need a vertical scroller...
@@ -1316,7 +1313,7 @@
_numberOfRows = 1;
// if we have an auto-hiding horizontal scroller, we may or may not
have scroll bars, which affects the effective height
- if (_scrollViewAutohidesScrollers(scrollView) && [scrollView
hasHorizontalScroller]) {
+ if (autoHidesScrollers && [scrollView hasHorizontalScroller]) {
CGFloat minHeight = ceil( DEFAULT_PADDING.height +
MIN_AUTO_ICON_SCALE * DEFAULT_ICON_SIZE.height + DEFAULT_MARGIN.height );
// first assume we need a horizontal scroller...
@@ -1349,7 +1346,7 @@
_padding = [self _paddingForScale:[self iconScale]];
// if we have an auto-hiding vertical scroller, we may or may not have
scroll bars, which affects the effective width
- if (_scrollViewAutohidesScrollers(scrollView) && [scrollView
hasVerticalScroller]) {
+ if (autoHidesScrollers && [scrollView hasVerticalScroller]) {
// set the number of columns to 1 to calculate the minimal
required width
_numberOfColumns = 1;
CGFloat minWidth = [self _frameWidth];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit