Place dialogs in the center of the screen

This commit is contained in:
Kirurobo
2021-11-16 22:46:48 +09:00
parent a8308888a2
commit 449607afe8
2 changed files with 2 additions and 0 deletions

View File

@@ -982,6 +982,7 @@ public class LibUniWinC : NSObject {
panel.allowsMultipleSelection = PanelFlag.AllowMultipleSelection.containedIn(value: ps.flags)
panel.showsHiddenFiles = PanelFlag.ShowHidden.containedIn(value: ps.flags)
panel.allowedFileTypes = fileTypes
panel.center()
panel.message = getStringFromUtf16Array(textPointer: ps.titleText)
panel.title = getStringFromUtf16Array(textPointer: ps.titleText)
@@ -1065,6 +1066,7 @@ public class LibUniWinC : NSObject {
//panel.showsTagField = false
panel.level = NSWindow.Level.popUpMenu
panel.orderFrontRegardless()
panel.center()
let result = panel.runModal();