From c4494a94a7fe16e2c428632db3af2470adaba248 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Fri, 19 Apr 2013 09:20:56 +0000 Subject: Cosmetic improvement of image used when dragging non-text data. Minimum OS version has been verified. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9892 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_cocoa.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 96ca221e4..973bd5486 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -3191,7 +3191,7 @@ static NSImage *imageFromText(const char *text, int *pwidth, int *pheight) fl_font(FL_HELVETICA, 10); p = text; int nl = 0; - while((q=strchr(p, '\n')) != NULL) { + while(nl < 100 && (q=strchr(p, '\n')) != NULL) { nl++; w2 = int(fl_width(p, q - p)); if (w2 > width) width = w2; @@ -3232,7 +3232,7 @@ static NSImage *imageFromText(const char *text, int *pwidth, int *pheight) static NSImage *defaultDragImage(int *pwidth, int *pheight) { - const int version_threshold = 100800; + const int version_threshold = 100700; int width, height; if (fl_mac_os_version >= version_threshold) { width = 50; height = 40; @@ -3246,7 +3246,7 @@ static NSImage *defaultDragImage(int *pwidth, int *pheight) fl_font(FL_HELVETICA, 20); fl_color(FL_BLACK); char str[4]; - int l = fl_utf8encode(0x1F69A, str); // the "Delivery truck" Unicode character + int l = fl_utf8encode(0x1F69A, str); // the "Delivery truck" Unicode character from "Apple Color Emoji" font fl_draw(str, l, 1, 16); } else { // draw two squares -- cgit v1.2.3