From 34ed30fe1a710f6294e23003aa385bd6da6cb326 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Sat, 25 Nov 2023 18:20:02 +0100 Subject: Adds `linespacing()` to `Fl_Browser_` and all derived widgets --- fluid/widget_browser.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'fluid') diff --git a/fluid/widget_browser.cxx b/fluid/widget_browser.cxx index 993b564fb..b27d7a664 100644 --- a/fluid/widget_browser.cxx +++ b/fluid/widget_browser.cxx @@ -252,7 +252,7 @@ int Widget_Browser::item_height(void *l) const { \return height in FLTK units */ int Widget_Browser::incr_height() const { - return textsize()+5; + return textsize() + 5 + linespacing(); } /** @@ -552,15 +552,15 @@ void Widget_Browser::display(Fl_Type *inNode) { Fl_Type *p=Fl_Type::first; for ( ; p && p!=inNode; p=p->next) { if (p->visible) - nodeV += item_height(p); + nodeV += item_height(p) + linespacing(); } if (p) { int xx, yy, ww, hh; bbox(xx, yy, ww, hh); int frame_top = xx-x(); int frame_bottom = frame_top + hh; - int node_height = item_height(inNode); - int margin_height = 2 * item_quick_height(inNode); + int node_height = item_height(inNode) + linespacing(); + int margin_height = 2 * (item_quick_height(inNode) + linespacing()); if (margin_height>hh/2) margin_height = hh/2; // is the inNode above the current scroll position? if (nodeV