mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-02 08:25:02 -04:00
* use OSX-style title borders
This commit is contained in:
parent
9f9f1d950f
commit
b6dd597eb8
@ -284,6 +284,7 @@ public class Main {
|
||||
|
||||
// window settings
|
||||
if (Settings.isMacSandbox()) {
|
||||
MacAppUtilities.setUIDefaults();
|
||||
MacAppUtilities.setWindowCanFullScreen(frame);
|
||||
}
|
||||
frame.setLocationByPlatform(true);
|
||||
|
@ -6,6 +6,8 @@ import java.lang.reflect.Method;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.swing.UIManager;
|
||||
|
||||
import ca.weblite.objc.Client;
|
||||
|
||||
public class MacAppUtilities {
|
||||
@ -23,7 +25,7 @@ public class MacAppUtilities {
|
||||
return objc().sendProxy("NSData", "data").send("initWithBase64Encoding:", text);
|
||||
}
|
||||
|
||||
public static Object NSURL_bookmarkDataWithOptions(String path) {
|
||||
public static String NSURL_bookmarkDataWithOptions(String path) {
|
||||
return objc().sendProxy("NSURL", "fileURLWithPath:", path).sendProxy("bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:", 2048, null, null, null).sendString("base64Encoding");
|
||||
}
|
||||
|
||||
@ -52,6 +54,10 @@ public class MacAppUtilities {
|
||||
}
|
||||
}
|
||||
|
||||
public static void setUIDefaults() {
|
||||
UIManager.put("TitledBorder.border", UIManager.getBorder("InsetBorder.aquaVariant"));
|
||||
}
|
||||
|
||||
public static boolean isLockedFolder(File folder) {
|
||||
return folder.isDirectory() && !folder.canRead() && !folder.canWrite();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user