adium/adium

Parents e30c939bb5dc
Children 05a13b42f466
Take the toolbar/titlebar into account when resizing the contact list. Refs #14433
--- a/Source/AIListController.m Sat Feb 11 00:51:32 2012 +0100
+++ b/Source/AIListController.m Thu Feb 09 22:15:23 2012 -0500
@@ -355,6 +355,11 @@
//Now, figure out how big the view wants to be and add that to our frame
newWindowFrame.size.height += desiredHeight;
+
+ //Don't set a height smaller than the toolbar
+ CGFloat windowHeight = NSHeight(windowFrame);
+ CGFloat contentHeight = NSHeight([theWindow.contentView frame]);
+ newWindowFrame.size.height = MAX(windowHeight - contentHeight, NSHeight(newWindowFrame));
//Vertical positioning and size if we are placed on a screen
if (NSHeight(newWindowFrame) >= NSHeight(boundingFrame)) {