=== modified file 'src/user-list.vala' --- a/src/user-list.vala 2012-11-20 21:54:15 +0000 +++ b/src/user-list.vala 2013-02-01 02:10:01 +0000 @@ -327,6 +327,21 @@ private void redraw_login_box () { + /* Resize to fit messages */ + var vertical_offset = 0.0; + foreach (var m in messages) + { + int w, h; + m.layout.get_pixel_size (out w, out h); + vertical_offset += h; + } + var new_box_height = 3 + (int) vertical_offset / grid_size; + if (new_box_height != box_height) + { + box_height = new_box_height; + allocate_login_box (); + } + Gtk.Allocation allocation; login_box.get_allocation (out allocation); queue_draw_area (allocation.x, allocation.y, allocation.width, allocation.height); @@ -831,7 +846,7 @@ /* Put prompt entry and login button inside login box */ child_allocation.x = allocation.x + box_x + grid_size / 2; - child_allocation.y = allocation.y + box_y + grid_size * 2 - grid_size / 4; + child_allocation.y = allocation.y + box_y + grid_size * (box_height - 1) - grid_size / 4; child_allocation.width = grid_size * (box_width - 1); prompt_entry.get_preferred_height (null, out child_allocation.height); prompt_entry.size_allocate (child_allocation); @@ -1090,7 +1105,7 @@ int w, h; m.layout.get_pixel_size (out w, out h); - c.move_to (grid_size / 2, grid_size * 1.5 - vertical_offset + border); + c.move_to (grid_size / 2, grid_size * (box_height - 1.5) - vertical_offset + border); vertical_offset -= h; var r = 1.0;