Fix menu item fonts (STR #30)

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2991 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet
2003-05-21 01:50:14 +00:00
parent 2c6367a0e6
commit 340e84839e
3 changed files with 11 additions and 6 deletions
+2
View File
@@ -1,5 +1,7 @@
CHANGES IN FLTK 1.1.4 CHANGES IN FLTK 1.1.4
- Menu items were not drawn using the font specified in
the Fl_Menu_Item structure (STR #30)
- Long menus that were aligned such that the top of an - Long menus that were aligned such that the top of an
item was exactly at the top of the screen would not item was exactly at the top of the screen would not
scroll (STR #33) scroll (STR #33)
+6 -4
View File
@@ -1,5 +1,5 @@
// //
// "$Id: Fl_Menu.cxx,v 1.18.2.12.2.25 2003/05/21 01:37:17 easysw Exp $" // "$Id: Fl_Menu.cxx,v 1.18.2.12.2.26 2003/05/21 01:50:13 easysw Exp $"
// //
// Menu code for the Fast Light Tool Kit (FLTK). // Menu code for the Fast Light Tool Kit (FLTK).
// //
@@ -360,8 +360,10 @@ void menuwindow::drawentry(const Fl_Menu_Item* m, int n, int eraseit) {
int x1 = xx+ww-sz-3; int x1 = xx+ww-sz-3;
fl_polygon(x1, y1, x1, y1+sz, x1+sz, y1+sz/2); fl_polygon(x1, y1, x1, y1+sz, x1+sz, y1+sz/2);
} else if (m->shortcut_) { } else if (m->shortcut_) {
Fl_Font f = button ? button->textfont() : FL_HELVETICA; Fl_Font f = m->labelfont_ ? (Fl_Font)m->labelfont_ :
fl_font(f, button ? button->textsize() : FL_NORMAL_SIZE); button ? button->textfont() : FL_HELVETICA;
fl_font(f, m->labelsize_ ? m->labelsize_ :
button ? button->textsize() : FL_NORMAL_SIZE);
fl_draw(fl_shortcut_label(m->shortcut_), xx, yy, ww-3, hh, FL_ALIGN_RIGHT); fl_draw(fl_shortcut_label(m->shortcut_), xx, yy, ww-3, hh, FL_ALIGN_RIGHT);
} }
@@ -791,5 +793,5 @@ const Fl_Menu_Item* Fl_Menu_Item::test_shortcut() const {
} }
// //
// End of "$Id: Fl_Menu.cxx,v 1.18.2.12.2.25 2003/05/21 01:37:17 easysw Exp $". // End of "$Id: Fl_Menu.cxx,v 1.18.2.12.2.26 2003/05/21 01:50:13 easysw Exp $".
// //
+3 -2
View File
@@ -1,5 +1,5 @@
// //
// "$Id: fl_shortcut.cxx,v 1.4.2.9.2.9 2003/01/30 21:44:21 easysw Exp $" // "$Id: fl_shortcut.cxx,v 1.4.2.9.2.10 2003/05/21 01:50:14 easysw Exp $"
// //
// Shortcut support routines for the Fast Light Tool Kit (FLTK). // Shortcut support routines for the Fast Light Tool Kit (FLTK).
// //
@@ -78,6 +78,7 @@ int Fl::test_shortcut(int shortcut) {
// This table must be in numeric order by fltk (X) keysym number: // This table must be in numeric order by fltk (X) keysym number:
struct Keyname {int key; const char* name;}; struct Keyname {int key; const char* name;};
static Keyname table[] = { static Keyname table[] = {
{' ', "Space"},
{FL_BackSpace, "Backspace"}, {FL_BackSpace, "Backspace"},
{FL_Tab, "Tab"}, {FL_Tab, "Tab"},
{0xff0b/*XK_Clear*/, "Clear"}, {0xff0b/*XK_Clear*/, "Clear"},
@@ -200,5 +201,5 @@ int Fl_Widget::test_shortcut() {
} }
// //
// End of "$Id: fl_shortcut.cxx,v 1.4.2.9.2.9 2003/01/30 21:44:21 easysw Exp $". // End of "$Id: fl_shortcut.cxx,v 1.4.2.9.2.10 2003/05/21 01:50:14 easysw Exp $".
// //