Revision: 27990
          http://sourceforge.net/p/bibdesk/svn/27990
Author:   hofman
Date:     2022-10-03 16:05:20 +0000 (Mon, 03 Oct 2022)
Log Message:
-----------
tweak layout of password visibility button

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

Modified: trunk/bibdesk/BDSKSecureTextField.m
===================================================================
--- trunk/bibdesk/BDSKSecureTextField.m 2022-10-03 14:59:47 UTC (rev 27989)
+++ trunk/bibdesk/BDSKSecureTextField.m 2022-10-03 16:05:20 UTC (rev 27990)
@@ -52,9 +52,9 @@
 + (NSImage *)showTextImage {
     static NSImage *image = nil;
     if (image == nil) {
-        image = [[NSImage alloc] initWithSize:NSMakeSize(19.0, 17.0)];
+        image = [[NSImage alloc] initWithSize:NSMakeSize(19.0, 19.0)];
         [image lockFocus];
-        [[NSImage imageNamed:NSImageNameQuickLookTemplate] 
drawInRect:NSMakeRect(-1.0, 2.0, 21.0, 13.0)];
+        [[NSImage imageNamed:NSImageNameQuickLookTemplate] 
drawInRect:NSMakeRect(-1.0, 3.0, 21.0, 13.0)];
         [image unlockFocus];
         [image setTemplate:YES];
         [image setAccessibilityDescription:NSLocalizedString(@"Show password", 
@"")];
@@ -65,12 +65,12 @@
 + (NSImage *)hideTextImage {
     static NSImage *image = nil;
     if (image == nil) {
-        image = [[NSImage alloc] initWithSize:NSMakeSize(19.0, 17.0)];
+        image = [[NSImage alloc] initWithSize:NSMakeSize(19.0, 19.0)];
         [image lockFocus];
-        [[NSImage imageNamed:NSImageNameQuickLookTemplate] 
drawInRect:NSMakeRect(-1.0, 2.0, 21.0, 13.0)];
+        [[NSImage imageNamed:NSImageNameQuickLookTemplate] 
drawInRect:NSMakeRect(-1.0, 3.0, 21.0, 13.0)];
         NSBezierPath *path = [NSBezierPath bezierPath];
-        [path moveToPoint:NSMakePoint(3.0, 3.0)];
-        [path lineToPoint:NSMakePoint(15.0, 14.0)];
+        [path moveToPoint:NSMakePoint(3.0, 4.0)];
+        [path lineToPoint:NSMakePoint(15.0, 15.0)];
         [NSGraphicsContext saveGraphicsState];
         [[NSGraphicsContext currentContext] 
setCompositingOperation:NSCompositeClear];
         [path setLineWidth:3.0];
@@ -101,9 +101,9 @@
         [button setTranslatesAutoresizingMaskIntoConstraints:NO];
         [self addSubview:button];
         [self addConstraints:[NSArray arrayWithObjects:
-            [NSLayoutConstraint constraintWithTrailingMargin:2.0 
forItem:button toItem:self],
+            [NSLayoutConstraint constraintWithTrailingMargin:1.0 
forItem:button toItem:self],
             [NSLayoutConstraint constraintWithTopMargin:2.0 forItem:button 
toItem:self],
-            [NSLayoutConstraint constraintWithBottomMargin:2.0 forItem:button 
toItem:self], nil]];
+            [NSLayoutConstraint constraintWithBottomMargin:1.0 forItem:button 
toItem:self], nil]];
     }
 }
 
@@ -201,7 +201,7 @@
 @implementation BDSKSecureTextFieldCell
 
 - (NSRect)drawingRectForBounds:(NSRect)rect {
-    return [super drawingRectForBounds:BDSKShrinkRect(rect, NSHeight(rect) + 
2.0, NSMaxXEdge)];
+    return [super drawingRectForBounds:BDSKShrinkRect(rect, NSHeight(rect) + 
1.0, NSMaxXEdge)];
 }
 
 - (NSArray *)accessibilityChildren {
@@ -238,7 +238,7 @@
 @implementation BDSKUnsecureTextFieldCell
 
 - (NSRect)drawingRectForBounds:(NSRect)rect {
-    return [super drawingRectForBounds:BDSKShrinkRect(rect, NSHeight(rect) + 
2.0, NSMaxXEdge)];
+    return [super drawingRectForBounds:BDSKShrinkRect(rect, NSHeight(rect) + 
1.0, NSMaxXEdge)];
 }
 
 - (NSArray *)accessibilityChildren {

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