From 81340639d92f4efbc7775a61f8b602d6916944b0 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Tue, 29 Jan 2002 00:56:19 +0000 Subject: Fix tab measurement for image-only labels. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1948 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- CHANGES | 2 ++ src/Fl_Tabs.cxx | 14 +++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CHANGES b/CHANGES index f60a2f491..33e9167ef 100644 --- a/CHANGES +++ b/CHANGES @@ -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 diff --git a/src/Fl_Tabs.cxx b/src/Fl_Tabs.cxx index 2e46626b9..96cc0b901 100644 --- a/src/Fl_Tabs.cxx +++ b/src/Fl_Tabs.cxx @@ -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; ivisible()) 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 $". // -- cgit v1.2.3