Edzard Egberts schrieb:

The appended patch realises this for Fl_Widget and after rebuilding FLTK
all widgets will zoom their fonts, until h0 is cleared
(pWidget->H0(0);).

There was a little bug - the resize() should use new H, not current h().
Fixed patch appended.
--- ./fltk-1.3_Original/src/Fl_Widget.cxx       2010-12-02 18:58:58.000000000 
+0100
+++ ./fltk-1.3/src/Fl_Widget.cxx        2012-04-14 12:41:59.516501000 +0200
@@ -132,12 +132,16 @@
   color_        = FL_GRAY;
   color2_       = FL_GRAY;
   when_                 = FL_WHEN_RELEASE;
-
+  h0            = H;
+  l0            = FL_NORMAL_SIZE;
+  t0            = FL_NORMAL_SIZE;
   parent_ = 0;
   if (Fl_Group::current()) Fl_Group::current()->add(this);
 }
 
 void Fl_Widget::resize(int X, int Y, int W, int H) {
+  labelsize(h0 ? (l0 * H)/h0 : l0);
+  textsize(h0 ? (t0 * H)/ h0 : t0);
   x_ = X; y_ = Y; w_ = W; h_ = H;
 }
 
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to