[PATCH] tweak TEXTAREA vertical alignment
This is a layout tweak. It moves the baseline of a FltkMultiLineTextResource from the top of the text to the bottom of the top line. Regards, Jeremy Henty diff -pru -- dw2-ref/dw/fltkui.cc dw2-cur/dw/fltkui.cc --- dw2-ref/dw/fltkui.cc 2007-12-17 16:00:34.000000000 +0000 +++ dw2-cur/dw/fltkui.cc 2007-12-17 17:14:21.000000000 +0000 @@ -571,11 +571,14 @@ void FltkMultiLineTextResource::sizeRequ if (style) { FltkFont *font = (FltkFont*)style->font; requisition->width = - (int)::fltk::getwidth ("M", 1) * numCols - + 2 * RELIEF_X_THICKNESS; - requisition->ascent = RELIEF_Y_THICKNESS; + (int)::fltk::getwidth ("M", 1) * numCols + + 2 * RELIEF_X_THICKNESS; + requisition->ascent = + font->ascent + RELIEF_Y_THICKNESS; requisition->descent = - (font->ascent + font->descent) * numRows + RELIEF_Y_THICKNESS; + font->descent + + (font->ascent + font->descent) * (numRows - 1) + + RELIEF_Y_THICKNESS; } else { requisition->width = 1; requisition->ascent = 1;
participants (2)
-
jcid@dillo.org
-
onepoint@starurchin.org