diff options
author | corvid <corvid@lavabit.com> | 2011-01-23 02:45:29 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2011-01-23 02:45:29 +0000 |
commit | 2fb7ff9435fd37ecec8c93c7cc20468aa0db6020 (patch) | |
tree | b762a82ece88fee7b763f9ae056bc32c05527e57 | |
parent | 5f55026c7f2e393749f65bbe6f284f76fabd6398 (diff) |
FltkListResource::sizeRequest
-rw-r--r-- | dw/fltkui.cc | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/dw/fltkui.cc b/dw/fltkui.cc index 12089090..bbc85e16 100644 --- a/dw/fltkui.cc +++ b/dw/fltkui.cc @@ -1025,21 +1025,14 @@ void FltkListResource::addItem (const char *str, bool enabled, bool selected) void FltkListResource::sizeRequest (core::Requisition *requisition) { -#if 0 -PORT1.3 if (style) { FltkFont *font = (FltkFont*)style->font; - ::fltk::setfont(font->font,font->size); + fl_font(font->font,font->size); int rows = getNumberOfItems(); if (showRows < rows) { rows = showRows; } - /* - * The widget sometimes shows scrollbars when they are not required. - * The following values try to keep any scrollbars from obscuring - * options, at the cost of showing too much whitespace at times. - */ - requisition->width = getMaxStringWidth() + 24; + requisition->width = getMaxStringWidth() + Fl::scrollbar_size(); requisition->ascent = font->ascent + 2 + (rows - 1) * (font->ascent + font->descent + 1); requisition->descent = font->descent + 3; @@ -1048,11 +1041,6 @@ PORT1.3 requisition->ascent = 1; requisition->descent = 0; } -#else - requisition->width = 100; - requisition->ascent = 14 * showRows; - requisition->descent = 0; -#endif } bool FltkListResource::isSelected (int index) |