Jul 25, 2017 Replies: 4 1. Create a file named dark.css with this text in the Files folder: Code: .root { -fx-base: rgba(60, 63, 65, 255); // dark } 2. Load it with: Code: MainForm.Stylesheets.Add(File.GetUri(File.DirAssets, "dark.css")) That's it. Based on this blog: http://dlsc.com/2017/07/03/javafx-tip-26/ Click to expand...
1. Create a file named dark.css with this text in the Files folder: Code: .root { -fx-base: rgba(60, 63, 65, 255); // dark } 2. Load it with: Code: MainForm.Stylesheets.Add(File.GetUri(File.DirAssets, "dark.css")) That's it. Based on this blog: http://dlsc.com/2017/07/03/javafx-tip-26/
xulihang Well-Known Member Licensed User Longtime User Jun 11, 2024 #2 How to avoid a control from being affected by this style. Some controls are not expected to be dark themed like text. I want to keep the text color. The text color being affected only happens in JavaFX 23.
How to avoid a control from being affected by this style. Some controls are not expected to be dark themed like text. I want to keep the text color. The text color being affected only happens in JavaFX 23.
aeric Expert Licensed User Longtime User Jun 11, 2024 #3 xulihang said: How to avoid a control from being affected by this style. Some controls are not expected to be dark themed like text. I want to keep the text color. The text color being affected only happens in JavaFX 23. Click to expand... You should post your question in a new thread. You can use same text color for both dark and light theme.
xulihang said: How to avoid a control from being affected by this style. Some controls are not expected to be dark themed like text. I want to keep the text color. The text color being affected only happens in JavaFX 23. Click to expand... You should post your question in a new thread. You can use same text color for both dark and light theme.
xulihang Well-Known Member Licensed User Longtime User Jun 12, 2024 #4 I think posting here is better as all the users can know this problem. Using JavaFX 11: Using JavaFX 23: Attachments CSSTest.zip CSSTest.zip 3.6 KB · Views: 360
I think posting here is better as all the users can know this problem. Using JavaFX 11: Using JavaFX 23:
aeric Expert Licensed User Longtime User Jun 12, 2024 #5 xulihang said: I think posting here is better as all the users can know this problem. Click to expand... No.
xulihang said: I think posting here is better as all the users can know this problem. Click to expand... No.