kasemir / org.csstudio.display.builder

Update of org.csstudio.opibuilder.*
Eclipse Public License 1.0
2 stars 10 forks source link

CSSTUDIO-1026: Transparent Embedded Background #534

Closed claudio-rosati closed 5 years ago

claudio-rosati commented 5 years ago

In Edit mode, transparent Embedded displays with "No Resize" setting show unnecessary scrollbars when sized to the same size of the embedded content and the embedded OPI has its own content "touching" the boundaries.

This happens because in Edit mode a 1 pixel semi-transparent grey border is displayed inside the Embedded Display to identify the widget.

This PR replaces the this border with a transparent pattern background:

Screenshot 2019-05-10 at 13 47 13
claudio-rosati commented 5 years ago

@kasemir Is it possible then merge the java8 branch into the master one?

kasemir commented 5 years ago

This changes the look of the embedded displays quite a lot.

How about simply moving the 1 pixel semi-transparent grey border 'inside', i.e. using insets, so it's not adding to the size of the embeded widget?

claudio-rosati commented 5 years ago

It's even worst: you need your Embedded Display sized 4 pixels more wide and height!!! I've tried to display the border 1 pixel outside. It works, but the border is clipped out :-(

claudio-rosati commented 5 years ago

Moreover, a part the chosen color that can be lighter/different and the bands that can be closer or larger, the new look seems more appropriate for a transparent Embedded Display (moreover it appears only in edit mode).

kasemir commented 5 years ago

I've merged into master, but I'm sure master needs Java 9+ fixes to the JavaFX code (which can be found in phoebus), and I'm currently unable to build the RCP-based CSS at all, so no progress on that.

claudio-rosati commented 5 years ago

@kasemir I didn't have any problems building the master branch against Java 8. Only few warnings that I believe exist since a long time ago:

[WARNING] The project org.csstudio:display-builder:pom:1.0.0-SNAPSHOT uses prerequisites which is only intended for maven-plugin projects but not for non maven-plugin projects. For such purposes you should use the maven-enforcer-plugin. See https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html
[WARNING] bundle localization file /Users/claudiorosati/Projects/GitHub/org.csstudio.display.builder/org.csstudio.display.builder.util/plugin.properties not found
[WARNING] bundle localization file /Users/claudiorosati/Projects/GitHub/org.csstudio.display.builder/org.csstudio.javafx/plugin.properties not found
[WARNING] bundle localization file /Users/claudiorosati/Projects/GitHub/org.csstudio.display.builder/org.csstudio.display.builder.representation/plugin.properties not found
[WARNING] bundle localization file /Users/claudiorosati/Projects/GitHub/org.csstudio.display.builder/org.csstudio.javafx.rtplot/plugin.properties not found
[WARNING] bundle localization file /Users/claudiorosati/Projects/GitHub/org.csstudio.display.builder/org.csstudio.display.builder.representation.javafx/plugin.properties not found
[WARNING] bundle localization file /Users/claudiorosati/Projects/GitHub/org.csstudio.display.builder/org.csstudio.display.builder.editor/plugin.properties not found
[WARNING] bundle localization file /Users/claudiorosati/Projects/GitHub/org.csstudio.display.builder/org.csstudio.javafx.swt/plugin.properties not found
[WARNING] Bundle-Vendor header not found in /Users/claudiorosati/Projects/GitHub/org.csstudio.display.builder/org.csstudio.javafx.swt/META-INF/MANIFEST.MF, fallback to 'unknown' for source bundle
[WARNING] bundle localization file /Users/claudiorosati/Projects/GitHub/org.csstudio.display.builder/org.csstudio.display.builder.runtime/plugin.properties not found
[WARNING] /Users/claudiorosati/Projects/GitHub/org.csstudio.display.builder/org.csstudio.display.builder.rcp/src/org/csstudio/display/builder/rcp/RCPHacks.java:[17]
    import org.eclipse.ui.internal.WorkbenchWindow;
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Discouraged access: The type 'WorkbenchWindow' is not API (restriction on classpath entry '/Users/claudiorosati/.m2/repository/p2/osgi/bundle/org.eclipse.ui.workbench/3.110.1.v20170704-1208/org.eclipse.ui.workbench-3.110.1.v20170704-1208.jar')
[WARNING] /Users/claudiorosati/Projects/GitHub/org.csstudio.display.builder/org.csstudio.display.builder.rcp/src/org/csstudio/display/builder/rcp/RCPHacks.java:[56]
    if (! (page.getWorkbenchWindow() instanceof WorkbenchWindow))
                                                ^^^^^^^^^^^^^^^
Discouraged access: The type 'WorkbenchWindow' is not API (restriction on classpath entry '/Users/claudiorosati/.m2/repository/p2/osgi/bundle/org.eclipse.ui.workbench/3.110.1.v20170704-1208/org.eclipse.ui.workbench-3.110.1.v20170704-1208.jar')
[WARNING] /Users/claudiorosati/Projects/GitHub/org.csstudio.display.builder/org.csstudio.display.builder.rcp/src/org/csstudio/display/builder/rcp/RCPHacks.java:[58]
    final WorkbenchWindow window = (WorkbenchWindow)page.getWorkbenchWindow();
          ^^^^^^^^^^^^^^^
Discouraged access: The type 'WorkbenchWindow' is not API (restriction on classpath entry '/Users/claudiorosati/.m2/repository/p2/osgi/bundle/org.eclipse.ui.workbench/3.110.1.v20170704-1208/org.eclipse.ui.workbench-3.110.1.v20170704-1208.jar')
[WARNING] /Users/claudiorosati/Projects/GitHub/org.csstudio.display.builder/org.csstudio.display.builder.rcp/src/org/csstudio/display/builder/rcp/RCPHacks.java:[58]
    final WorkbenchWindow window = (WorkbenchWindow)page.getWorkbenchWindow();
                                    ^^^^^^^^^^^^^^^
Discouraged access: The type 'WorkbenchWindow' is not API (restriction on classpath entry '/Users/claudiorosati/.m2/repository/p2/osgi/bundle/org.eclipse.ui.workbench/3.110.1.v20170704-1208/org.eclipse.ui.workbench-3.110.1.v20170704-1208.jar')
[WARNING] /Users/claudiorosati/Projects/GitHub/org.csstudio.display.builder/org.csstudio.display.builder.rcp/src/org/csstudio/display/builder/rcp/RCPHacks.java:[60]
    final ICoolBarManager toolbar = window.getCoolBarManager2();
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Discouraged access: The method 'WorkbenchWindow.getCoolBarManager2()' is not API (restriction on classpath entry '/Users/claudiorosati/.m2/repository/p2/osgi/bundle/org.eclipse.ui.workbench/3.110.1.v20170704-1208/org.eclipse.ui.workbench-3.110.1.v20170704-1208.jar')
[WARNING] /Users/claudiorosati/Projects/GitHub/org.csstudio.display.builder/org.csstudio.display.builder.rcp/src/org/csstudio/display/builder/rcp/RCPHacks.java:[85]
    private static void patchMenu(final WorkbenchWindow window)
                                        ^^^^^^^^^^^^^^^
Discouraged access: The type 'WorkbenchWindow' is not API (restriction on classpath entry '/Users/claudiorosati/.m2/repository/p2/osgi/bundle/org.eclipse.ui.workbench/3.110.1.v20170704-1208/org.eclipse.ui.workbench-3.110.1.v20170704-1208.jar')
[WARNING] /Users/claudiorosati/Projects/GitHub/org.csstudio.display.builder/org.csstudio.display.builder.rcp/src/org/csstudio/display/builder/rcp/RCPHacks.java:[90]
    final MenuManager manager = window.getMenuManager();
                                ^^^^^^^^^^^^^^^^^^^^^^^
Discouraged access: The method 'WorkbenchWindow.getMenuManager()' is not API (restriction on classpath entry '/Users/claudiorosati/.m2/repository/p2/osgi/bundle/org.eclipse.ui.workbench/3.110.1.v20170704-1208/org.eclipse.ui.workbench-3.110.1.v20170704-1208.jar')
[WARNING] bundle localization file /Users/claudiorosati/Projects/GitHub/org.csstudio.display.builder/org.csstudio.display.builder.model.rcp/plugin.properties not found
[WARNING] bundle localization file /Users/claudiorosati/Projects/GitHub/org.csstudio.display.builder/org.csstudio.display.builder.model.test/plugin.properties not found
[WARNING] bundle localization file /Users/claudiorosati/Projects/GitHub/org.csstudio.display.builder/org.csstudio.display.builder.rcp.test/plugin.properties not found
[WARNING] bundle localization file /Users/claudiorosati/Projects/GitHub/org.csstudio.display.builder/org.csstudio.display.builder.representation.swt/plugin.properties not found
[WARNING] bundle localization file /Users/claudiorosati/Projects/GitHub/org.csstudio.display.builder/org.csstudio.display.builder.representation.test/plugin.properties not found
[WARNING] bundle localization file /Users/claudiorosati/Projects/GitHub/org.csstudio.display.builder/org.csstudio.display.builder.runtime.test/plugin.properties not found
[WARNING] bundle localization file /Users/claudiorosati/Projects/GitHub/org.csstudio.display.builder/org.csstudio.javafx.rtplot.test/plugin.properties not found
[WARNING] bundle localization file /Users/claudiorosati/Projects/GitHub/org.csstudio.display.builder/databrowser3/databrowser-plugins/org.csstudio.trends.databrowser3.opiwidget/plugin.properties not found
[WARNING] bundle localization file /Users/claudiorosati/Projects/GitHub/org.csstudio.display.builder/databrowser3/databrowser-plugins/org.csstudio.trends.databrowser3.bobwidget/plugin.properties not found
[WARNING] /Users/claudiorosati/Projects/GitHub/org.csstudio.display.builder/databrowser3/databrowser-features/org.csstudio.trends.databrowser3.opiwidget.feature/build.properties: bin.includes value(s) must be specified.
[WARNING] /Users/claudiorosati/Projects/GitHub/org.csstudio.display.builder/databrowser3/databrowser-features/org.csstudio.trends.databrowser3.bobwidget.feature/build.properties: bin.includes value(s) must be specified.