From 77d42ecdd33c4b6635d0a41ea06a42d04f07b66c Mon Sep 17 00:00:00 2001 From: Bill Spitzak Date: Sat, 23 Sep 2000 08:21:52 +0000 Subject: Menu titles and buttons in the menubar can be images (allows it to be used as a toolbar) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1306 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Menu_Bar.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/Fl_Menu_Bar.cxx b/src/Fl_Menu_Bar.cxx index 886467ef7..176492b16 100644 --- a/src/Fl_Menu_Bar.cxx +++ b/src/Fl_Menu_Bar.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Menu_Bar.cxx,v 1.7.2.4 2000/07/30 00:31:44 spitzak Exp $" +// "$Id: Fl_Menu_Bar.cxx,v 1.7.2.5 2000/09/23 08:21:52 spitzak Exp $" // // Menu bar widget for the Fast Light Tool Kit (FLTK). // @@ -32,8 +32,9 @@ void Fl_Menu_Bar::draw() { const Fl_Menu_Item* m; int X = x()+6; for (m=menu(); m->text; m = m->next()) { - m->draw(X, y(), 0, h(), this); - X += m->measure(0,this) + 16; + int W = m->measure(0,this) + 16; + m->draw(X, y(), W, h(), this); + X += W; } } @@ -60,5 +61,5 @@ int Fl_Menu_Bar::handle(int event) { } // -// End of "$Id: Fl_Menu_Bar.cxx,v 1.7.2.4 2000/07/30 00:31:44 spitzak Exp $". +// End of "$Id: Fl_Menu_Bar.cxx,v 1.7.2.5 2000/09/23 08:21:52 spitzak Exp $". // -- cgit v1.2.3