Fix tab measurement for image-only labels.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1948 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2002-01-29 00:56:19 +00:00
parent 492b81c240
commit 81340639d9
2 changed files with 9 additions and 7 deletions

View File

@ -1,5 +1,7 @@
CHANGES IN FLTK 1.1.0b11
- Fl_Tabs didn't include images in the measurement of
the tabs if no label text was defined.
- The WIN32 code didn't return 0 from the window
procedure after handling WM_PAINT messages.
- fl_draw() would incorrectly test the clipping of

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.7 2002/01/01 15:11:31 easysw Exp $"
// "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.8 2002/01/29 00:56:19 easysw Exp $"
//
// Tab widget for the Fast Light Tool Kit (FLTK).
//
@ -51,11 +51,11 @@ int Fl_Tabs::tab_positions(int* p, int* w) {
for (i=0; i<children(); i++) {
Fl_Widget* o = *a++;
if (o->visible()) selected = i;
if (o->label()) {
int wt = 0; int ht = 0; o->measure_label(wt,ht);
w[i] = wt+EXTRASPACE;
} else
w[i] = EXTRASPACE;
int wt = 0; int ht = 0;
o->measure_label(wt,ht);
w[i] = wt+EXTRASPACE;
p[i+1] = p[i]+w[i]+BORDER;
}
int r = this->w();
@ -289,5 +289,5 @@ Fl_Tabs::Fl_Tabs(int X,int Y,int W, int H, const char *l) :
}
//
// End of "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.7 2002/01/01 15:11:31 easysw Exp $".
// End of "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.8 2002/01/29 00:56:19 easysw Exp $".
//