Revision: 29138
          http://sourceforge.net/p/bibdesk/svn/29138
Author:   hofman
Date:     2025-04-19 15:37:43 +0000 (Sat, 19 Apr 2025)
Log Message:
-----------
Don't make horizontal padding even integral, as that has weird discontinuous 
effect in column mode when resizing. Instead divide integral half paddings over 
left and right margin.

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-19 
09:03:54 UTC (rev 29137)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m      2025-04-19 
15:37:43 UTC (rev 29138)
@@ -1143,9 +1143,9 @@
 - (CGFloat)_rowHeight { return _iconSize.height + _padding.height; }
 
 // overall borders around the view
-- (CGFloat)_leftMargin { return _padding.width / 2 + DEFAULT_MARGIN.width; }
+- (CGFloat)_leftMargin { return floor( _padding.width / 2 ) + 
DEFAULT_MARGIN.width; }
 
-- (CGFloat)_rightMargin { return _padding.width / 2 + DEFAULT_MARGIN.width; }
+- (CGFloat)_rightMargin { return ceil( _padding.width / 2 ) + 
DEFAULT_MARGIN.width; }
 
 - (CGFloat)_topMargin { return DEFAULT_MARGIN.height; }
 
@@ -1163,8 +1163,9 @@
 {
     NSSize size = DEFAULT_PADDING;
     // ??? magic number here... using a fixed padding looked funny at some 
sizes, so this is now adjustable
-    size.width += 2 * round( PADDING_STRETCH * scale / 2 );
-    size.height += round( PADDING_STRETCH * scale ) + [self _textHeight];
+    CGFloat extraPadding = 2 * round( PADDING_STRETCH * scale / 2 );
+    size.width += extraPadding;
+    size.height += extraPadding + [self _textHeight];
     return size;
 }
 
@@ -2611,6 +2612,7 @@
 #if DEBUG_GRID
     [[NSColor grayColor] set];
     NSRect r = NSInsetRect([self bounds], [self _leftMargin], [self 
_topMargin]);
+    r.size.width += [self _leftMargin] - [self _rightMargin];
     r.size.height += [self _topMargin] - [self _bottomMargin];
     NSFrameRect(r);
 #endif

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