adium 4267:bb9f69f82a5b: Fix improper view layout when resizing ...

commits at adium.im commits at adium.im
Sat Oct 29 20:39:30 UTC 2011


details:	http://hg.adium.im/adium/rev/bb9f69f82a5b
revision:	4267:bb9f69f82a5b
branch:		(none)
author:		Stephen Holt <sholt at adium.im>
date:		Sat Oct 29 13:39:21 2011 -0700

Fix improper view layout when resizing with a MUC's user list on the right side. Fixes #15577.

diffs (33 lines):

diff -r d4988a7a367c -r bb9f69f82a5b Plugins/Dual Window Interface/AIMessageViewController.m
--- a/Plugins/Dual Window Interface/AIMessageViewController.m	Sat Oct 29 11:59:53 2011 -0700
+++ b/Plugins/Dual Window Interface/AIMessageViewController.m	Sat Oct 29 13:39:21 2011 -0700
@@ -1318,12 +1318,12 @@
 			NSRect msgFrame = [splitView_textEntryHorizontal superview].frame;
 			NSRect userFrame = view_userList.frame;
 			CGFloat dividerThickness = [splitView dividerThickness];
+			BOOL userListVisible = [self userListVisible];
 			
-			msgFrame.size.width = currentFrame.size.width - userFrame.size.width - dividerThickness;
 			msgFrame.size.height = currentFrame.size.height;
 			userFrame.size.height = currentFrame.size.height;
 			
-			if ([self userListVisible]) {
+			if (userListVisible) {
 				if (userListOnRight) {
 					userFrame.size.width = currentFrame.size.width - [self _userListViewDividerPositionIgnoringUserMinimum:NO];
 				} else
@@ -1335,8 +1335,13 @@
 				}
 			}
 			
-			if (userListOnRight)
+			if (userListOnRight){
+				msgFrame.size.width = currentFrame.size.width - userFrame.size.width - dividerThickness;
 				userFrame.origin.x = msgFrame.size.width + dividerThickness;
+			} else {
+				msgFrame.origin.x = NSMaxX(userFrame) + dividerThickness;
+				msgFrame.size.width = currentFrame.size.width - userFrame.size.width - dividerThickness;
+			}
 			
 			[view_userList setFrame:userFrame];
 			[[splitView_textEntryHorizontal superview] setFrame:msgFrame];




More information about the commits mailing list