summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2011-05-30 04:26:35 +0000
committercorvid <corvid@lavabit.com>2011-05-30 04:26:35 +0000
commit9e16e1e3f9e8879cbb21e67582d103dba317193c (patch)
treefa67ced2686f5624b6cc6ae7014c28ac37a8ef68 /src
parent337e93ffdc71a9a93090282c2152c21229db0995 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/dialog.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dialog.cc b/src/dialog.cc
index 51f44562..6112c46b 100644
--- a/src/dialog.cc
+++ b/src/dialog.cc
@@ -261,9 +261,9 @@ int a_Dialog_user_password(const char *message, UserPasswordCB cb, void *vp)
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 */