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
This commit is contained in:
Manolo Gouy 2013-04-19 09:20:56 +00:00
parent 53e2e603d0
commit c4494a94a7

View File

@ -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