Bug 290600 - [rulers] overview ruler and scroll bar thumb not properly synchronized
Summary: [rulers] overview ruler and scroll bar thumb not properly synchronized
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.6   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 minor (vote)
Target Milestone: 3.6 M4   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 40258
Blocks:
  Show dependency tree
 
Reported: 2009-09-25 16:36 EDT by Thomas Watson CLA
Modified: 2009-11-10 08:44 EST (History)
4 users (show)

See Also:


Attachments
compare example. (99.42 KB, image/jpeg)
2009-09-25 16:36 EDT, Thomas Watson CLA
no flags Details
first stab (5.48 KB, patch)
2009-11-05 15:39 EST, Markus Keller CLA
no flags Details | Diff
patch 2 (6.18 KB, patch)
2009-11-06 05:55 EST, Markus Keller CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Watson CLA 2009-09-25 16:36:54 EDT
Created attachment 148172 [details]
compare example.

When using the compare editor on the mac the decorators (not sure on the term)
do not seem to match the location of the changes in the file.  I think this is
because the scroll arrows at the bottom give you less area to work with for the
decorators.

Actually, this seems to be a general issue with decorating the editor scroll
bar on the Mac.  Any warnings and errors in the java editor give me the same
results.  The longer the file the more evident the issue becomes at the bottom
of the file.

I hope this description makes some sense.  Let me know if you need some more
information.
Comment 1 Remy Suen CLA 2009-09-25 17:56:55 EDT
Is this Mac or Carbon? Or both?
Comment 2 Thomas Watson CLA 2009-09-25 18:10:07 EDT
I'm running on Cocoa build.
Comment 3 Boris Bokowski CLA 2009-10-13 16:55:18 EDT
This is well known, and I believe Text would need new API from SWT to be able to fix this. If you want this to be "less wrong", you can change your system preferences to place the scroll arrows at the top and bottom (under "Appearance").
Comment 4 Thomas Watson CLA 2009-10-13 17:22:46 EDT
Thanks Boris.  I did not know you could change that (shows my newbie Mac ignorance) :)
Comment 5 Dani Megert CLA 2009-10-14 03:27:24 EDT
>I believe Text would need new API from SWT to be able to fix this.
See bug 40258.
Comment 6 Markus Keller CLA 2009-11-05 15:39:10 EST
Created attachment 151493 [details]
first stab

First stab at a fix for text editors. Looks good on Cocoa with all 4 arrow placement variants: 2 from System Preferences + 2 hidden options (use TinkerTool et al.).

Need to test on other platforms.

Compare editor will need similar changes in TextMergeViewer.
Comment 7 Markus Keller CLA 2009-11-06 05:55:25 EST
Created attachment 151546 [details]
patch 2

Some tuning. Verified on WinXP.
Comment 8 Markus Keller CLA 2009-11-06 09:02:27 EST
Released to HEAD.

Filed bug 294454 to do the same changes in Compare.
Comment 9 Thomas Watson CLA 2009-11-06 09:13:04 EST
(In reply to comment #7)
> Created an attachment (id=151546) [details]
> patch 2
> 
> Some tuning. Verified on WinXP.

So this is a general issue, not just for Mac?  Is it not as noticeable on windows because the scroll arrows are on top and bottom by default?
Comment 10 Markus Keller CLA 2009-11-06 09:29:40 EST
> So this is a general issue, not just for Mac?  Is it not as noticeable on
> windows because the scroll arrows are on top and bottom by default?

Yes. Up to now, the assumption was that a scrollbar has an arrow on top and an arrow at the bottom, and the arrow buttons are rectangular (same height as scrollbar width). That assumption is correct for WinXP, but was wrong for certain GTK themes (where arrow buttons don't have to be rectangular), and especially wrong on the Mac with both arrows at the end.

The tuning in patch 2 was not a special thing for WinXP but a general glitch in a corner case (when the editor is very small).
Comment 11 Markus Keller CLA 2009-11-09 06:01:17 EST
Additional complication: The Mac hides the thumb and the arrows when the scrollbar is too short and when there's nothing to scroll.

Fixed in HEAD by adding a cache for arrow heights and special computation when scroll bar is too short.
Comment 12 Markus Keller CLA 2009-11-10 08:44:17 EST
Marking as fixed.