mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-08 14:19:32 +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.TreeMap;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import javax.swing.BorderFactory;
|
import javax.swing.BorderFactory;
|
||||||
|
import javax.swing.SwingUtilities;
|
||||||
import javax.swing.UIManager;
|
import javax.swing.UIManager;
|
||||||
import javax.swing.UIManager.LookAndFeelInfo;
|
import javax.swing.UIManager.LookAndFeelInfo;
|
||||||
import javax.swing.UnsupportedLookAndFeelException;
|
import javax.swing.UnsupportedLookAndFeelException;
|
||||||
@ -56,7 +57,9 @@ public class Installer extends ModuleInstall {
|
|||||||
@Override
|
@Override
|
||||||
public void restored() {
|
public void restored() {
|
||||||
super.restored();
|
super.restored();
|
||||||
setLookAndFeel();
|
SwingUtilities.invokeLater(() -> {
|
||||||
|
setLookAndFeel();
|
||||||
|
});
|
||||||
UIManager.put("ViewTabDisplayerUI", "org.sleuthkit.autopsy.corecomponents.NoTabsTabDisplayerUI");
|
UIManager.put("ViewTabDisplayerUI", "org.sleuthkit.autopsy.corecomponents.NoTabsTabDisplayerUI");
|
||||||
UIManager.put(DefaultTabbedContainerUI.KEY_VIEW_CONTENT_BORDER, BorderFactory.createEmptyBorder());
|
UIManager.put(DefaultTabbedContainerUI.KEY_VIEW_CONTENT_BORDER, BorderFactory.createEmptyBorder());
|
||||||
UIManager.put("TabbedPane.contentBorderInsets", new Insets(0, 0, 0, 0));
|
UIManager.put("TabbedPane.contentBorderInsets", new Insets(0, 0, 0, 0));
|
||||||
@ -69,7 +72,7 @@ public class Installer extends ModuleInstall {
|
|||||||
public void uninstalled() {
|
public void uninstalled() {
|
||||||
super.uninstalled();
|
super.uninstalled();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setLookAndFeel() {
|
private void setLookAndFeel() {
|
||||||
if (System.getProperty("os.name").toLowerCase().contains("mac")) { //NON-NLS
|
if (System.getProperty("os.name").toLowerCase().contains("mac")) { //NON-NLS
|
||||||
setOSXLookAndFeel();
|
setOSXLookAndFeel();
|
||||||
@ -88,7 +91,7 @@ public class Installer extends ModuleInstall {
|
|||||||
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
|
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
|
||||||
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {
|
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {
|
||||||
logger.log(Level.WARNING, "Error setting OS-X look-and-feel", ex); //NON-NLS
|
logger.log(Level.WARNING, "Error setting OS-X look-and-feel", ex); //NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
// Store the keys that deal with menu items
|
// Store the keys that deal with menu items
|
||||||
final String[] UI_MENU_ITEM_KEYS = new String[]{"MenuBarUI",}; //NON-NLS
|
final String[] UI_MENU_ITEM_KEYS = new String[]{"MenuBarUI",}; //NON-NLS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user