mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-10 12:26:16 -04:00
禁止标题栏按钮获取焦点 (#3666)
This commit is contained in:
parent
04781da3a7
commit
349b663c83
@ -187,16 +187,19 @@ public class DecoratorSkin extends SkinBase<Decorator> {
|
|||||||
buttonsContainer.setMaxHeight(40);
|
buttonsContainer.setMaxHeight(40);
|
||||||
{
|
{
|
||||||
JFXButton btnHelp = new JFXButton();
|
JFXButton btnHelp = new JFXButton();
|
||||||
|
btnHelp.setFocusTraversable(false);
|
||||||
btnHelp.setGraphic(SVG.HELP_CIRCLE_OUTLINE.createIcon(Theme.foregroundFillBinding(), -1, -1));
|
btnHelp.setGraphic(SVG.HELP_CIRCLE_OUTLINE.createIcon(Theme.foregroundFillBinding(), -1, -1));
|
||||||
btnHelp.getStyleClass().add("jfx-decorator-button");
|
btnHelp.getStyleClass().add("jfx-decorator-button");
|
||||||
btnHelp.setOnAction(e -> FXUtils.openLink("https://docs.hmcl.net/help.html"));
|
btnHelp.setOnAction(e -> FXUtils.openLink("https://docs.hmcl.net/help.html"));
|
||||||
|
|
||||||
JFXButton btnMin = new JFXButton();
|
JFXButton btnMin = new JFXButton();
|
||||||
|
btnMin.setFocusTraversable(false);
|
||||||
btnMin.setGraphic(SVG.MINUS.createIcon(Theme.foregroundFillBinding(), -1, -1));
|
btnMin.setGraphic(SVG.MINUS.createIcon(Theme.foregroundFillBinding(), -1, -1));
|
||||||
btnMin.getStyleClass().add("jfx-decorator-button");
|
btnMin.getStyleClass().add("jfx-decorator-button");
|
||||||
btnMin.setOnAction(e -> skinnable.minimize());
|
btnMin.setOnAction(e -> skinnable.minimize());
|
||||||
|
|
||||||
JFXButton btnClose = new JFXButton();
|
JFXButton btnClose = new JFXButton();
|
||||||
|
btnClose.setFocusTraversable(false);
|
||||||
btnClose.setGraphic(SVG.CLOSE.createIcon(Theme.foregroundFillBinding(), -1, -1));
|
btnClose.setGraphic(SVG.CLOSE.createIcon(Theme.foregroundFillBinding(), -1, -1));
|
||||||
btnClose.getStyleClass().add("jfx-decorator-button");
|
btnClose.getStyleClass().add("jfx-decorator-button");
|
||||||
btnClose.setOnAction(e -> skinnable.close());
|
btnClose.setOnAction(e -> skinnable.close());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user