Bug 179625 - [rulers][projection] Allow changing the color of the ruler, where folding and markers are displayed
Summary: [rulers][projection] Allow changing the color of the ruler, where folding and...
Status: ASSIGNED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 enhancement with 7 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 276843 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-03-27 19:17 EDT by Henning Riedel CLA
Modified: 2019-01-25 03:56 EST (History)
7 users (show)

See Also:


Attachments
Bar with code folding can not be changed (48.58 KB, image/png)
2007-03-29 17:42 EDT, Henning Riedel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Henning Riedel CLA 2007-03-27 19:17:34 EDT
If you change the color scheme of the editor to something like dark background, light gray foreground, the bars color can not be changed. 
I mean the bar to the right of the linenumbers column in a code editor view, where e.g. folding, annotations and markers are displayed.
Comment 1 Boris Bokowski CLA 2007-03-28 12:10:39 EDT
Try Window->Preferences->General->Editors->Annotations.

Please reopen this bug if this was not what you meant.
Comment 2 Henning Riedel CLA 2007-03-29 17:42:10 EDT
Created attachment 62436 [details]
Bar with code folding can not be changed

Also, changable fore/background of all views and their text would be nice.
Comment 3 Henning Riedel CLA 2007-03-29 17:43:43 EDT
see attachement please
Comment 4 Dani Megert CLA 2007-03-30 09:03:56 EDT
See also bug 62712.
Comment 5 Joakim Lundborg CLA 2009-01-20 04:32:09 EST
This bug makes code folding quite unusable for dark-background themes, and even with folding turned off, it is quite annoying (you still get a 1px white line to the left).
Comment 6 Remy Suen CLA 2009-03-18 13:04:55 EDT
It seems the code for drawing the folding ruler is found in ProjectionRulerColumn's createControl(CompositeRuler, Composite) method. How can preferences be injected into the JFace code?
Comment 7 Dani Megert CLA 2009-03-19 03:47:15 EDT
It would have to be set/configured from outside.
Comment 8 Markus Keller CLA 2009-03-19 06:06:16 EDT
You can e.g. look how it is done for the line number ruler.
Comment 9 Remy Suen CLA 2009-03-19 15:55:27 EDT
(In reply to comment #8)
> You can e.g. look how it is done for the line number ruler.

Oh yeah, why didn't I think of that...?

From my analysis, LineNumberRulerColumn has a handy-dandy setBackground(Color) method. ProjectionRulerColumn doesn't. ProjectionRulerColumn is also package-private. I think ProjectionRulerColumn would have to become public API or new API would need to be added to ProjectionSupport for altering colours (which would then delegate the call to ProjectionRulerColumn).
Comment 10 Markus Keller CLA 2009-03-27 11:01:11 EDT
I think we should just fix the 99% case for now and set the projection ruler bg color when it is created. In ProjectionRulerColumn.createControl(..), replace
    Color background= display.getSystemColor(SWT.COLOR_LIST_BACKGROUND);
with
    Color background= getCachedTextViewer().getTextWidget().getBackground();

That doesn't update the color when the preference is changed, but it at least shows the correct color for new editors.


(In reply to comment #5)
> (you still get a 1px white line to the left).

The separator between rulers an the text area is not white. It uses the operating system's widget background color (same as the annotation ruler backgrounds at the left and right of the editor). To change this, you have to change the OS theme.
Comment 11 Dani Megert CLA 2009-03-30 05:38:19 EDT
>I think we should just fix the 99% case
This is bug 62712 (and I just fixed it in HEAD).
Comment 12 Joakim Lundborg CLA 2009-05-19 05:41:21 EDT
> (In reply to comment #5)
> > (you still get a 1px white line to the left).
> 
> The separator between rulers an the text area is not white. It uses the
> operating system's widget background color (same as the annotation ruler
> backgrounds at the left and right of the editor). To change this, you have to
> change the OS theme.

This is not an option, since it'd make all other widgets in the OS unusable =). I have added a separate bug report for this, bug 276843. When that bug and 276719 are fixed, dark themes will actually be usable. Many thanks!
Comment 13 Dani Megert CLA 2009-05-19 06:31:42 EDT
*** Bug 276843 has been marked as a duplicate of this bug. ***
Comment 14 Bernd K. CLA 2019-01-25 03:56:15 EST
4.7.3a and the folding bar is still the wrong color.