diff options
author | Siva Velusamy <vsiva@google.com> | 2012-09-25 08:26:52 -0700 |
---|---|---|
committer | Siva Velusamy <vsiva@google.com> | 2012-09-28 15:00:57 -0700 |
commit | 54e33b7a1844050a33396e744f6b2ac7435039e7 (patch) | |
tree | 4c5d5c46ced5eadfe2970d5c6f92f0e9eadd9734 /ddms/app | |
parent | 2061ee5a00fe40f36e60a4d54ce8e77085c22cd4 (diff) | |
download | sdk-54e33b7a1844050a33396e744f6b2ac7435039e7.zip sdk-54e33b7a1844050a33396e744f6b2ac7435039e7.tar.gz sdk-54e33b7a1844050a33396e744f6b2ac7435039e7.tar.bz2 |
logcat: Support auto scroll lock.
Another go at adding support for automatically enabling/disabling
scroll lock. Past attempts have been brittle because of differences
in how Windows, Linux and Mac handle the scrollbar.
The key to getting this work consistently across platforms seems
to be in explicitly setting the range of values for the scrollbar.
Setting the maximum to be a high enough value relative to the
thumb allows accurate detection of even minor movements away from
the bottom of the scrollbar.
Change-Id: Ic3259cc4e2e8a20f3a87ce4bf234217cea792f88
Diffstat (limited to 'ddms/app')
-rw-r--r-- | ddms/app/src/com/android/ddms/PrefsDialog.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ddms/app/src/com/android/ddms/PrefsDialog.java b/ddms/app/src/com/android/ddms/PrefsDialog.java index 84304df..acadeb8 100644 --- a/ddms/app/src/com/android/ddms/PrefsDialog.java +++ b/ddms/app/src/com/android/ddms/PrefsDialog.java @@ -461,6 +461,12 @@ public final class PrefsDialog { "Maximum number of logcat messages to buffer", getFieldEditorParent()); addField(maxMessages); + + BooleanFieldEditor autoScrollLock = new BooleanFieldEditor( + LogCatPanel.AUTO_SCROLL_LOCK_PREFKEY, + "Automatically enable/disable scroll lock based on the scrollbar position", + getFieldEditorParent()); + addField(autoScrollLock); } } } |