| Summary: | [10.7]Awkward Scroll Bars | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Moritz Lichter <lichtemo> |
| Component: | SWT | Assignee: | Silenio Quarti <Silenio_Quarti> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | anshulg, bpasero, lichtemo, lshanmug, mail, markus.kell.r, remy.suen, Silenio_Quarti, ts |
| Version: | 3.7 | ||
| Target Milestone: | 3.7.1 | ||
| Hardware: | Macintosh | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
| Attachments: | |||
|
Description
Moritz Lichter
Created attachment 197352 [details]
Screenshot that shows the current appearance of SWT scrollbars on OS X Lion
The Screenshots shows the current appearance of scrollbars on Mac OS X Lion. As you can see, the old scrollbar background is kept, but the gray slider should just appear about the composite. Also the gray slider is expected to hide automatically if the mouse is not near to it and the user is not using the mouse wheel.
Created attachment 197353 [details]
Screenshot that shows how the scrollbars should look like.
The screenshot shows a scrollbar of Safari. There is no scrollbar background anymore.
This was not complete correct. You are able to get this strange looking scrollbars if you select "Appearance" --> "Show scroll bars" --> "Always". But I think that only very few users will use this option (because the scroll bars look strange). So the SWT scroll bars should be able to adapt the correct look automatically. Created attachment 197629 [details]
Screenshot showing the Appearance options.
This screenshots shows the Appearance panel in the System Preferences of Mac OS Lion. There you can choose whether the scroll bars should always be visible or not.
The scrollbar look depends on a system settings in the General tab. Your problem only happens when the "Show scroll bars" setting is "When Scrolling" either explicitly set or not (i.e. Automatically based on input device). The problem happens because SWT subclasses NSScroller and as of 10.7 subclasses need to implement isCompatibleWithOverlayScrollers to support overlay scrollers. http://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSScroller_Class/Reference/Reference.html#//apple_ref/occ/clm/NSScroller/isCompatibleWithOverlayScrollers Implementing this method does not seem to be enough to solve all the problems. There are two problems I need to investigate: - When the scroll bars are shown in a Tree widget (package explorer for example), it never gets hidden. - The scroll bars are never shown in the Editor. (In reply to comment #5) > There are two problems I need to investigate: > > - When the scroll bars are shown in a Tree widget (package explorer for > example), it never gets hidden. This problem is caused because we overwrite setFrameSize: in our subclass of NSOutlineView. I do not quite understand what is happening given that our implementation of setFrameSize: just calls the super implementation. I tried moving the code to C (removing the JNI bridge), but the problem still happens. Given that we are not doing anything in our sub implementation, I have removed it. > - The scroll bars are never shown in the Editor. We need to call NSScroller.flashScrollers() when the selection of a scrollbars changes in a SWT canvas. This is necessary because the bounds origin of the NSScrollView's content view does not change ever. Fixed http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=beb3230a14d718993438b762d3e460dbe17629f9 This is going to be ported to 3.7.1 once it gets more testing. Reopening to fixed in 3.7.1 Fixed in R3_7_maintenance http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?h=R3_7_maintenance&id=9413f11ce894913df4be638a72bc9544e656aa21 *** Bug 340954 has been marked as a duplicate of this bug. *** *** Bug 340956 has been marked as a duplicate of this bug. *** *** Bug 355290 has been marked as a duplicate of this bug. *** |