+ tb_height = (pw->passwd_font->ascent + pw->passwd_font->descent +
+ (pw->shadow_width * 4));
+
+ /* the "User:" prompt
+ */
+ y1 += spacing;
+ y2 = y1;
+ XSetForeground (si->dpy, gc1, pw->foreground);
+ XSetFont (si->dpy, gc1, pw->label_font->fid);
+ y1 += (spacing + tb_height);
+ x2 = (x1 + pw->internal_border +
+ MAX(string_width (pw->label_font, pw->user_label),
+ string_width (pw->label_font, pw->passwd_label)));
+ XDrawString (si->dpy, si->passwd_dialog, gc1,
+ x2 - string_width (pw->label_font, pw->user_label),
+ y1,
+ pw->user_label, strlen(pw->user_label));
+
+ /* the "Password:" prompt
+ */
+ y1 += (spacing + tb_height);
+ XDrawString (si->dpy, si->passwd_dialog, gc1,
+ x2 - string_width (pw->label_font, pw->passwd_label),
+ y1,
+ pw->passwd_label, strlen(pw->passwd_label));
+
+
+ XSetForeground (si->dpy, gc2, pw->passwd_background);
+
+ /* the "user name" text field
+ */
+ y1 = y2;
+ XSetForeground (si->dpy, gc1, pw->passwd_foreground);
+ XSetFont (si->dpy, gc1, pw->passwd_font->fid);
+ y1 += (spacing + tb_height);
+ x2 += (pw->shadow_width * 4);
+
+ pw->passwd_field_width = x3 - x2 - pw->internal_border;
+ pw->passwd_field_height = (pw->passwd_font->ascent +
+ pw->passwd_font->descent +
+ pw->shadow_width);
+
+ XFillRectangle (si->dpy, si->passwd_dialog, gc2,
+ x2 - pw->shadow_width,
+ y1 - (pw->passwd_font->ascent + pw->passwd_font->descent),
+ pw->passwd_field_width, pw->passwd_field_height);
+ XDrawString (si->dpy, si->passwd_dialog, gc1, x2, y1,
+ pw->user_string, strlen(pw->user_string));
+
+ /* the "password" text field
+ */
+ y1 += (spacing + tb_height);
+
+ pw->passwd_field_x = x2 - pw->shadow_width;
+ pw->passwd_field_y = y1 - (pw->passwd_font->ascent +
+ pw->passwd_font->descent);
+
+ /* The shadow around the text fields
+ */
+ y1 = y2;
+ y1 += (spacing + (pw->shadow_width * 3));
+ x1 = x2 - (pw->shadow_width * 2);
+ x2 = pw->passwd_field_width + (pw->shadow_width * 2);
+ y2 = pw->passwd_field_height + (pw->shadow_width * 2);
+
+ draw_shaded_rectangle (si->dpy, si->passwd_dialog,
+ x1, y1, x2, y2,
+ pw->shadow_width,
+ pw->shadow_bottom, pw->shadow_top);
+
+ y1 += (spacing + pw->passwd_font->ascent + pw->passwd_font->descent +
+ (pw->shadow_width * 4));
+ draw_shaded_rectangle (si->dpy, si->passwd_dialog,
+ x1, y1, x2, y2,
+ pw->shadow_width,
+ pw->shadow_bottom, pw->shadow_top);
+
+ /* the logo
+ */
+ XSetForeground (si->dpy, gc1, pw->logo_foreground);
+ XSetForeground (si->dpy, gc2, pw->logo_background);
+
+ x1 = pw->shadow_width * 3;
+ y1 = pw->shadow_width * 3;
+ x2 = pw->logo_width - (pw->shadow_width * 6);
+ y2 = pw->logo_height - (pw->shadow_width * 6);
+
+ XFillRectangle (si->dpy, si->passwd_dialog, gc2, x1, y1, x2, y2);
+ skull (si->dpy, si->passwd_dialog, gc1, gc2,
+ x1 + pw->shadow_width, y1 + pw->shadow_width,
+ x2 - (pw->shadow_width * 2), y2 - (pw->shadow_width * 2));
+
+ /* The thermometer
+ */
+ pw->thermo_field_x = pw->logo_width + pw->shadow_width;
+ pw->thermo_field_y = pw->shadow_width * 3;
+ pw->thermo_field_height = pw->height - (pw->shadow_width * 6);
+
+ /* Solid border inside the logo box. */
+ XSetForeground (si->dpy, gc1, pw->foreground);
+ XDrawRectangle (si->dpy, si->passwd_dialog, gc1, x1, y1, x2-1, y2-1);
+
+ /* The shadow around the logo
+ */
+ draw_shaded_rectangle (si->dpy, si->passwd_dialog,
+ pw->shadow_width * 2,
+ pw->shadow_width * 2,
+ pw->logo_width - (pw->shadow_width * 4),
+ pw->logo_height - (pw->shadow_width * 4),
+ pw->shadow_width,
+ pw->shadow_bottom, pw->shadow_top);
+
+ /* The shadow around the thermometer