File tree 2 files changed +9
-3
lines changed
2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ THE SOFTWARE.
41
41
BOOL mouseInside;
42
42
BOOL _isLoadingFromWhitelist;
43
43
BOOL _fromYouTube;
44
+ BOOL _fromFlickr;
44
45
BOOL _embeddedYouTubeView;
45
46
BOOL _hasH264Version;
46
47
BOOL _hasHDH264Version;
Original file line number Diff line number Diff line change @@ -248,7 +248,8 @@ - (id) initWithArguments:(NSDictionary *)arguments
248
248
}
249
249
}
250
250
}
251
-
251
+
252
+ _fromFlickr = [[self host ] rangeOfString: @" flickr.com" ].location != NSNotFound ;
252
253
253
254
#if LOGGING_ENABLED
254
255
NSLog ( @" arguments = %@ " , arguments );
@@ -844,7 +845,7 @@ - (void) _drawBadgeWithPressed: (BOOL) pressed
844
845
845
846
float maxW = NSWidth ( bounds ) - kMinMargin ;
846
847
// the 9/10 factor here is to account for the 60% vertical top-biasing
847
- float maxH = NSHeight ( bounds )*9 /10 - kMinMargin ;
848
+ float maxH = _fromFlickr ? NSHeight ( bounds )*9 /10 - kMinMargin : NSHeight ( bounds ) - kMinMargin ;
848
849
float minW = kMinHeight * w / h;
849
850
850
851
BOOL rotate = NO ;
@@ -883,7 +884,11 @@ - (void) _drawBadgeWithPressed: (BOOL) pressed
883
884
884
885
NSAffineTransform * xform = [ NSAffineTransform transform ];
885
886
// vertical top-bias by 60% here
886
- [ xform translateXBy: NSWidth ( bounds ) / 2 yBy: NSHeight ( bounds ) / 10 * 6 ];
887
+ if (_fromFlickr) {
888
+ [ xform translateXBy: NSWidth ( bounds ) / 2 yBy: NSHeight ( bounds ) / 10 * 6 ];
889
+ } else {
890
+ [ xform translateXBy: NSWidth ( bounds ) / 2 yBy: NSHeight ( bounds ) / 2 ];
891
+ }
887
892
[ xform scaleBy: scaleFactor ];
888
893
if ( rotate )
889
894
[ xform rotateByDegrees: 90 ];
You can’t perform that action at this time.
0 commit comments