summaryrefslogtreecommitdiff
path: root/fluid
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2023-11-25 18:20:02 +0100
committerMatthias Melcher <github@matthiasm.com>2023-11-25 18:20:08 +0100
commit34ed30fe1a710f6294e23003aa385bd6da6cb326 (patch)
tree4fb8628a64a3c2943b23a9f7646206cb38bba69a /fluid
parent00808500926af83a531fc1fdc0b2df9716743e8b (diff)
Adds `linespacing()` to `Fl_Browser_` and all derived widgets
Diffstat (limited to 'fluid')
-rw-r--r--fluid/widget_browser.cxx8
1 files changed, 4 insertions, 4 deletions
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<currentV+margin_height)