changeset 2065:f5114f4659b6

user/pass dialog msg bounds A label won't fill an entire box. How much of a gap is there? Well, you know what the inside of fltk is like -- a million cases of "Let's add two here; it'll look nice!" Looking at, e.g., Fl_Tooltip, fl_ask, they just pick numbers, too, to make up for it. The "6" might turn out not to be enough under certain circumstances.
author corvid <corvid@lavabit.com>
date Mon, 30 May 2011 04:26:35 +0000
parents 0e4d2e07d338
children 5660c1916c58
files src/dialog.cc
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/dialog.cc	Sun May 29 20:14:42 2011 +0000
+++ b/src/dialog.cc	Mon May 30 04:26:35 2011 +0000
@@ -261,9 +261,9 @@
    msg->align(FL_ALIGN_INSIDE | FL_ALIGN_TOP_LEFT | FL_ALIGN_WRAP);
 
    fl_font(msg->labelfont(), msg->labelsize());
+   msg_w -= 6; /* The label doesn't fill the entire box. */
    fl_measure(msg->label(), msg_w, msg_h, 0); /* fl_measure wraps at msg_w */
-   msg_w = MIN(msg_w, msg->w());
-   msg->size(msg_w, msg_h);
+   msg->size(msg->w(), msg_h);
    window->add(msg);
 
    /* inputs */