| [ Return to Bugs & Features | Roadmap 1.3 | SVN ⇄ GIT ]
STR #2927
Application: | FLTK Library |
Status: | 1 - Closed w/Resolution |
Priority: | 1 - Request for Enhancement, e.g. asking for a feature |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | Core Library |
Summary: | Please make 'LEADING' constant in FL_Menu.cxx an alterable API method |
Version: | 1.3-feature |
Created By: | Lester |
Assigned To: | greg.ercolano |
Fix Version: | 1.4.0 (SVN: v12816) |
Update Notification: | |
Trouble Report Files:
|
#1 | Lester 03:41 Jan 24, 2013 |
| 1.png 14k | |
Trouble Report Comments:
|
#1 | Lester 03:41 Jan 24, 2013 |
| For example, to external variable | |
|
#2 | ianmacarthur 01:39 Jan 28, 2013 |
| Not sure what's being asked for here - the menu's look OK to my eyes... Can you post a mock-up of how you expected it to look? | |
|
#3 | Lester 05:30 Jan 28, 2013 |
| In the attached file (1.png) on left side - menu with LEADING==1, on right side - with LEADING==4 (default value). | |
|
#4 | greg.ercolano 09:31 Mar 31, 2018 |
| There's a macro called 'LEADING' in Fl_Menu_.cxx that sets the line spacing between menu items.. OP is requesting this be alterable.
We have a precedence for this in Fl_Tree, it's called linespacing(), so we should probably use that.
It wouldn't break ABI to add it.
Taking ownership of this one, and will try to add it.
Changing the Summary: a bit for clarity; I too struggled with what was requested: BEFORE: Please replace LEADING constant in FL_Menu.cxx to something changeable AFTER: Please make 'LEADING' constant in FL_Menu.cxx an alterable API method | |
|
#5 | greg.ercolano 10:31 Mar 31, 2018 |
| Committed as r12815.
New method is Fl::menu_linespacing(), 4 being the default. This replaces the 'LEADING' macro.
Note: this /does/ break ABI (have to store the integer somewhere), but since we're working on 1.4.0, this is the perfect time to do it.
Implemented this as a global value similar to Fl::scrollbar_size(), since the use of the 'LEADING' macro crossed several classes (namely Fl_Menu_Item and menuwindow), so there was no one good place to add it. If there is, that can be added later, similar to Fl::scrollbar_size(), which allows both global AND local settings.
Also added a value slider to the menubar demo, so one can experiment with changing the value interactively. | |
|
#6 | greg.ercolano 10:32 Mar 31, 2018 |
| Fixed in Subversion repository. | |
[ Return to Bugs & Features ]
|
| |