diff options
| author | Greg Ercolano <erco@seriss.com> | 2018-03-31 17:17:37 +0000 |
|---|---|---|
| committer | Greg Ercolano <erco@seriss.com> | 2018-03-31 17:17:37 +0000 |
| commit | 309d9a61b9759ad2ecc1c85458d3b9a8b97c575b (patch) | |
| tree | 458433893f733e012aee2685b845b24ca2b623f3 /src/Fl.cxx | |
| parent | 69584dda96eeae60dbb4fe70a1b452e0effce224 (diff) | |
Added Fl::menu_linespacing() to solve STR# 2927.
Method name follows Fl_Tree::linespacing().
Implemented similarly to Fl::scrollbar_size(), since its use crosses Fl_Menu_Item and 'menuwindow' classes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12815 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl.cxx')
| -rw-r--r-- | src/Fl.cxx | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx index 011e978e0..8695add93 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -136,7 +136,8 @@ int Fl::damage_, Fl::e_is_click, Fl::e_keysym, Fl::e_original_keysym, - Fl::scrollbar_size_ = 16; + Fl::scrollbar_size_ = 16, + Fl::menu_linespacing_ = 4; // 4: was a local macro in Fl_Menu.cxx called "LEADING" char *Fl::e_text = (char *)""; int Fl::e_length; @@ -232,6 +233,23 @@ void Fl::scrollbar_size(int W) { scrollbar_size_ = W; } +/** + Gets the default line spacing used by menus. + \returns The default line spacing, in pixels. +*/ +int Fl::menu_linespacing() { + return menu_linespacing_; +} + +/** + Sets the default line spacing used by menus. + Default is 4. + \param[in] H The new default line spacing between menu items, in pixels. +*/ +void Fl::menu_linespacing(int H) { + menu_linespacing_ = H; +} + /** Returns whether or not the mouse event is inside the given rectangle. |
