Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2019-11-12 08:09:07 +0000
committerLars Vogel2019-11-12 08:09:07 +0000
commitd12e0c8a6ab81651e57dfc9934efab164babf7b6 (patch)
tree3cffe46bb0f690064a6d43c3ebf7a620f450095d
parent6bcc00711b2a4ae350dc47e497e8afe2c8a7ec43 (diff)
downloadorg.eclipse.e4.tools-d12e0c8a6ab81651e57dfc9934efab164babf7b6.tar.gz
org.eclipse.e4.tools-d12e0c8a6ab81651e57dfc9934efab164babf7b6.tar.xz
org.eclipse.e4.tools-d12e0c8a6ab81651e57dfc9934efab164babf7b6.zip
Bug 552931 - Adding styling for CSS spy
Change-Id: I077c0f94b77d6be40238c40c05976ec137a6f495 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--bundles/org.eclipse.e4.tools.css.spy/build.properties3
-rw-r--r--bundles/org.eclipse.e4.tools.css.spy/css/dark-theme.css3
-rw-r--r--bundles/org.eclipse.e4.tools.css.spy/plugin.xml8
-rw-r--r--bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CssSpyPart.java2
4 files changed, 15 insertions, 1 deletions
diff --git a/bundles/org.eclipse.e4.tools.css.spy/build.properties b/bundles/org.eclipse.e4.tools.css.spy/build.properties
index 6c480f39..5e4181d7 100644
--- a/bundles/org.eclipse.e4.tools.css.spy/build.properties
+++ b/bundles/org.eclipse.e4.tools.css.spy/build.properties
@@ -3,4 +3,5 @@ output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml,\
- icons/
+ icons/,\
+ css/
diff --git a/bundles/org.eclipse.e4.tools.css.spy/css/dark-theme.css b/bundles/org.eclipse.e4.tools.css.spy/css/dark-theme.css
new file mode 100644
index 00000000..db401ee2
--- /dev/null
+++ b/bundles/org.eclipse.e4.tools.css.spy/css/dark-theme.css
@@ -0,0 +1,3 @@
+#css-spy {
+ background-color: red;
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.e4.tools.css.spy/plugin.xml b/bundles/org.eclipse.e4.tools.css.spy/plugin.xml
index 94a3e2c6..cda001e6 100644
--- a/bundles/org.eclipse.e4.tools.css.spy/plugin.xml
+++ b/bundles/org.eclipse.e4.tools.css.spy/plugin.xml
@@ -17,5 +17,13 @@
shortcut="M2+M3+F6">
</spyPart>
</extension>
+ <extension
+ point="org.eclipse.e4.ui.css.swt.theme">
+ <stylesheet
+ uri="css/dark-theme.css">
+ <themeid
+ refid="org.eclipse.e4.ui.css.theme.e4_dark"></themeid>
+ </stylesheet>
+ </extension>
</plugin>
diff --git a/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CssSpyPart.java b/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CssSpyPart.java
index 3cde7618..60934442 100644
--- a/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CssSpyPart.java
+++ b/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CssSpyPart.java
@@ -361,6 +361,8 @@ public class CssSpyPart {
// create the highlight; want it to appear on top
Shell highlight = new Shell(selectedShell, SWT.NO_TRIM | SWT.MODELESS | SWT.NO_FOCUS | SWT.ON_TOP);
highlight.setBackground(display.getSystemColor(SWT.COLOR_RED));
+ // set CSS ID for the dark theme
+ highlight.setData("org.eclipse.e4.ui.css.id", "css-spy");
Region highlightRegion = new Region();
highlightRegion.add(0, 0, 1, bounds.height + 2);
highlightRegion.add(0, 0, bounds.width + 2, 1);

Back to the top