Skip to content

Commit

Permalink
Add PDF Viewer CSS themes
Browse files Browse the repository at this point in the history
Added new CSS themes (pdf-view-atlanta.css and nord-light.css) to customize the appearance of the PDF Viewer. The changes include color schemes, typography, and element sizes, among others. These changes improve the visual presentation and usability of the PDF viewer.
  • Loading branch information
dlemmermann committed Nov 21, 2023
1 parent 1c0d7d0 commit 18b3e95
Show file tree
Hide file tree
Showing 8 changed files with 9,579 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ public class PDFViewApp extends Application {

private FileChooser chooser;

protected final PDFView pdfView = new PDFView();

@Override
public void start(Stage primaryStage) {
PDFView pdfView = new PDFView();

MenuItem loadItem = new MenuItem("Load PDF...");
loadItem.setAccelerator(KeyCombination.valueOf("SHORTCUT+o"));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.dlsc.pdfviewfx.demo;

import javafx.application.Application;
import javafx.stage.Stage;

import java.util.Objects;

public class PDFViewAtlantaApp extends PDFViewApp {

@Override
public void start(Stage primaryStage) {
super.start(primaryStage);

pdfView.getStylesheets().setAll(Objects.requireNonNull(PDFViewAtlantaApp.class.getResource("/pdf-view-atlanta.css")).toExternalForm());
}

public static void main(String[] args) {
// Application.setUserAgentStylesheet(Objects.requireNonNull(PDFViewAtlantaApp.class.getResource("/nord-light.css")).toExternalForm());
Application.setUserAgentStylesheet(Objects.requireNonNull(PDFViewAtlantaApp.class.getResource("/nord-dark.css")).toExternalForm());
launch(args);
}
}
Loading

0 comments on commit 18b3e95

Please sign in to comment.