mirror of
https://github.com/fltk/fltk.git
synced 2026-06-06 00:22:42 +08:00
The Fl_Text_Display widget did not redraw selections when focus
changed (STR #390) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3427 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
CHANGES IN FLTK 1.1.5rc2
|
||||
|
||||
- Documentation updates (STR #365)
|
||||
- The Fl_Text_Display widget did not redraw selections
|
||||
when focus changed (STR #390)
|
||||
- The plastic background image is now less contrasty
|
||||
(STR #394)
|
||||
- Fl_Scroll now uses a full redraw when the scheme is
|
||||
set to plastic and the box type is a frame (STR #205)
|
||||
- Fl_Window::resize() did not work properly with KDE 3.2
|
||||
|
||||
+11
-7
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl_Text_Display.cxx,v 1.12.2.53 2004/05/24 01:30:30 easysw Exp $"
|
||||
// "$Id: Fl_Text_Display.cxx,v 1.12.2.54 2004/05/26 02:42:10 easysw Exp $"
|
||||
//
|
||||
// Copyright 2001-2004 by Bill Spitzak and others.
|
||||
// Original code Copyright Mark Edel. Permission to distribute under
|
||||
@@ -1645,7 +1645,11 @@ void Fl_Text_Display::clear_rect( int style, int X, int Y,
|
||||
return;
|
||||
|
||||
if ( Fl::focus() != this ) {
|
||||
fl_color( color() );
|
||||
if (style & (HIGHLIGHT_MASK | PRIMARY_MASK)) {
|
||||
fl_color(fl_color_average(color(), selection_color(), 0.5f));
|
||||
} else {
|
||||
fl_color( color() );
|
||||
}
|
||||
fl_rectf( X, Y, width, height );
|
||||
} else if ( style & HIGHLIGHT_MASK ) {
|
||||
fl_color( fl_contrast(textcolor(), color()) );
|
||||
@@ -2986,7 +2990,7 @@ int Fl_Text_Display::handle(int event) {
|
||||
// This isn't very elegant!
|
||||
if (!Fl::event_inside(text_area.x, text_area.y, text_area.w, text_area.h) &&
|
||||
!dragging && event != FL_LEAVE && event != FL_ENTER &&
|
||||
event != FL_MOVE) {
|
||||
event != FL_MOVE && event != FL_FOCUS && event != FL_UNFOCUS) {
|
||||
return Fl_Group::handle(event);
|
||||
}
|
||||
|
||||
@@ -3073,9 +3077,9 @@ int Fl_Text_Display::handle(int event) {
|
||||
|
||||
case FL_FOCUS:
|
||||
case FL_UNFOCUS:
|
||||
if (buffer()->primary_selection()->start() !=
|
||||
buffer()->primary_selection()->end()) redraw(); // Redraw selections...
|
||||
break;
|
||||
if (buffer()->selected()) redraw();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -3083,5 +3087,5 @@ int Fl_Text_Display::handle(int event) {
|
||||
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.53 2004/05/24 01:30:30 easysw Exp $".
|
||||
// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.54 2004/05/26 02:42:10 easysw Exp $".
|
||||
//
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl_Text_Editor.cxx,v 1.9.2.18 2004/04/11 04:38:58 easysw Exp $"
|
||||
// "$Id: Fl_Text_Editor.cxx,v 1.9.2.19 2004/05/26 02:42:10 easysw Exp $"
|
||||
//
|
||||
// Copyright 2001-2004 by Bill Spitzak and others.
|
||||
// Original code Copyright Mark Edel. Permission to distribute under
|
||||
@@ -451,15 +451,13 @@ int Fl_Text_Editor::handle(int event) {
|
||||
switch (event) {
|
||||
case FL_FOCUS:
|
||||
show_cursor(mCursorOn); // redraws the cursor
|
||||
if (buffer()->primary_selection()->start() !=
|
||||
buffer()->primary_selection()->end()) redraw(); // Redraw selections...
|
||||
if (buffer()->selected()) redraw(); // Redraw selections...
|
||||
Fl::focus(this);
|
||||
return 1;
|
||||
|
||||
case FL_UNFOCUS:
|
||||
show_cursor(mCursorOn); // redraws the cursor
|
||||
if (buffer()->primary_selection()->start() !=
|
||||
buffer()->primary_selection()->end()) redraw(); // Redraw selections...
|
||||
if (buffer()->selected()) redraw(); // Redraw selections...
|
||||
case FL_HIDE:
|
||||
if (when() & FL_WHEN_RELEASE) maybe_do_callback();
|
||||
return 1;
|
||||
@@ -490,5 +488,5 @@ int Fl_Text_Editor::handle(int event) {
|
||||
}
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_Text_Editor.cxx,v 1.9.2.18 2004/04/11 04:38:58 easysw Exp $".
|
||||
// End of "$Id: Fl_Text_Editor.cxx,v 1.9.2.19 2004/05/26 02:42:10 easysw Exp $".
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user