mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Merge pull request #3459 from rishwanth1995/removedefaultfont
added setlookandfeel method to EDT
This commit is contained in:
commit
e85a1128db
@ -23,6 +23,7 @@ import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
import java.util.logging.Level;
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.UIManager;
|
||||
import javax.swing.UIManager.LookAndFeelInfo;
|
||||
import javax.swing.UnsupportedLookAndFeelException;
|
||||
@ -56,7 +57,9 @@ public class Installer extends ModuleInstall {
|
||||
@Override
|
||||
public void restored() {
|
||||
super.restored();
|
||||
setLookAndFeel();
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
setLookAndFeel();
|
||||
});
|
||||
UIManager.put("ViewTabDisplayerUI", "org.sleuthkit.autopsy.corecomponents.NoTabsTabDisplayerUI");
|
||||
UIManager.put(DefaultTabbedContainerUI.KEY_VIEW_CONTENT_BORDER, BorderFactory.createEmptyBorder());
|
||||
UIManager.put("TabbedPane.contentBorderInsets", new Insets(0, 0, 0, 0));
|
||||
@ -69,7 +72,7 @@ public class Installer extends ModuleInstall {
|
||||
public void uninstalled() {
|
||||
super.uninstalled();
|
||||
}
|
||||
|
||||
|
||||
private void setLookAndFeel() {
|
||||
if (System.getProperty("os.name").toLowerCase().contains("mac")) { //NON-NLS
|
||||
setOSXLookAndFeel();
|
||||
@ -88,7 +91,7 @@ public class Installer extends ModuleInstall {
|
||||
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
|
||||
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {
|
||||
logger.log(Level.WARNING, "Error setting OS-X look-and-feel", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
|
||||
// Store the keys that deal with menu items
|
||||
final String[] UI_MENU_ITEM_KEYS = new String[]{"MenuBarUI",}; //NON-NLS
|
||||
|
Loading…
x
Reference in New Issue
Block a user