Skip to content

Commit

Permalink
Abstract Text Editor: don't change StyledText by CSS.
Browse files Browse the repository at this point in the history
Fix for #869
  • Loading branch information
DenisUngemach committed Dec 1, 2023
1 parent 93eb714 commit c7a090b
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2276,11 +2276,6 @@ private int computeOffsetAtLocation(ITextViewer textViewer, int x, int y) {
/** The width of the vertical ruler. */
protected static final int VERTICAL_RULER_WIDTH= 12;

/*
* The colors of AbstractTextEditor can be configured by the "Text Editors"
* preferences. This color configuration will be changed by theming. This means
* no need for CSS basecolors here.
*/
private static final String DISABLE_CSS = "org.eclipse.e4.ui.css.disabled"; //$NON-NLS-1$

/**
Expand Down Expand Up @@ -3373,6 +3368,9 @@ public void createPartControl(Composite parent) {
int styles= SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION;
fSourceViewer= createSourceViewer(parent, fVerticalRuler, styles);

// We're managing our appearance from our preferences. Disable CSS styling.
// The CSS engine does set the editor preferences on theme switches, so we
// will pick up changes.
fSourceViewer.getTextWidget().setData(DISABLE_CSS, Boolean.TRUE);

if (fConfiguration == null)
Expand Down

0 comments on commit c7a090b

Please sign in to comment.