changeset 1185:98f25adab072

widgets ascend for textarea and select
author corvid <corvid@lavabit.com>
date Mon, 22 Jun 2009 18:57:50 +0000
parents f33eb9e47d10
children 94bca98ac942
files dw/fltkui.cc
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/dw/fltkui.cc	Mon Jun 22 18:52:29 2009 +0200
+++ b/dw/fltkui.cc	Mon Jun 22 18:57:50 2009 +0000
@@ -697,10 +697,10 @@
          (int)::fltk::getwidth ("n", 1) * numCols +
          2 * RELIEF_X_THICKNESS;
       requisition->ascent =
-         font->ascent + RELIEF_Y_THICKNESS;
+         RELIEF_Y_THICKNESS + font->ascent +
+         (font->ascent + font->descent) * (numRows - 1);
       requisition->descent =
          font->descent +
-         (font->ascent + font->descent) * (numRows - 1) +
          RELIEF_Y_THICKNESS;
    } else {
       requisition->width = 1;
@@ -1310,9 +1310,9 @@
        * options, at the cost of showing too much whitespace at times.
        */
       requisition->width = getMaxStringWidth() + 24;
-      requisition->ascent = font->ascent + 2;
-      requisition->descent = font->descent + 3 +
-                             (rows - 1) * (font->ascent + font->descent + 1);
+      requisition->ascent = font->ascent + 2 +
+                            (rows - 1) * (font->ascent + font->descent + 1);
+      requisition->descent = font->descent + 3;
    } else {
       requisition->width = 1;
       requisition->ascent = 1;