Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 17805

Summary: [painting] Print margin drawn on top of text
Product: [Eclipse Project] Platform Reporter: George Hedges <george>
Component: TextAssignee: Paul Pazderski <paul-eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: alhashash, artist, bogofilter+eclipse.org, bsi.msa, clayj_99, daniel.stein, daniel_megert, devguy.ca, fantaman, gjohnson, Jens.Rutschmann, michael.schneider3, mikko.rantalainen, paul-eclipse, sgbmyr
Version: 2.0   
Target Milestone: 4.13 M3   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/146518
https://git.eclipse.org/c/platform/eclipse.platform.text.git/commit/?id=fc1d1922254505a0762ea836f57681a322aadcbc
Whiteboard:
Attachments:
Description Flags
Print-margin not just over text, but also 'in' the text
none
Legibility degrades as text become altered
none
wrong and fixed print margin
none
code used for the screenshot none

Description George Hedges CLA 2002-05-24 15:27:04 EDT
The print margin overdraws any text underneath the print margin line.  The 
print margin should appear underneath the text, rather than on top (bug appears 
in F1 build).
Comment 1 Erich Gamma CLA 2002-05-24 16:44:02 EDT
not critical
Comment 2 Dirk Baeumer CLA 2002-07-22 10:08:09 EDT
Reopening for 2.1 consideration
Comment 3 Dirk Baeumer CLA 2002-07-22 10:51:04 EDT
*** Bug 19746 has been marked as a duplicate of this bug. ***
Comment 4 Dani Megert CLA 2011-03-28 08:22:13 EDT
*** Bug 341088 has been marked as a duplicate of this bug. ***
Comment 5 Jens Rutschmann CLA 2011-04-19 07:59:52 EDT
I can confirm this issue with Eclipse 3.6.1 on Gentoo Linux.

This issue did not appear with the 3.5 releases.
Comment 6 fantaman CLA 2011-06-22 12:59:51 EDT
I also experience this behaviour beginning from eclipse 3.6 (in 3.7 it is still present).
I find this quite annoying since it really impairs the legibility of code and can lead to actually confusing words as certain letters appear like other ones, e.g. 'n' appears like 'r' when the print margin happens to fall onto the respective column.
Comment 7 Dani Megert CLA 2011-06-23 02:28:03 EDT
> This issue did not appear with the 3.5 releases.
I would tend to disagree (and at least on Windows 7 the problem can also be seen in 3.5) as the painter is invoked after drawing the characters.
Comment 8 Dani Megert CLA 2011-06-23 02:29:12 EDT
Maybe used to use a different font in 3.5 and the problem was less visible?
Comment 9 fantaman CLA 2011-06-23 03:07:41 EDT
> Maybe used to use a different font in 3.5 and the problem was less visible?
I always use the default font settings; if it's another font, then it had been "changed" by eclipse. But actually I don't think that I now have a different font than in 3.4 or so.
Comment 10 Dennis Hendriks CLA 2012-05-07 03:23:58 EDT
Created attachment 215163 [details]
Print-margin not just over text, but also 'in' the text

Screenshot that shows that the 'print margin' is overlapping the text. However, it is also 'inside' text, as text is both to the left, and to the right of the margin. It seems the margin should be a few pixels to the right?

My operating system is: CentOS 5.8 with KDE.
Comment 11 Clay Johnson CLA 2013-04-20 18:32:18 EDT
I'm seeing this as well in:
Version: 4.2.1

Using Mac OS 10.7.5
Comment 12 Sebastian Gabmeyer CLA 2014-01-23 09:33:10 EST
I'm experiencing the same problem in 4.3.1 running Gentoo Linux.
Comment 13 Matthew DOnofrio CLA 2014-01-28 11:35:40 EST
Created attachment 239397 [details]
Legibility degrades as text become altered

Screenshot from 4.3.1.
Comment 14 Matthew DOnofrio CLA 2014-01-28 11:36:33 EST
Comment on attachment 239397 [details]
Legibility degrades as text become altered

This should read "Sans" not "Sars".
Comment 15 Matthew DOnofrio CLA 2015-10-23 03:11:48 EDT
Still exists in 4.5.1 (13 years later).
Comment 16 Matthew DOnofrio CLA 2017-11-09 18:36:47 EST
"not critical"

But still a PITA.
Comment 17 Mohammad Alhashash CLA 2018-12-13 04:37:10 EST
Still exists in 4.10.0RC1 (16 years later).
Comment 18 Mikko Rantalainen CLA 2019-07-19 05:06:40 EDT
This bug has been marked as ASSIGNED for a really long time with no progress. I guess the status should be reset.
Comment 19 Paul Pazderski CLA 2019-07-19 05:26:29 EDT
You are not wrong but since the assignee is the inbox it doesn't really count as assigned anyway.
Comment 20 Paul Pazderski CLA 2019-07-23 12:38:29 EDT
Created attachment 279376 [details]
wrong and fixed print margin

17 years... and finally someone found time to look into this.

The margin painter missed to consider the widgets margin. See attached screenshot.
Comment 21 Paul Pazderski CLA 2019-07-23 12:39:35 EDT
Created attachment 279377 [details]
code used for the screenshot
Comment 22 Eclipse Genie CLA 2019-07-23 12:40:15 EDT
New Gerrit change created: https://git.eclipse.org/r/146518
Comment 23 Paul Pazderski CLA 2019-07-23 12:43:51 EDT
*** Bug 497608 has been marked as a duplicate of this bug. ***