コード例 #1
0
 private void updateIntellijAndGTKLaf() {
   Platform.runLater(
       () -> {
         final URL scrollBarStyleUrl = getClass().getResource("/style/javaFXBrowserScrollBar.css");
         myPane.getStylesheets().add(scrollBarStyleUrl.toExternalForm());
         myEngine.setUserStyleSheetLocation(null);
         myEngine.reload();
       });
 }
コード例 #2
0
 private void updateLafDarcula() {
   Platform.runLater(
       () -> {
         final URL engineStyleUrl = getClass().getResource("/style/javaFXBrowserDarcula.css");
         final URL scrollBarStyleUrl =
             getClass().getResource("/style/javaFXBrowserDarculaScrollBar.css");
         myEngine.setUserStyleSheetLocation(engineStyleUrl.toExternalForm());
         myPane.getStylesheets().add(scrollBarStyleUrl.toExternalForm());
         myPane.setStyle("-fx-background-color: #3c3f41");
         myPanel.getScene().getStylesheets().add(engineStyleUrl.toExternalForm());
         myEngine.reload();
       });
 }