Tabs now show the correct tooltip (STR #1282)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5139 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
20ad7d23fa
commit
b9e4886cfe
1
CHANGES
1
CHANGES
@ -1,5 +1,6 @@
|
||||
CHANGES IN FLTK 1.1.8
|
||||
|
||||
- Tabs now show the correct tooltip (STR #1282)
|
||||
- Included fltk.spec in configure.in (STR #1274)
|
||||
- Fixed insufficiently invalidated cache
|
||||
in Fl_Browser (STR #1265)
|
||||
|
||||
@ -35,6 +35,7 @@
|
||||
#include <FL/Fl.H>
|
||||
#include <FL/Fl_Tabs.H>
|
||||
#include <FL/fl_draw.H>
|
||||
#include <FL/Fl_Tooltip.H>
|
||||
|
||||
#define BORDER 2
|
||||
#define EXTRASPACE 10
|
||||
@ -144,6 +145,21 @@ int Fl_Tabs::handle(int event) {
|
||||
} else push(o);
|
||||
if (Fl::visible_focus() && event == FL_RELEASE) Fl::focus(this);
|
||||
return 1;
|
||||
case FL_MOVE: {
|
||||
int ret = Fl_Group::handle(event);
|
||||
Fl_Widget *o = Fl_Tooltip::current(), *n = o;
|
||||
int H = tab_height();
|
||||
if ( (H>=0) && (Fl::event_y()>y()+H) )
|
||||
return ret;
|
||||
else if ( (H<0) && (Fl::event_y() < y()+h()+H) )
|
||||
return ret;
|
||||
else {
|
||||
n = which(Fl::event_x(), Fl::event_y());
|
||||
if (!n) n = this;
|
||||
}
|
||||
if (n!=o)
|
||||
Fl_Tooltip::enter(n);
|
||||
return ret; }
|
||||
case FL_FOCUS:
|
||||
case FL_UNFOCUS:
|
||||
if (!Fl::visible_focus()) return Fl_Group::handle(event);
|
||||
|
||||
10
test/tabs.fl
10
test/tabs.fl
@ -7,7 +7,7 @@ Function {} {open
|
||||
Fl_Window foo_window {open
|
||||
xywh {561 88 320 331} type Double resizable visible
|
||||
} {
|
||||
Fl_Tabs {} {open selected
|
||||
Fl_Tabs {} {open
|
||||
tooltip {the various index cards test different aspects of the Fl_Tabs widget} xywh {10 10 300 200} selection_color 4 labelcolor 7 resizable
|
||||
} {
|
||||
Fl_Group {} {
|
||||
@ -28,8 +28,8 @@ Function {} {open
|
||||
}
|
||||
}
|
||||
Fl_Group {} {
|
||||
label tab2 open
|
||||
tooltip {tab2 tests among other things the cooperation of modal windows and tabs} xywh {10 30 300 180} selection_color 2 hide
|
||||
label tab2 open selected
|
||||
tooltip {tab2 tests among other things the cooperation of modal windows and tabs} xywh {10 30 300 180} selection_color 2
|
||||
} {
|
||||
Fl_Button {} {
|
||||
label button1
|
||||
@ -89,11 +89,11 @@ Function {} {open
|
||||
}
|
||||
Fl_Group {} {
|
||||
label { tab5 } open
|
||||
tooltip {tab5 verifies if visibility requests are handled correctly} xywh {10 30 300 180} labeltype ENGRAVED_LABEL
|
||||
tooltip {tab5 verifies if visibility requests are handled correctly} xywh {10 30 300 180} labeltype ENGRAVED_LABEL hide
|
||||
} {
|
||||
Fl_Button {} {
|
||||
label button2
|
||||
xywh {20 80 60 80}
|
||||
tooltip {button2 has a different tooltp than tab5} xywh {20 80 60 80}
|
||||
}
|
||||
Fl_Button {} {
|
||||
label button
|
||||
|
||||
Loading…
Reference in New Issue
Block a user