Revision: 29130
          http://sourceforge.net/p/bibdesk/svn/29130
Author:   hofman
Date:     2025-04-18 09:38:57 +0000 (Fri, 18 Apr 2025)
Log Message:
-----------
add rather than substract margins

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-18 
09:32:25 UTC (rev 29129)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m      2025-04-18 
09:38:57 UTC (rev 29130)
@@ -1296,12 +1296,12 @@
             contentSize = 
_contentSizeForScrollViewHavingVerticalScroller(scrollView, minWidth, YES);
             [self _getIconSize:&iconSize padding:&padding 
fittingContentWidth:contentSize.width];
             
-            if (contentSize.height > ceil( (iconSize.height + padding.height) 
* _numberOfRows - DEFAULT_MARGIN.height )) {
+            if (contentSize.height > ceil( (iconSize.height + padding.height) 
* _numberOfRows + DEFAULT_MARGIN.height )) {
                 // we have sufficient height to fit all icons, so recalculate 
without vertical scroller
                 contentSize = 
_contentSizeForScrollViewHavingVerticalScroller(scrollView, minWidth, NO);
                 [self _getIconSize:&iconSize padding:&padding 
fittingContentWidth:contentSize.width];
                 
-                if (_numberOfRows > 0 && contentSize.height < ceil( 
(iconSize.height + padding.height) * _numberOfRows - DEFAULT_MARGIN.height )) {
+                if (_numberOfRows > 0 && contentSize.height < ceil( 
(iconSize.height + padding.height) * _numberOfRows + DEFAULT_MARGIN.height )) {
                     // the height with this wider icons becomes too much, so 
we now recalculate by fitting the height, still without vertical scroller
                     // this should come out in between the previous two 
calculations
                     [self _getIconSize:&iconSize padding:&padding 
fittingContentHeight:contentSize.height];
@@ -1342,12 +1342,12 @@
             contentSize = 
_contentSizeForScrollViewHavingHorizontalScroller(scrollView, minHeight, YES);
             [self _getIconSize:&iconSize padding:&padding 
fittingContentHeight:contentSize.height];
             
-            if (contentSize.width > ceil( (iconSize.width + padding.width) * 
_numberOfColumns - 2 * DEFAULT_MARGIN.width )) {
+            if (contentSize.width > ceil( (iconSize.width + padding.width) * 
_numberOfColumns + 2 * DEFAULT_MARGIN.width )) {
                 // we have sufficient width to fit all icons, so recalculate 
without horizontal scroller
                 contentSize = 
_contentSizeForScrollViewHavingHorizontalScroller(scrollView, minHeight, NO);
                 [self _getIconSize:&iconSize padding:&padding 
fittingContentHeight:contentSize.height];
                 
-                if (_numberOfColumns > 0 && contentSize.width < ceil( 
(iconSize.width + padding.width) * _numberOfColumns - 2 * DEFAULT_MARGIN.width 
)) {
+                if (_numberOfColumns > 0 && contentSize.width < ceil( 
(iconSize.width + padding.width) * _numberOfColumns + 2 * DEFAULT_MARGIN.width 
)) {
                     // the width with this wider icons becomes too much, so we 
now recalculate by fitting the width, still without horizontal scroller
                     // this should come out in between the previous two 
calculations
                     [self _getIconSize:&iconSize padding:&padding 
fittingContentWidth:contentSize.width];

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Bibdesk-commit mailing list
Bibdesk-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to