mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-09 20:06:39 -04:00
禁止标题栏中返回键获取焦点 (#3677)
This commit is contained in:
parent
4a758d045d
commit
bdf4886445
@ -227,6 +227,7 @@ public class DecoratorSkin extends SkinBase<Decorator> {
|
|||||||
|
|
||||||
if (canBack) {
|
if (canBack) {
|
||||||
JFXButton backNavButton = new JFXButton();
|
JFXButton backNavButton = new JFXButton();
|
||||||
|
backNavButton.setFocusTraversable(false);
|
||||||
backNavButton.setGraphic(SVG.BACK.createIcon(Theme.foregroundFillBinding(), -1, -1));
|
backNavButton.setGraphic(SVG.BACK.createIcon(Theme.foregroundFillBinding(), -1, -1));
|
||||||
backNavButton.getStyleClass().add("jfx-decorator-button");
|
backNavButton.getStyleClass().add("jfx-decorator-button");
|
||||||
backNavButton.ripplerFillProperty().set(Theme.whiteFill());
|
backNavButton.ripplerFillProperty().set(Theme.whiteFill());
|
||||||
@ -238,6 +239,7 @@ public class DecoratorSkin extends SkinBase<Decorator> {
|
|||||||
|
|
||||||
if (canClose) {
|
if (canClose) {
|
||||||
JFXButton closeNavButton = new JFXButton();
|
JFXButton closeNavButton = new JFXButton();
|
||||||
|
closeNavButton.setFocusTraversable(false);
|
||||||
closeNavButton.setGraphic(SVG.CLOSE.createIcon(Theme.foregroundFillBinding(), -1, -1));
|
closeNavButton.setGraphic(SVG.CLOSE.createIcon(Theme.foregroundFillBinding(), -1, -1));
|
||||||
closeNavButton.getStyleClass().add("jfx-decorator-button");
|
closeNavButton.getStyleClass().add("jfx-decorator-button");
|
||||||
closeNavButton.ripplerFillProperty().set(Theme.whiteFill());
|
closeNavButton.ripplerFillProperty().set(Theme.whiteFill());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user