diff options
| author | Bill Spitzak <spitzak@gmail.com> | 2000-09-23 08:21:52 +0000 |
|---|---|---|
| committer | Bill Spitzak <spitzak@gmail.com> | 2000-09-23 08:21:52 +0000 |
| commit | 77d42ecdd33c4b6635d0a41ea06a42d04f07b66c (patch) | |
| tree | 164e41e240c82fda54be9fcdafe7ac52ccacce3f /src/Fl_Menu_Bar.cxx | |
| parent | 59c2b2dd318eada2fcead87fc68d84cba57d6a94 (diff) | |
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
Diffstat (limited to 'src/Fl_Menu_Bar.cxx')
| -rw-r--r-- | src/Fl_Menu_Bar.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
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 $". // |
