Revision: 27341
          http://sourceforge.net/p/bibdesk/svn/27341
Author:   hofman
Date:     2022-04-02 09:54:26 +0000 (Sat, 02 Apr 2022)
Log Message:
-----------
Auto size image columns assuming square images

Modified Paths:
--------------
    trunk/bibdesk/BibDocument_DataSource.m

Modified: trunk/bibdesk/BibDocument_DataSource.m
===================================================================
--- trunk/bibdesk/BibDocument_DataSource.m      2022-04-02 06:30:19 UTC (rev 
27340)
+++ trunk/bibdesk/BibDocument_DataSource.m      2022-04-02 09:54:26 UTC (rev 
27341)
@@ -212,7 +212,7 @@
         NSTableCellView *tmpView = nil;
         CGFloat width = 0.0;
         for (row = 0; row < numRows; row++) {
-            NSView *view = [tv viewAtColumn:column row:row makeIfNecessary:NO];
+            NSTableCellView *view = [tv viewAtColumn:column row:row 
makeIfNecessary:NO];
             if (view == nil) {
                 if (tmpView == nil)
                     tmpView = [tableView makeViewForTableColumn:tableColumn 
owner:self];
@@ -226,7 +226,10 @@
                 }
                 view = tmpView;
             }
-            width = fmax(width, [view fittingSize].width);
+            if ([view imageView] && [view textField] == nil)
+                width = fmax(width, [tv rowHeight]);
+            else
+                width = fmax(width, [view fittingSize].width);
         }
         return width;
     }

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

Reply via email to