@@ -108,31 +108,30 @@ - (NSBezierPath *)backgroundPath {
108
108
}
109
109
110
110
- (NSColor *)backgroundColorPatternImage {
111
- NSImage * bg = [[NSImage alloc ] initWithSize: [self frame ].size] ;
112
- NSRect bgRect = NSZeroRect ;
113
- bgRect.size = [bg size ] ;
114
-
115
- [bg lockFocus ] ;
116
- NSBezierPath * bgPath = [self backgroundPath ] ;
117
- [NSGraphicsContext saveGraphicsState ] ;
118
- [bgPath addClip ] ;
119
-
120
- // Draw background gradient.
121
- [m_gradient drawInBezierPath: bgPath
122
- angle: 270.0 ] ;
123
-
124
- // Draw border if appropriate.
125
- if (m_borderWidth > 0 ) {
126
- // Double the borderWidth since we're drawing inside the path.
127
- [bgPath setLineWidth: (m_borderWidth * 2.0 ) * SSYHINTARROW_SCALE_FACTOR] ;
128
- [m_borderColor set ] ;
129
- [bgPath stroke ] ;
130
- }
131
-
132
- [NSGraphicsContext restoreGraphicsState ] ;
133
- [bg unlockFocus ] ;
134
-
135
- return [NSColor colorWithPatternImage: [bg autorelease ]] ;
111
+ NSImage * bg = [NSImage imageWithSize: [self frame ].size
112
+ flipped: NO
113
+ drawingHandler: ^(NSRect dstRect) {
114
+ NSBezierPath * bgPath = [self backgroundPath ] ;
115
+ [NSGraphicsContext saveGraphicsState ] ;
116
+ [bgPath addClip ] ;
117
+
118
+ // Draw background gradient.
119
+ [m_gradient drawInBezierPath: bgPath
120
+ angle: 270.0 ] ;
121
+
122
+ // Draw border if appropriate.
123
+ if (m_borderWidth > 0 ) {
124
+ // Double the borderWidth since we're drawing inside the path.
125
+ [bgPath setLineWidth: (m_borderWidth * 2.0 ) * SSYHINTARROW_SCALE_FACTOR] ;
126
+ [m_borderColor set ] ;
127
+ [bgPath stroke ] ;
128
+ }
129
+ [NSGraphicsContext restoreGraphicsState ] ;
130
+
131
+ return YES ;
132
+ }] ;
133
+
134
+ return [NSColor colorWithPatternImage: bg] ;
136
135
}
137
136
138
137
- (void )updateBackground {
@@ -298,9 +297,8 @@ + (CAKeyframeAnimation *)shakeAnimation:(NSRect)frame {
298
297
+ (void )showHelpArrowAtPoint : (NSPoint )point
299
298
inWindow : (NSWindow *)window {
300
299
if (static_helpArrow) {
301
- // Only one SSYHintArrow at a time!!
302
- NSLog (@" Internal Error 892-8178 Intercepted call to display > 1 SSYHintArrow" ) ;
303
- return ;
300
+ // Only one SSYHintArrow at a time! Destroy the prior one.
301
+ [static_helpArrow endWithNote: nil ] ;
304
302
}
305
303
306
304
static_helpArrow = [[SSYHintArrow alloc ] initAttachedToPoint: point
0 commit comments