Revision: 29124
          http://sourceforge.net/p/bibdesk/svn/29124
Author:   hofman
Date:     2025-04-17 15:21:52 +0000 (Thu, 17 Apr 2025)
Log Message:
-----------
Send KVO notifications when iconScale changes in row or column mode

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-17 
15:06:27 UTC (rev 29123)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m      2025-04-17 
15:21:52 UTC (rev 29124)
@@ -1243,7 +1243,6 @@
     _iconSize = NSMakeSize(iconScale * DEFAULT_ICON_SIZE.width, iconScale * 
DEFAULT_ICON_SIZE.height);
 }
 
-
 - (void)_setColumnsAndRowsFromContentWidth:(CGFloat)width {
     _numberOfColumns = MAX( 1,  (NSInteger)floor( ( width - 2 * 
DEFAULT_MARGIN.width ) / [self _columnWidth] ) );
     _numberOfRows = ( [self numberOfIcons]  + _numberOfColumns - 1 ) / 
_numberOfColumns;
@@ -1290,6 +1289,8 @@
         _numberOfColumns = 1;
         _numberOfRows = [self numberOfIcons];
         
+        [self willChangeValueForKey:@"iconSize"];
+        
         // if we have an auto-hiding vertical scroller, we may or may not have 
scroll bars, which affects the effective width
         if (autoHidesScrollers && [scrollView hasVerticalScroller]) {
             CGFloat minWidth = ceil( DEFAULT_PADDING.width + 
MIN_AUTO_ICON_SCALE * DEFAULT_ICON_SIZE.width + 2 * DEFAULT_MARGIN.width );
@@ -1316,6 +1317,8 @@
             
         }
         
+        [self didChangeValueForKey:@"iconSize"];
+        
         CGLayerRelease(_selectionOverlay);
         _selectionOverlay = NULL;
             
@@ -1324,6 +1327,8 @@
         _numberOfColumns = [self numberOfIcons];
         _numberOfRows = 1;
         
+        [self willChangeValueForKey:@"iconSize"];
+        
         // if we have an auto-hiding horizontal scroller, we may or may not 
have scroll bars, which affects the effective height
         if (autoHidesScrollers && [scrollView hasHorizontalScroller]) {
             CGFloat minHeight = ceil( DEFAULT_PADDING.height + 
MIN_AUTO_ICON_SCALE * DEFAULT_ICON_SIZE.height + DEFAULT_MARGIN.height );
@@ -1350,6 +1355,8 @@
             
         }
         
+        [self didChangeValueForKey:@"iconSize"];
+        
         CGLayerRelease(_selectionOverlay);
         _selectionOverlay = NULL;
         

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