mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-11 02:05:39 +02:00
Terminal: Bug 435360 - [TERMINALS] [CSS] [Dark] Terminal view should
integrate well into the Eclipse dark theme Signed-off-by: Lars Vogel <Lars.Vogel@gmail.com>
This commit is contained in:
parent
57f40bf1de
commit
ee07ae74f0
4 changed files with 34 additions and 14 deletions
|
@ -27,14 +27,13 @@ bin.includes = .,\
|
||||||
about.properties,\
|
about.properties,\
|
||||||
tm32.png,\
|
tm32.png,\
|
||||||
icons/,\
|
icons/,\
|
||||||
HelpContexts.xml
|
HelpContexts.xml,\
|
||||||
|
css/
|
||||||
|
|
||||||
source.. = src/
|
source.. = src/
|
||||||
output.. = bin/
|
output.. = bin/
|
||||||
src.includes = schema/,\
|
src.includes = schema/,\
|
||||||
about.html,\
|
about.html
|
||||||
.settings/,\
|
|
||||||
build.properties
|
|
||||||
javacSource=1.4
|
javacSource=1.4
|
||||||
javacTarget=1.4
|
javacTarget=1.4
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2014 vogella GmbH and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* Lars Vogel <Lars.Vogel@gmail.com> - initial API and implementation
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
IEclipsePreferences {
|
||||||
|
preferences:
|
||||||
|
"TerminalPrefInvertColors=true"
|
||||||
|
}
|
|
@ -229,21 +229,20 @@
|
||||||
sequence="M3+ARROW_UP"/>
|
sequence="M3+ARROW_UP"/>
|
||||||
</extension>
|
</extension>
|
||||||
|
|
||||||
<extension
|
<extension point="org.eclipse.ui.preferencePages">
|
||||||
point="org.eclipse.ui.preferencePages">
|
|
||||||
<page
|
<page
|
||||||
name="%terminal.preferences.name"
|
name="%terminal.preferences.name"
|
||||||
class="org.eclipse.tm.internal.terminal.preferences.TerminalPreferencePage"
|
class="org.eclipse.tm.internal.terminal.preferences.TerminalPreferencePage"
|
||||||
id="org.eclipse.tm.terminal.TerminalPreferencePage">
|
id="org.eclipse.tm.terminal.TerminalPreferencePage">
|
||||||
</page>
|
</page>
|
||||||
</extension>
|
</extension>
|
||||||
<extension
|
|
||||||
point="org.eclipse.core.runtime.preferences">
|
<extension point="org.eclipse.core.runtime.preferences">
|
||||||
<initializer class="org.eclipse.tm.internal.terminal.preferences.TerminalPreferenceInitializer"/>
|
<initializer class="org.eclipse.tm.internal.terminal.preferences.TerminalPreferenceInitializer"/>
|
||||||
<modifier class="org.eclipse.tm.internal.terminal.preferences.PreferenceModifyListener"/>
|
<modifier class="org.eclipse.tm.internal.terminal.preferences.PreferenceModifyListener"/>
|
||||||
</extension>
|
</extension>
|
||||||
<extension
|
|
||||||
point="org.eclipse.ui.themes" id="terminal.font">
|
<extension point="org.eclipse.ui.themes" id="terminal.font">
|
||||||
<fontDefinition
|
<fontDefinition
|
||||||
defaultsTo="org.eclipse.jface.textfont"
|
defaultsTo="org.eclipse.jface.textfont"
|
||||||
id="terminal.views.view.font.definition"
|
id="terminal.views.view.font.definition"
|
||||||
|
@ -253,5 +252,13 @@
|
||||||
</description>
|
</description>
|
||||||
</fontDefinition>
|
</fontDefinition>
|
||||||
</extension>
|
</extension>
|
||||||
|
|
||||||
|
<!-- Theme contributions -->
|
||||||
|
<extension point="org.eclipse.e4.ui.css.swt.theme">
|
||||||
|
<stylesheet
|
||||||
|
uri="css/org.eclipse.tm.terminal.stylesheet.dark.css">
|
||||||
|
<themeid refid="org.eclipse.e4.ui.css.theme.e4_dark"/>
|
||||||
|
</stylesheet>
|
||||||
|
</extension>
|
||||||
|
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
|
@ -24,8 +24,7 @@ public class TerminalPreferenceInitializer extends AbstractPreferenceInitializer
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initializeDefaultPreferences() {
|
public void initializeDefaultPreferences() {
|
||||||
//DefaultScope.INSTANCE was only added in Eclipse 3.7 - we want to be compatible further back
|
IEclipsePreferences defaultPrefs = DefaultScope.INSTANCE.getNode(TerminalPlugin.PLUGIN_ID);
|
||||||
IEclipsePreferences defaultPrefs = new DefaultScope().getNode(TerminalPlugin.PLUGIN_ID);
|
|
||||||
defaultPrefs.putBoolean(ITerminalConstants.PREF_INVERT_COLORS, ITerminalConstants.DEFAULT_INVERT_COLORS);
|
defaultPrefs.putBoolean(ITerminalConstants.PREF_INVERT_COLORS, ITerminalConstants.DEFAULT_INVERT_COLORS);
|
||||||
defaultPrefs.putInt(ITerminalConstants.PREF_BUFFERLINES, ITerminalConstants.DEFAULT_BUFFERLINES);
|
defaultPrefs.putInt(ITerminalConstants.PREF_BUFFERLINES, ITerminalConstants.DEFAULT_BUFFERLINES);
|
||||||
migrateTerminalPreferences();
|
migrateTerminalPreferences();
|
||||||
|
@ -36,10 +35,10 @@ public class TerminalPreferenceInitializer extends AbstractPreferenceInitializer
|
||||||
*/
|
*/
|
||||||
public static void migrateTerminalPreferences() {
|
public static void migrateTerminalPreferences() {
|
||||||
//InstanceScope.INSTANCE was only added in Eclipse 3.7 - we want to be compatible further back
|
//InstanceScope.INSTANCE was only added in Eclipse 3.7 - we want to be compatible further back
|
||||||
IEclipsePreferences prefs = new InstanceScope().getNode(TerminalPlugin.PLUGIN_ID);
|
IEclipsePreferences prefs = InstanceScope.INSTANCE.getNode(TerminalPlugin.PLUGIN_ID);
|
||||||
if (!prefs.getBoolean(ITerminalConstants.PREF_HAS_MIGRATED, false)) {
|
if (!prefs.getBoolean(ITerminalConstants.PREF_HAS_MIGRATED, false)) {
|
||||||
prefs.putBoolean(ITerminalConstants.PREF_HAS_MIGRATED, true);
|
prefs.putBoolean(ITerminalConstants.PREF_HAS_MIGRATED, true);
|
||||||
PreferenceModifyListener.migrateTerminalPreferences(new InstanceScope().getNode("")); //$NON-NLS-1$
|
PreferenceModifyListener.migrateTerminalPreferences(InstanceScope.INSTANCE.getNode("")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue