Community
Participate
Working Groups
The overview ruler is not correctly rendered. The red/yellow square at the bottom should be at the top. 1. switch to Dark theme 2. restart 3. paste: class Bug { bug }
Just to note, this is happening even without the themed scrollbars for me (so, doesn't seem related to 430278). I.e.: In default theme, open file > make error as the first thing > red square appears at bottom > switch focused editor > red square appears at top again. If file is saved with error and reopened the red square also appears at the bottom.
Ok, I investigated a bit more and this seems a deliberate choice: if there are no arrows, draw things at the bottom... this has always happened at PyDev because it hides the vertical bar -- now I know why ;) So, this is a side-effect of hiding the scroll-bars to draw the themed bar -- also, reproducing in the classic layout doesn't always happen (although also probably related). Still, when showing things at the bottom, the overview ruler has some issues: it seems that the error indicator and the bar for other things can overlap... also, it's drawing a strange line in the end when it's at the bottom (because at org.eclipse.jface.text.source.OverviewRuler.HeaderPainter.paintControl(PaintEvent), line 302 it'll draw it if !isOnTop. I'm not sure whether the best place would be at the top or bottom in this case (the idea seems to be aligning with the horizontal bar at the bottom as there are no arrows, so, I'm considering keeping this behavior). I'm on to fix the overlap and drawing of the un-needed line (it's even stranger because the line is drawn at the bottom, so, effectively it's separating nothing -- but I think not having any line would be better in this case, even if it was at the proper position).
Ok, one more step in my understanding of the related code: I was investigating a bit more and discovered that in Linux it actually does not show the red/yellow square at the bottom (because the scroll bar on Linux does not have any arrows). Also, the current version has some bugs if the scroll bars are hidden (because it asks for the scroll bar thumb size and it returns 0 in this case -- and all the computations from there on become wrong). So, I'm going to submit a pull request which fixes those issues: the red/yellow square will be invisible (as it is on Linux) when the scroll bar is hidden and a proper thumb size is computed -- this make the overview ruler work properly again even if the scroll bar is invisible (which for all practical purposes is the case on the themed scroll bar).
New Gerrit change created: https://git.eclipse.org/r/69791
Anyone available to take a look at the pull request ( https://git.eclipse.org/r/69791 )? i.e.: this fixes overview ruler in eclipse.platform.text to work properly when an editor doesn't have scroll bars (without this fix annotations stay at the wrong position and the red/yellow square is using the same space that the overview ruler occupies).
(In reply to Fabio Zadrozny from comment #5) > Anyone available to take a look at the pull request ( > https://git.eclipse.org/r/69791 )? I hope that Dani will do this. He found the issue and is very familiar with eclipse.platform.text. Dani?
Ping? As a note, I think this is a pretty critical fix... the way it is, the overview ruler layout is wrong (and the annotations also appear in the wrong place).
(In reply to Fabio Zadrozny from comment #1) > Just to note, this is happening even without the themed scrollbars for me > (so, doesn't seem related to 430278). > > I.e.: In default theme, open file > make error as the first thing > red > square appears at bottom > switch focused editor > red square appears at top > again. On which platform? I cannot reproduce this on Windows. If you can, please provide exact steps. > I was investigating a bit more and discovered that in Linux it actually does > not show the red/yellow square at the bottom (because the scroll bar on Linux > does not have any arrows). That's not true, see attached picture taken from a Linux box. Your proposed change breaks this, i.e. removes the summary square.
Created attachment 260926 [details] Picture showing square on Linux
(In reply to Dani Megert from comment #8) > (In reply to Fabio Zadrozny from comment #1) > > Just to note, this is happening even without the themed scrollbars for me > > (so, doesn't seem related to 430278). > > > > I.e.: In default theme, open file > make error as the first thing > red > > square appears at bottom > switch focused editor > red square appears at top > > again. > > On which platform? I cannot reproduce this on Windows. If you can, please > provide exact steps. Humm, this happened to me only with those same steps on windows (although now that I got the latest build I can no longer reproduce it anymore here either... I'll keep that on the background for now, if I can reproduce it in a more consistent way I'll create a bug for that/try to debug it and give more details and possibly a fix). > > I was investigating a bit more and discovered that in Linux it actually does > > not show the red/yellow square at the bottom (because the scroll bar on Linux > does not have any arrows). > > That's not true, see attached picture taken from a Linux box. Your proposed > change breaks this, i.e. removes the summary square. Actually, I think you're comparing with the case which is not the same as the case for the themed scroll bar (which is smaller when there's no mouse interaction and becomes bigger when the mouse hovers over the scroll). For that use-case, it doesn't show it (I'm attaching a screenshot), so, I'd like you to reconsider it -- also, it doesn't change the behavior of the native case (so, it doesn't break it, just makes it compatible with the same use-case) and makes it consistent with the case when there's no visible scroll bar (where showing the square is odd as the layout has no real space for it). So, I'd like you to reconsider it given that it's consistent with the use-case where the scroll bar changes size (and it keeps the behavior when there's a fixed size scroll bar).
Created attachment 260930 [details] Linux screenshot on variable-sized scroll bar
Actually, I saw what you meant now... if there's a scroll with fixed size < 6px it'll go down and my change makes it invisible... I'll fix that so that the current use case is kept.
Ok, just updated https://git.eclipse.org/r/#/c/69791/ to keep the old behavior (when arrow size < 6, but still > 0).
(In reply to Fabio Zadrozny from comment #13) > Humm, this happened to me only with those same steps on windows (although > now that I got the latest build I can no longer reproduce it anymore here > either... I'll keep that on the background for now, if I can reproduce it in > a more consistent way I'll create a bug for that/try to debug it and give > more details and possibly a fix). Bug 485540 contains steps and a fix. Please retest against the latest master and if still necessary, update your latest Gerrit change.
The error is still there (and the gerrit review -- just updated -- fixes it). As a note, to reproduce the issue, create a file with the contents below -- you can see that the annotations are all far off and clicking on the overview ruler doesn't provide a proper mapping to the editor. -------------- package scroll; public class CheckLock { public static void main(String[] args) { // comments // comments // comments // comments // comments // comments } } error error // comments // comments // comments // comments // comments // comments // comments // comments // comments // comments // comments // comments // comments // comments // comments // comments // comments // comments error error --------------
(In reply to Fabio Zadrozny from comment #15) > The error is still there (and the gerrit review -- just updated -- fixes it). This version still removes the square on Linux.
(In reply to Dani Megert from comment #16) > (In reply to Fabio Zadrozny from comment #15) > > The error is still there (and the gerrit review -- just updated -- fixes it). > > This version still removes the square on Linux. But this is the idea when the scrollbar is themed as that's consistent with the behavior of the scroll which has a variable size (or do you mean it removes the square on the native version too?)
(In reply to Fabio Zadrozny from comment #17) > (In reply to Dani Megert from comment #16) > > (In reply to Fabio Zadrozny from comment #15) > > > The error is still there (and the gerrit review -- just updated -- fixes it). > > > > This version still removes the square on Linux. > > But this is the idea when the scrollbar is themed as that's consistent with > the behavior of the scroll which has a variable size (or do you mean it > removes the square on the native version too?) Sorry, but we won't remove this feature for Linux users just because of the themed scroll bar. No way.
(In reply to Dani Megert from comment #18) > (In reply to Fabio Zadrozny from comment #17) > > (In reply to Dani Megert from comment #16) > > > (In reply to Fabio Zadrozny from comment #15) > > > > The error is still there (and the gerrit review -- just updated -- fixes it). > > > > > > This version still removes the square on Linux. > > > > But this is the idea when the scrollbar is themed as that's consistent with > > the behavior of the scroll which has a variable size (or do you mean it > > removes the square on the native version too?) > > Sorry, but we won't remove this feature for Linux users just because of the > themed scroll bar. No way. Yep, it removes it on the native version on Linux.
Ok, sorry then, it shouldn't do that (it should only remove it when it's in the themed version). I'll take a better look at this (maybe it works for me because of a different Linux theme). Can you give more details on the Linux flavor/theme you're using so that I can properly reproduce it? (i.e.: how can I reproduce exactly that screenshot you took).
(In reply to Fabio Zadrozny from comment #20) > Can you give more details on the Linux flavor/theme you're using so that I > can properly reproduce it? (i.e.: how can I reproduce exactly that > screenshot you took). Ubuntu 12.04, GTK 3.4.2, Metacity, Ambiance theme (default).
Hi Dani, Great, I was able to reproduce it here (it was actually the same env I had, the detail was setting LIBOVERLAY_SCROLLBAR to 0 or 1 to get a different behavior). So, I just updated https://git.eclipse.org/r/#/c/69791/ to keep the existing behavior with that setting and account for the case where there aren't visible scroll bars (which is also the case for the themed scroll bar).
It'd be nice if this could be reviewed before M7 is out (the overview ruler is almost unusable without this fix when using the themed scroll bar).
Note: the gerrit review also fixes: https://bugs.eclipse.org/bugs/show_bug.cgi?id=401230 (so, having this in should also allow https://bugs.eclipse.org/bugs/show_bug.cgi?id=424501 to be properly implemented). As this bug has a fix, I'll close https://bugs.eclipse.org/bugs/show_bug.cgi?id=401230 as a duplicate of this one.
*** Bug 401230 has been marked as a duplicate of this bug. ***
Dani, do you think you can take a look at this one so that it can enter M7?
(In reply to Fabio Zadrozny from comment #26) > Dani, do you think you can take a look at this one so that it can enter M7? Yes, it's on my weekend duty list.
Gerrit change https://git.eclipse.org/r/69791 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.text.git/commit/?id=1cd3bf94801aa5a2c23b161d86866cebd9de529b