Skip to content

Commit

Permalink
Render title in white at anytime
Browse files Browse the repository at this point in the history
  • Loading branch information
burningtnt committed Jul 12, 2023
1 parent 20ee9c8 commit fa9afd1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ public DecoratorSkin(Decorator control) {
titleContainer.setPickOnBounds(false);
titleContainer.getStyleClass().addAll("jfx-tool-bar");

// Maybe, we can automatically identify whether the top part of the picture is light-coloured or dark when the title is transparent,
// and decide whether the whole top bar should be rendered in white or black. TODO
FXUtils.onChangeAndOperate(skinnable.titleTransparentProperty(), titleTransparent -> {
if (titleTransparent) {
wrapper.backgroundProperty().bind(skinnable.contentBackgroundProperty());
Expand Down
2 changes: 1 addition & 1 deletion HMCL/src/main/resources/assets/css/root.css
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@
}

.jfx-tool-bar.gray-background Label {
-fx-text-fill: BLACK;
/* -fx-text-fill: BLACK; */
}

.jfx-tool-bar .jfx-options-burger {
Expand Down

0 comments on commit fa9afd1

Please sign in to comment.