Author: matt
Date: 2011-09-27 20:35:51 -0700 (Tue, 27 Sep 2011)
New Revision: 9071
Log:
STR 2711: fixed radio menu button drawing.
Modified:
branches/branch-1.3/src/Fl_Menu.cxx
Modified: branches/branch-1.3/src/Fl_Menu.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Menu.cxx 2011-09-28 02:44:56 UTC (rev 9070)
+++ branches/branch-1.3/src/Fl_Menu.cxx 2011-09-28 03:35:51 UTC (rev 9071)
@@ -139,7 +139,7 @@
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 @@
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 @@
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_) {
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit