mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 22:22:11 +02:00
Bug 282494 - Incorrect colors in Show Macro expansion dialog in case of
dark color scheme Setting the Macro expansion highlight to the "Find Scope" color. The color can not occur by other means in the dialog and provides good contrast to background and foreground colors. Change-Id: If2182cff20f3612cff80c7fe2b250d039d45f172 Signed-off-by: Sebastian Focke<sfocke_eclipse@web.de>
This commit is contained in:
parent
a8af87b6ba
commit
ebf123102f
1 changed files with 6 additions and 1 deletions
|
@ -25,6 +25,7 @@ import org.eclipse.swt.graphics.Color;
|
||||||
import org.eclipse.swt.graphics.RGB;
|
import org.eclipse.swt.graphics.RGB;
|
||||||
import org.eclipse.swt.widgets.Composite;
|
import org.eclipse.swt.widgets.Composite;
|
||||||
import org.eclipse.text.edits.ReplaceEdit;
|
import org.eclipse.text.edits.ReplaceEdit;
|
||||||
|
import org.eclipse.ui.texteditor.AbstractTextEditor;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.dom.rewrite.MacroExpansionExplorer.IMacroExpansionStep;
|
import org.eclipse.cdt.core.dom.rewrite.MacroExpansionExplorer.IMacroExpansionStep;
|
||||||
|
|
||||||
|
@ -118,7 +119,11 @@ class CMacroCompareViewer extends CMergeViewer {
|
||||||
|
|
||||||
public CMacroCompareViewer(Composite parent, int styles, CompareConfiguration mp) {
|
public CMacroCompareViewer(Composite parent, int styles, CompareConfiguration mp) {
|
||||||
super(parent, styles, mp);
|
super(parent, styles, mp);
|
||||||
fChangeBackground= new Color(parent.getDisplay(), CHANGE_COLOR);
|
RGB expansionHighlight = CMacroCompareViewer.createColor(getPreferenceStore(),
|
||||||
|
AbstractTextEditor.PREFERENCE_COLOR_FIND_SCOPE);
|
||||||
|
if(expansionHighlight == null)
|
||||||
|
expansionHighlight = CHANGE_COLOR;
|
||||||
|
fChangeBackground= new Color(parent.getDisplay(), expansionHighlight);
|
||||||
fLeftHighlighter= new ReplaceEditsHighlighter(fChangeBackground, true);
|
fLeftHighlighter= new ReplaceEditsHighlighter(fChangeBackground, true);
|
||||||
fRightHighlighter= new ReplaceEditsHighlighter(fChangeBackground, false);
|
fRightHighlighter= new ReplaceEditsHighlighter(fChangeBackground, false);
|
||||||
fViewerIndex= 0;
|
fViewerIndex= 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue