Revision: 25979
          http://sourceforge.net/p/bibdesk/svn/25979
Author:   hofman
Date:     2021-05-17 14:49:38 +0000 (Mon, 17 May 2021)
Log Message:
-----------
simplify calculation

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

Modified: trunk/bibdesk/BDSKConditionController.m
===================================================================
--- trunk/bibdesk/BDSKConditionController.m     2021-05-17 14:42:45 UTC (rev 
25978)
+++ trunk/bibdesk/BDSKConditionController.m     2021-05-17 14:49:38 UTC (rev 
25979)
@@ -176,15 +176,17 @@
 }
 
 - (void)resizeContainers {
-    CGFloat comparisonWidth = 0.0;
+    CGFloat width = 0.0;
     for (NSView *view in [NSArray arrayWithObjects:comparisonPopUp, 
dateComparisonPopUp, attachmentComparisonPopUp, nil])
-        comparisonWidth = fmax(comparisonWidth, [[view superview] 
fittingSize].width);
-    [[[comparisonView constraints] lastObject] setConstant:comparisonWidth];
-    CGFloat valueWidth = fmax(fmax([[[numberTextField superview] superview] 
fittingSize].width, [[[dateTextField superview] superview] fittingSize].width), 
[[colorWell superview] fittingSize].width);
-    [[[valueView constraints] lastObject] setConstant:valueWidth];
+        width = fmax(width, [[view superview] fittingSize].width);
+    [[[comparisonView constraints] lastObject] setConstant:width];
+    width = 0.0;
+    for (NSView *view in [NSArray arrayWithObjects:[numberTextField 
superview], [dateTextField superview], [colorWell superview], nil])
+        width = fmax(width, [[view superview] fittingSize].width);
+    [[[valueView constraints] lastObject] setConstant:width];
     for (NSLayoutConstraint *constraint in [[valueTextField superview] 
constraints]) {
         if ([constraint firstAttribute] == NSLayoutAttributeWidth) {
-            [constraint setConstant:valueWidth];
+            [constraint setConstant:width];
             break;
         }
     }

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