Revision: 12984
          http://sourceforge.net/p/skim-app/code/12984
Author:   hofman
Date:     2022-07-06 16:28:14 +0000 (Wed, 06 Jul 2022)
Log Message:
-----------
add all constraints at once

Modified Paths:
--------------
    trunk/SKStatusBar.m

Modified: trunk/SKStatusBar.m
===================================================================
--- trunk/SKStatusBar.m 2022-07-06 16:24:24 UTC (rev 12983)
+++ trunk/SKStatusBar.m 2022-07-06 16:28:14 UTC (rev 12984)
@@ -77,9 +77,6 @@
         [leftField setControlSize:NSSmallControlSize];
         [leftField setTranslatesAutoresizingMaskIntoConstraints:NO];
         [self addSubview:leftField];
-        [NSLayoutConstraint activateConstraints:[NSArray arrayWithObjects:
-            [NSLayoutConstraint constraintWithItem:leftField 
attribute:NSLayoutAttributeLeading relatedBy:NSLayoutRelationEqual toItem:self 
attribute:NSLayoutAttributeLeading multiplier:1.0 constant:LEFT_MARGIN],
-            [NSLayoutConstraint constraintWithItem:leftField 
attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:self 
attribute:NSLayoutAttributeCenterY multiplier:1.0 constant:0.0], nil]];
         
         rightField = [[SKStatusTextField alloc] init];
         [rightField setBezeled:NO];
@@ -90,8 +87,11 @@
         [rightField setControlSize:NSSmallControlSize];
         [rightField setTranslatesAutoresizingMaskIntoConstraints:NO];
         [self addSubview:rightField];
+        
         [NSLayoutConstraint activateConstraints:[NSArray arrayWithObjects:
-            [NSLayoutConstraint constraintWithItem:self 
attribute:NSLayoutAttributeTrailing relatedBy:NSLayoutRelationEqual 
toItem:rightField attribute:NSLayoutAttributeTrailing multiplier:1.0 
constant:RIGHT_MARGIN],
+             [NSLayoutConstraint constraintWithItem:leftField 
attribute:NSLayoutAttributeLeading relatedBy:NSLayoutRelationEqual toItem:self 
attribute:NSLayoutAttributeLeading multiplier:1.0 constant:LEFT_MARGIN],
+             [NSLayoutConstraint constraintWithItem:leftField 
attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:self 
attribute:NSLayoutAttributeCenterY multiplier:1.0 constant:0.0],
+             [NSLayoutConstraint constraintWithItem:self 
attribute:NSLayoutAttributeTrailing relatedBy:NSLayoutRelationEqual 
toItem:rightField attribute:NSLayoutAttributeTrailing multiplier:1.0 
constant:RIGHT_MARGIN],
             [NSLayoutConstraint constraintWithItem:rightField 
attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:self 
attribute:NSLayoutAttributeCenterY multiplier:1.0 constant:0.0], nil]];
         
         iconView = nil;

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



_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to