Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/apache/directory-studio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Seelmann <mail@stefan-seelmann.de>2021-01-03 23:02:15 +0300
committerStefan Seelmann <mail@stefan-seelmann.de>2021-01-03 23:02:15 +0300
commitdaad5d639245849bb872148ceeeeafedef1939a4 (patch)
treefba35cf241fbc5bc3cc4a33541ad5ef798edb131
parentcbf7c016ed066a689729f65c965a6a7838b47cf6 (diff)
DIRSTUDIO-1125: Fix high contrast appearance
-rw-r--r--plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/dialogs/preferences/LdifEditorSyntaxColoringPreferencePage.java4
-rw-r--r--plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifDamagerRepairer.java7
2 files changed, 6 insertions, 5 deletions
diff --git a/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/dialogs/preferences/LdifEditorSyntaxColoringPreferencePage.java b/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/dialogs/preferences/LdifEditorSyntaxColoringPreferencePage.java
index a1ea99064..a816bf7ef 100644
--- a/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/dialogs/preferences/LdifEditorSyntaxColoringPreferencePage.java
+++ b/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/dialogs/preferences/LdifEditorSyntaxColoringPreferencePage.java
@@ -183,10 +183,6 @@ public class LdifEditorSyntaxColoringPreferencePage extends PreferencePage imple
this.rgb = PreferenceConverter.getDefaultColor( store, colorKey );
int style = store.getDefaultInt( styleKey );
setStyle( style );
-
- System.out.println( colorKey + ": isDefault=" + store.isDefault( colorKey ) );
- System.out.println( colorKey + ": string=" + store.getString( colorKey ) );
- System.out.println( colorKey + ": rgb=" + PreferenceConverter.getColor( store, colorKey ) );
}
diff --git a/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifDamagerRepairer.java b/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifDamagerRepairer.java
index e58f59e5e..8cba4d2c0 100644
--- a/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifDamagerRepairer.java
+++ b/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifDamagerRepairer.java
@@ -138,7 +138,12 @@ public class LdifDamagerRepairer implements IPresentationDamager, IPresentationR
}
}
- Color color = store.isDefault( colorKey ) ? null : LdifEditorActivator.getDefault().getColor( rgb );
+ /*
+ * Use color <code>null</code> if the default is the default string, This is important
+ * to not override the system color when a high-contrast theme is used.
+ */
+ boolean isDefaultDefaultKey = IPreferenceStore.STRING_DEFAULT_DEFAULT.equals( store.getString( colorKey ) );
+ Color color = isDefaultDefaultKey ? null : LdifEditorActivator.getDefault().getColor( rgb );
TextAttribute textAttribute = new TextAttribute( color, null, style );
return textAttribute;
}