diff options
Diffstat (limited to 'src/Fl_Text_Display.cxx')
| -rw-r--r-- | src/Fl_Text_Display.cxx | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index 7417bb5b5..d3967b70d 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -2170,11 +2170,10 @@ void Fl_Text_Display::draw_string(int style, if (style & PRIMARY_MASK) { if (Fl::focus() == (Fl_Widget*)this) { -#ifdef __APPLE__ // PORTME: Fl_Screen_Driver - platform compose - if (Fl::compose_state) background = color();// Mac OS: underline marked text + if (Fl::screen_driver()->has_marked_text() && Fl::compose_state) + background = color();// Mac OS: underline marked text else -#endif - background = selection_color(); + background = selection_color(); } else background = fl_color_average(color(), selection_color(), 0.4f); } else if (style & HIGHLIGHT_MASK) { @@ -2212,12 +2211,10 @@ void Fl_Text_Display::draw_string(int style, fl_push_clip(X, Y, toX - X, mMaxsize); #endif fl_draw( string, nChars, X, Y + mMaxsize - fl_descent()); -#ifdef __APPLE__ // Mac OS: underline marked (= selected + Fl::compose_state != 0) text // PORTME: platform editor feel - if (Fl::compose_state && (style & PRIMARY_MASK)) { + if (Fl::screen_driver()->has_marked_text() && Fl::compose_state && (style & PRIMARY_MASK)) { fl_color( fl_color_average(foreground, background, 0.6) ); fl_line(X, Y + mMaxsize - 1, X + fl_width(string, nChars), Y + mMaxsize - 1); } -#endif #if !(defined(__APPLE__) || defined(WIN32)) && USE_XFT // PORTME: platform editor feel fl_pop_clip(); #endif @@ -3734,10 +3731,8 @@ void Fl_Text_Display::draw(void) { int has_selection = buffer()->selection_position(&start, &end); if (damage() & (FL_DAMAGE_ALL | FL_DAMAGE_SCROLL | FL_DAMAGE_EXPOSE) && ( -#ifdef __APPLE__ // PORTME: Fl_Screen_Driver - platform compose - Fl::compose_state || -#endif - !has_selection || mCursorPos < start || mCursorPos > end) && + (Fl::screen_driver()->has_marked_text() && Fl::compose_state) || + (!has_selection) || mCursorPos < start || mCursorPos > end) && mCursorOn && Fl::focus() == (Fl_Widget*)this ) { fl_push_clip(text_area.x-LEFT_MARGIN, text_area.y, |
