* use OSX-style title borders
This commit is contained in:
parent
9f9f1d950f
commit
b6dd597eb8
|
@ -284,6 +284,7 @@ public class Main {
|
||||||
|
|
||||||
// window settings
|
// window settings
|
||||||
if (Settings.isMacSandbox()) {
|
if (Settings.isMacSandbox()) {
|
||||||
|
MacAppUtilities.setUIDefaults();
|
||||||
MacAppUtilities.setWindowCanFullScreen(frame);
|
MacAppUtilities.setWindowCanFullScreen(frame);
|
||||||
}
|
}
|
||||||
frame.setLocationByPlatform(true);
|
frame.setLocationByPlatform(true);
|
||||||
|
|
|
@ -6,6 +6,8 @@ import java.lang.reflect.Method;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
|
import javax.swing.UIManager;
|
||||||
|
|
||||||
import ca.weblite.objc.Client;
|
import ca.weblite.objc.Client;
|
||||||
|
|
||||||
public class MacAppUtilities {
|
public class MacAppUtilities {
|
||||||
|
@ -23,7 +25,7 @@ public class MacAppUtilities {
|
||||||
return objc().sendProxy("NSData", "data").send("initWithBase64Encoding:", text);
|
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");
|
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) {
|
public static boolean isLockedFolder(File folder) {
|
||||||
return folder.isDirectory() && !folder.canRead() && !folder.canWrite();
|
return folder.isDirectory() && !folder.canRead() && !folder.canWrite();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue