Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 3 months ago
JSON representation
A complete CSS stylesheet to set a dark theme in your JavaFX UI.
- Host: GitHub
- URL: https://github.com/antoniopelusi/javafx-dark-theme
- Owner: antoniopelusi
- License: cc0-1.0
- Created: 2022-10-12T23:23:55.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-01T19:39:17.000Z (about 1 year ago)
- Last Synced: 2024-09-30T03:40:19.470Z (4 months ago)
- Topics: css, dark-mode, dark-theme, darkmode, java, javafx, javafx-gui, javafx-theme, javafx-themes, swing-gui, theme
- Language: CSS
- Homepage:
- Size: 24.4 KB
- Stars: 65
- Watchers: 1
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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