mirror of
https://github.com/angryip/ipscan.git
synced 2025-10-26 11:18:17 +00:00
change println() to LOG calls
This commit is contained in:
parent
5b009b2a60
commit
e6fa4dabbf
@ -70,17 +70,17 @@ public class GUI implements AutoCloseable {
|
||||
Class os = Class.forName("org.eclipse.swt.internal.cocoa.OS");
|
||||
Boolean isDarkMode = (Boolean) os.getMethod("isSystemDarkAppearance").invoke(null);
|
||||
Boolean isAppDarkAppearance = (Boolean) os.getMethod("isAppDarkAppearance").invoke(null);
|
||||
System.err.println("Dark appearance flags before: " + isDarkMode + ", " + isAppDarkAppearance);
|
||||
LOG.info("Dark appearance flags before: " + isDarkMode + ", " + isAppDarkAppearance);
|
||||
if (isDarkMode && !isAppDarkAppearance) {
|
||||
os.getMethod("setTheme", boolean.class).invoke(null, isDarkMode);
|
||||
isDarkMode = (Boolean) os.getMethod("isSystemDarkAppearance").invoke(null);
|
||||
isAppDarkAppearance = (Boolean) os.getMethod("isAppDarkAppearance").invoke(null);
|
||||
System.err.println("Dark appearance flags after: " + isDarkMode + ", " + isAppDarkAppearance);
|
||||
LOG.info("Dark appearance flags after: " + isDarkMode + ", " + isAppDarkAppearance);
|
||||
// workaround for a bug in SWT: colors need to be reinited after changing the appearance
|
||||
Method initColors = display.getClass().getDeclaredMethod("initColors");
|
||||
initColors.setAccessible(true);
|
||||
initColors.invoke(display);
|
||||
System.err.println("initColors called");
|
||||
LOG.info("initColors called");
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user