summaryrefslogtreecommitdiff
path: root/src/Fl_Menu.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2024-08-27 15:13:32 +0200
committerMatthias Melcher <github@matthiasm.com>2024-08-27 15:13:32 +0200
commitec05f78d98d8e38ea34eb1bd73647fa5b8b35f81 (patch)
tree64768c2ff44f44200e3d9d8463924fc9450be973 /src/Fl_Menu.cxx
parent5879e7fae7d34c037f2ac02c6c7fca86c42a186d (diff)
Adding horiizonatl and vertical label margin
- sizeof(Fl_Widget) not increased - label positions can be adjusted - try it out in test/label app - full support in FLUD
Diffstat (limited to 'src/Fl_Menu.cxx')
-rw-r--r--src/Fl_Menu.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx
index 79228de80..a3a1c82e6 100644
--- a/src/Fl_Menu.cxx
+++ b/src/Fl_Menu.cxx
@@ -261,7 +261,7 @@ int Fl_Menu_Item::measure(int* hp, const Fl_Menu_* m) const {
l.font = labelsize_ || labelfont_ ? labelfont_ : (m ? m->textfont() : FL_HELVETICA);
l.size = labelsize_ ? labelsize_ : m ? m->textsize() : FL_NORMAL_SIZE;
l.color = FL_FOREGROUND_COLOR; // this makes no difference?
- l.spacing = 0;
+ l.h_margin_ = l.v_margin_ = l.spacing = 0;
fl_draw_shortcut = 1;
int w = 0; int h = 0;
l.measure(w, hp ? *hp : h);
@@ -281,7 +281,7 @@ void Fl_Menu_Item::draw(int x, int y, int w, int h, const Fl_Menu_* m,
l.font = labelsize_ || labelfont_ ? labelfont_ : (m ? m->textfont() : FL_HELVETICA);
l.size = labelsize_ ? labelsize_ : m ? m->textsize() : FL_NORMAL_SIZE;
l.color = labelcolor_ ? labelcolor_ : m ? m->textcolor() : int(FL_FOREGROUND_COLOR);
- l.spacing = 0;
+ l.h_margin_ = l.v_margin_ = l.spacing = 0;
if (!active()) l.color = fl_inactive((Fl_Color)l.color);
if (selected) {
Fl_Color r = m ? m->selection_color() : FL_SELECTION_COLOR;