DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New]
Link: http://www.fltk.org/str.php?L2008
Version: 2.0-feature
trying to set a column label to a multiline label (something with "\n")
doesn't result in a correctly sized header.
Attached is a half fix. It leverages the current BButton::layout to
compute the height of the first column not by calls to the current font
but by a call to measure_label(). leading() + 3 are added because adding
these *seem* to result in the same typical height as computed before.
Link: http://www.fltk.org/str.php?L2008
Version: 2.0-feature
Index: src/Browser.cxx
===================================================================
--- src/Browser.cxx (revision 6147)
+++ src/Browser.cxx (working copy)
@@ -1743,8 +1743,9 @@
} // handle() method
void layout() {
- setfont(labelfont(),labelsize());
- h(int(getascent()+getdescent()+leading()+2));
+ int wide, high;
+ measure_label(wide, high);
+ h(high + leading() + 3);
Button::layout();
}
}; // BButton class
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev