Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/antoniopelusi/javafx-dark-theme

A complete CSS stylesheet to set a dark theme in your JavaFX UI.
https://github.com/antoniopelusi/javafx-dark-theme

css dark-mode dark-theme darkmode java javafx javafx-gui javafx-theme javafx-themes swing-gui theme

Last synced: about 7 hours ago
JSON representation

A complete CSS stylesheet to set a dark theme in your JavaFX UI.

Awesome Lists containing this project

README

        

# JavaFX-Dark-Theme :waning_crescent_moon:
A complete CSS stylesheet to set a dark theme in your JavaFX UI.

Built on top of the default JavaFX theme (Modena)


## How to use
- **Load via FXML:**

Add `stylesheets="@style.css"` to the top-level FXML tag.


- **Load via Java:**
Add the following code:
```
File style = new File("relative-path/style.css");
scene.getStylesheets().add(style.toURI().toURL().toExternalForm());
```
or (online version)
```
scene.getStylesheets().add("https://raw.githubusercontent.com/antoniopelusi/JavaFX-Dark-Theme/main/style.css");
```


## CSS preview example
See this theme in action [**here**](https://github.com/antoniopelusi/KeyHolder-desktop)!



## List of JavaFX recolored elements
- Label
- Pane
- GridPane
- TextField
- ComboBox
- ChoiceBox
- ListCell
- ListView
- Button
- CheckBox
- TextArea
- ScrollBar
- Menu
- ProgressBar
- Slider
- TreeView
- Tab
- TitledPane
- TableView
- Tooltip