From d12e0c8a6ab81651e57dfc9934efab164babf7b6 Mon Sep 17 00:00:00 2001 From: Lars Vogel Date: Tue, 12 Nov 2019 09:09:07 +0100 Subject: Bug 552931 - Adding styling for CSS spy Change-Id: I077c0f94b77d6be40238c40c05976ec137a6f495 Signed-off-by: Lars Vogel --- bundles/org.eclipse.e4.tools.css.spy/build.properties | 3 ++- bundles/org.eclipse.e4.tools.css.spy/css/dark-theme.css | 3 +++ bundles/org.eclipse.e4.tools.css.spy/plugin.xml | 8 ++++++++ .../src/org/eclipse/e4/tools/css/spy/CssSpyPart.java | 2 ++ 4 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 bundles/org.eclipse.e4.tools.css.spy/css/dark-theme.css 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"> + + + + + 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); -- cgit v1.2.3