From bc3de1ec15062a9016150c124d6a4d6c14d87720 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Sun, 2 Sep 2001 11:23:27 +0000 Subject: Fix label/image problems. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1581 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/fl_labeltype.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/fl_labeltype.cxx') diff --git a/src/fl_labeltype.cxx b/src/fl_labeltype.cxx index ce503bc55..3783c97d6 100644 --- a/src/fl_labeltype.cxx +++ b/src/fl_labeltype.cxx @@ -1,5 +1,5 @@ // -// "$Id: fl_labeltype.cxx,v 1.6.2.3.2.2 2001/08/06 03:17:43 easysw Exp $" +// "$Id: fl_labeltype.cxx,v 1.6.2.3.2.3 2001/09/02 11:23:27 easysw Exp $" // // Label drawing routines for the Fast Light Tool Kit (FLTK). // @@ -31,6 +31,7 @@ #include #include #include +#include void fl_no_label(const Fl_Label*,int,int,int,int,Fl_Align) {} @@ -56,6 +57,10 @@ void fl_normal_measure(const Fl_Label* o, int& W, int& H) { fl_font(o->font, o->size); fl_measure(o->value, W, H); + if (o->image) { + if (o->image->w() > W) W = o->image->w(); + H += o->image->h(); + } } #define MAX_LABELTYPE 16 @@ -131,5 +136,5 @@ void Fl_Widget::draw_label(int X, int Y, int W, int H, Fl_Align a) const { #include // -// End of "$Id: fl_labeltype.cxx,v 1.6.2.3.2.2 2001/08/06 03:17:43 easysw Exp $". +// End of "$Id: fl_labeltype.cxx,v 1.6.2.3.2.3 2001/09/02 11:23:27 easysw Exp $". // -- cgit v1.2.3