Avoid the bouncing effect when scrolling on Lion. This looks very bad when using a borderless window.
authorThijs Alkemade <thijsalkemade@gmail.com>
Fri, 14 Oct 2011 17:29:49 +0200
changeset 3641 e74f6e415da3
parent 3640 21eae8019bae
child 3642 e9272fee64fe
Avoid the bouncing effect when scrolling on Lion. This looks very bad when using a borderless window.

Fixes #15455
ChangeLogs/Changes.txt
Source/AIListWindowController.m
--- a/ChangeLogs/Changes.txt	Fri Oct 14 17:09:47 2011 +0200
+++ b/ChangeLogs/Changes.txt	Fri Oct 14 17:29:49 2011 +0200
@@ -6,6 +6,9 @@
  * Gadu-Gadu
    * Fix logging in on PPC Macs.
 
+  Contact List
+   * Turned off rubber band scrolling for the contact list, as this looks bad when using a borderless window. (#15455)
+
 Version 1.4.3 (09/04/2011)
  * Fixed a security vulnerability related to file transfers.
  * libpurple:
--- a/Source/AIListWindowController.m	Fri Oct 14 17:09:47 2011 +0200
+++ b/Source/AIListWindowController.m	Fri Oct 14 17:29:49 2011 +0200
@@ -173,6 +173,13 @@
 																	  inOutlineView:contactListView
 																	   inScrollView:scrollView_contactList 
 																		   delegate:self];
+	
+	/* Avoid the bouncing effect when scrolling on Lion. This looks very bad when using a borderless window.
+	 * TODO: (10.7+) remove this if
+	 */
+	if ([scrollView_contactList respondsToSelector:@selector(setVerticalScrollElasticity:)]) {
+		[scrollView_contactList setVerticalScrollElasticity:1]; // NSScrollElasticityNone
+	}
 
 	//super's windowDidLoad will restore our location, which is based upon the contactListRoot
 	[super windowDidLoad];