From 914e7f9b0926a62f65c0351963ba533c6dee09f5 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Fri, 8 Feb 2013 11:58:19 +0000 Subject: Mac OS text input: removed the Fl::marked_text_length() function that's not necessary. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9816 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Input_.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Fl_Input_.cxx') diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx index 0cfc6a8fe..4f040b63c 100644 --- a/src/Fl_Input_.cxx +++ b/src/Fl_Input_.cxx @@ -339,8 +339,8 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) { int offset2; if (pp <= e) x2 = xpos + (float)expandpos(p, pp, buf, &offset2); else offset2 = (int) strlen(buf); -#ifdef __APPLE__ // Mac OS: underline marked ( = selected + Fl::marked_text_length() != 0) text - if (Fl::marked_text_length()) { +#ifdef __APPLE__ // Mac OS: underline marked ( = selected + Fl::compose_state != 0) text + if (Fl::compose_state) { fl_color(textcolor()); } else @@ -351,8 +351,8 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) { fl_color(fl_contrast(textcolor(), selection_color())); } fl_draw(buf+offset1, offset2-offset1, x1, (float)(Y+ypos+desc)); -#ifdef __APPLE__ // Mac OS: underline marked ( = selected + Fl::marked_text_length() != 0) text - if (Fl::marked_text_length()) { +#ifdef __APPLE__ // Mac OS: underline marked ( = selected + Fl::compose_state != 0) text + if (Fl::compose_state) { fl_color( fl_color_average(textcolor(), color(), 0.6) ); float width = fl_width(buf+offset1, offset2-offset1); fl_line(x1, Y+ypos+height-1, x1+width, Y+ypos+height-1); @@ -374,7 +374,7 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) { // draw the cursor: if (Fl::focus() == this && ( #ifdef __APPLE__ - Fl::marked_text_length() || + Fl::compose_state || #endif selstart == selend) && position() >= p-value() && position() <= e-value()) { -- cgit v1.2.3