Use native window border on osx (workaround for #403)
This commit is contained in:
@@ -67,6 +67,8 @@ import org.jackhuang.hmcl.ui.construct.StackContainerPane;
|
||||
import org.jackhuang.hmcl.ui.construct.TaskExecutorDialogWizardDisplayer;
|
||||
import org.jackhuang.hmcl.ui.wizard.*;
|
||||
import org.jackhuang.hmcl.util.Lang;
|
||||
import org.jackhuang.hmcl.util.OperatingSystem;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
@@ -167,7 +169,14 @@ public final class Decorator extends StackPane implements TaskExecutorDialogWiza
|
||||
|
||||
onCloseButtonAction = new SimpleObjectProperty<>(this, "onCloseButtonAction", Launcher::stopApplication);
|
||||
|
||||
primaryStage.initStyle(StageStyle.UNDECORATED);
|
||||
switch (OperatingSystem.CURRENT_OS) {
|
||||
case OSX:
|
||||
titleContainer.setRight(null);
|
||||
break;
|
||||
default:
|
||||
primaryStage.initStyle(StageStyle.UNDECORATED);
|
||||
break;
|
||||
}
|
||||
btnClose.setGraphic(close);
|
||||
btnMin.setGraphic(minus);
|
||||
btnMax.setGraphic(resizeMax);
|
||||
|
||||
@@ -91,7 +91,6 @@
|
||||
<HBox fx:id="navRight" alignment="CENTER_LEFT">
|
||||
<JFXButton fx:id="refreshNavButton" onMouseClicked="#onRefresh"
|
||||
styleClass="jfx-decorator-button" ripplerFill="white" />
|
||||
<Rectangle height="${navBar.height}" width="1" fill="gray"/>
|
||||
</HBox>
|
||||
</right>
|
||||
</BorderPane>
|
||||
@@ -101,6 +100,7 @@
|
||||
<padding>
|
||||
<Insets topRightBottomLeft="4.0"/>
|
||||
</padding>
|
||||
<Rectangle height="${navBar.height}" width="1" fill="gray"/>
|
||||
<JFXButton fx:id="btnMin" styleClass="jfx-decorator-button" ripplerFill="white"
|
||||
onAction="#onMin">
|
||||
</JFXButton>
|
||||
|
||||
Reference in New Issue
Block a user