Revision: 30012
http://sourceforge.net/p/bibdesk/svn/30012
Author: hofman
Date: 2026-02-17 22:47:37 +0000 (Tue, 17 Feb 2026)
Log Message:
-----------
remove legacy address field drawing code
Modified Paths:
--------------
trunk/bibdesk/BDSKAddressTextFieldCell.m
Modified: trunk/bibdesk/BDSKAddressTextFieldCell.m
===================================================================
--- trunk/bibdesk/BDSKAddressTextFieldCell.m 2026-02-17 17:07:20 UTC (rev
30011)
+++ trunk/bibdesk/BDSKAddressTextFieldCell.m 2026-02-17 22:47:37 UTC (rev
30012)
@@ -57,58 +57,6 @@
return cellSize;
}
-- (NSRect)adjustedFrame:(NSRect)aRect inView:(NSView *)controlView {
- if ([self bezelStyle] == NSTextFieldRoundedBezel)
- return aRect;
- return BDSKShrinkRect(aRect, 1.0, [controlView isFlipped] ? NSRectEdgeMaxY
: NSRectEdgeMinY);
-}
-
-- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView {
- if ([self bezelStyle] == NSTextFieldRoundedBezel) {
-
- [super drawWithFrame:cellFrame inView:controlView];
-
- } else {
-
- NSRect outlineRect = [self adjustedFrame:cellFrame inView:controlView];
- NSRect outerShadowRect, innerShadowRect;
- NSGradient *gradient = nil;
-
- outerShadowRect = BDSKSliceRect(cellFrame, 10.0, [controlView
isFlipped] ? NSRectEdgeMaxY : NSRectEdgeMinY);
- innerShadowRect = BDSKSliceRect(NSInsetRect(cellFrame, 1.0, 1.0),
10.0, [controlView isFlipped] ? NSRectEdgeMinY : NSRectEdgeMaxY);
-
- [[NSColor colorWithCalibratedWhite:1.0 alpha:0.394] set];
- [[NSBezierPath bezierPathWithRoundedRect:outerShadowRect xRadius:3.6
yRadius:3.6] fill];
-
- if ([[controlView window] isMainWindow] || [[controlView window]
isKeyWindow])
- gradient = [[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedWhite:0.24 alpha:1.0] endingColor:[NSColor
colorWithCalibratedWhite:0.374 alpha:1.0]];
- else
- gradient = [[NSGradient alloc] initWithStartingColor:[NSColor
colorWithCalibratedWhite:0.55 alpha:1.0] endingColor:[NSColor
colorWithCalibratedWhite:0.558 alpha:1.0]];
- [gradient drawInBezierPath:[NSBezierPath
bezierPathWithRoundedRect:outlineRect xRadius:3.6 yRadius:3.6]
angle:[controlView isFlipped] ? 90.0 : 270.0];
-
- [[NSColor colorWithCalibratedWhite:0.88 alpha:1.0] set];
- [[NSBezierPath bezierPathWithRoundedRect:innerShadowRect xRadius:2.9
yRadius:2.9] fill];
-
- [[NSColor controlBackgroundColor] set];
- [[NSBezierPath bezierPathWithRoundedRect:NSInsetRect(cellFrame, 1.0,
2.0) xRadius:2.6 yRadius:2.6] fill];
-
- [self drawInteriorWithFrame:cellFrame inView:controlView];
-
- }
-}
-
-- (NSRect)focusRingMaskBoundsForFrame:(NSRect)cellFrame inView:(NSView
*)controlView {
- if ([self bezelStyle] != NSTextFieldRoundedBezel)
- cellFrame = [self adjustedFrame:cellFrame inView:controlView];
- return [super focusRingMaskBoundsForFrame:cellFrame inView:controlView];
-}
-
-- (void)drawFocusRingMaskWithFrame:(NSRect)cellFrame inView:(NSView
*)controlView {
- if ([self bezelStyle] != NSTextFieldRoundedBezel)
- cellFrame = [self adjustedFrame:cellFrame inView:controlView];
- [super drawFocusRingMaskWithFrame:cellFrame inView:controlView];
-}
-
- (NSRect)drawingRectForBounds:(NSRect)aRect {
if ([self bezelStyle] == NSTextFieldRoundedBezel)
aRect = NSInsetRect(aRect, MARGIN_ROUNDED, 0.0);
@@ -117,20 +65,7 @@
return [super drawingRectForBounds:aRect];
}
-- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView {
- if ([self bezelStyle] != NSTextFieldRoundedBezel)
- cellFrame = [self adjustedFrame:cellFrame inView:controlView];
- [super drawInteriorWithFrame:cellFrame inView:controlView];
-
-}
-
-- (void)editWithFrame:(NSRect)aRect inView:(NSView *)controlView
editor:(NSText *)textObj delegate:(id)anObject event:(NSEvent *)theEvent {
- aRect = [self adjustedFrame:aRect inView:controlView];
- [super editWithFrame:aRect inView:controlView editor:textObj
delegate:anObject event:theEvent];
-}
-
- (void)selectWithFrame:(NSRect)aRect inView:(NSView *)controlView
editor:(NSText *)textObj delegate:(id)anObject start:(NSInteger)selStart
length:(NSInteger)selLength {
- aRect = [self adjustedFrame:aRect inView:controlView];
[super selectWithFrame:aRect inView:controlView editor:textObj
delegate:anObject start:selStart length:selLength];
if ([[self stringValue] length])
dispatch_async(dispatch_get_main_queue(), ^{
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