summaryrefslogtreecommitdiff
path: root/src/Fl_Menu.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2011-09-28 03:35:51 +0000
committerMatthias Melcher <fltk@matthiasm.com>2011-09-28 03:35:51 +0000
commit8f41d8545428d4302ede182fed250a0953d81155 (patch)
tree8806309ee5f01746dc0d4d74af2a738e4a1c6f4d /src/Fl_Menu.cxx
parentd5822e35e7e3bde39b9c3db0547ac7b4d00a13d5 (diff)
STR 2711: fixed radio menu button drawing.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9071 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Menu.cxx')
-rw-r--r--src/Fl_Menu.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx
index 39d7dc173..1162c0238 100644
--- a/src/Fl_Menu.cxx
+++ b/src/Fl_Menu.cxx
@@ -139,7 +139,7 @@ int Fl_Menu_Item::measure(int* hp, const Fl_Menu_* m) const {
int w = 0; int h = 0;
l.measure(w, hp ? *hp : h);
fl_draw_shortcut = 0;
- if (flags & (FL_MENU_TOGGLE|FL_MENU_RADIO)) w += 14;
+ if (flags & (FL_MENU_TOGGLE|FL_MENU_RADIO)) w += FL_NORMAL_SIZE;
return w;
}
@@ -188,11 +188,8 @@ void Fl_Menu_Item::draw(int x, int y, int w, int h, const Fl_Menu_* m,
if (value()) {
int tW = (W - Fl::box_dw(FL_ROUND_DOWN_BOX)) / 2 + 1;
if ((W - tW) & 1) tW++; // Make sure difference is even to center
- int td = Fl::box_dx(FL_ROUND_DOWN_BOX) + 1;
+ int td = (W - tW) / 2;
if (Fl::scheme()) {
- // Offset the radio circle...
- td ++;
-
if (!strcmp(Fl::scheme(), "gtk+")) {
fl_color(FL_SELECTION_COLOR);
tW --;
@@ -332,7 +329,8 @@ menuwindow::menuwindow(const Fl_Menu_Item* m, int X, int Y, int Wp, int Hp,
int hh;
int w1 = m->measure(&hh, button);
if (hh+LEADING>itemheight) itemheight = hh+LEADING;
- if (m->flags&(FL_SUBMENU|FL_SUBMENU_POINTER)) w1 += 14;
+ if (m->flags&(FL_SUBMENU|FL_SUBMENU_POINTER))
+ w1 += FL_NORMAL_SIZE;
if (w1 > W) W = w1;
// calculate the maximum width of all shortcuts
if (m->shortcut_) {