Ticket #43283: patch-backingScaleFactor.diff
File patch-backingScaleFactor.diff, 935 bytes (added by devernay (Frédéric Devernay), 10 years ago) |
---|
-
gtk/gtkapplication-quartz-menu.c
old new 30 30 31 31 #import <Cocoa/Cocoa.h> 32 32 33 #if !defined(MAC_OS_X_VERSION_10_7) || \ 34 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 35 36 @interface NSScreen (LionAPI) 37 - (CGFloat)backingScaleFactor; 38 - (NSRect)convertRectToBacking:(NSRect)aRect; 39 @end 40 41 #endif // 10.7 42 33 43 #define ICON_SIZE 16 34 44 35 45 #define BLACK "#000000" … … 262 272 } 263 273 264 274 theme = gtk_icon_theme_get_default (); 265 scale = roundf ([[NSScreen mainScreen] backingScaleFactor]);275 scale = [[NSScreen mainScreen] respondsToSelector:@selector(backingScaleFactor)] ? roundf ([[NSScreen mainScreen] backingScaleFactor]) : 1.; 266 276 info = gtk_icon_theme_lookup_by_gicon_for_scale (theme, icon, ICON_SIZE, scale, GTK_ICON_LOOKUP_USE_BUILTIN); 267 277 268 278 if (info != NULL)