Merge pull request #413 from tsl0922/osx

修复在 OSX 下使用的一些问题
This commit is contained in:
Haowei Wen
2018-08-06 18:36:53 +08:00
committed by GitHub
3 changed files with 11 additions and 2 deletions

View File

@@ -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);

View File

@@ -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>

0
gradlew vendored Normal file → Executable file
View File