private void updateIntellijAndGTKLaf() { Platform.runLater( () -> { final URL scrollBarStyleUrl = getClass().getResource("/style/javaFXBrowserScrollBar.css"); myPane.getStylesheets().add(scrollBarStyleUrl.toExternalForm()); myEngine.setUserStyleSheetLocation(null); myEngine.reload(); }); }
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(); }); }