mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-01-12 14:14:52 +08:00
parent
7d97e5d104
commit
b132aba1e3
@ -261,7 +261,11 @@ public class DecoratorSkin extends SkinBase<Decorator> {
|
|||||||
Label titleLabel = new Label();
|
Label titleLabel = new Label();
|
||||||
BorderPane.setAlignment(titleLabel, Pos.CENTER_LEFT);
|
BorderPane.setAlignment(titleLabel, Pos.CENTER_LEFT);
|
||||||
titleLabel.getStyleClass().add("jfx-decorator-title");
|
titleLabel.getStyleClass().add("jfx-decorator-title");
|
||||||
if (titleNode != null) {
|
if (titleNode == null) {
|
||||||
|
titleLabel.maxWidthProperty().bind(Bindings.createDoubleBinding(
|
||||||
|
() -> skinnable.getWidth() - 100 - navLeft.getWidth(),
|
||||||
|
skinnable.widthProperty(), navLeft.widthProperty()));
|
||||||
|
} else {
|
||||||
titleLabel.prefWidthProperty().bind(Bindings.createDoubleBinding(() -> {
|
titleLabel.prefWidthProperty().bind(Bindings.createDoubleBinding(() -> {
|
||||||
// 8 (margin-left)
|
// 8 (margin-left)
|
||||||
return leftPaneWidth - 8 - navLeft.getWidth();
|
return leftPaneWidth - 8 - navLeft.getWidth();
|
||||||
|
Loading…
Reference in New Issue
Block a user