improve some checks when switching look and feel

This commit is contained in:
OMGeeky
2025-07-15 12:51:49 +02:00
parent e6d9d8fbda
commit bc3333bd0e
2 changed files with 199 additions and 191 deletions

View File

@@ -162,21 +162,12 @@ public class StudioFrame extends JFrame {
changeLaF.add(lafItem);
lafItem.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
try {
UIManager.setLookAndFeel(i.getClassName());
ATContentStudio.scaleUIFont();
SwingUtilities.updateComponentTreeUI(ATContentStudio.frame);
ConfigCache.setFavoriteLaFClassName(i.getClassName());
} catch (ClassNotFoundException e1) {
e1.printStackTrace();
} catch (InstantiationException e1) {
e1.printStackTrace();
} catch (IllegalAccessException e1) {
e1.printStackTrace();
} catch (UnsupportedLookAndFeelException e1) {
e1.printStackTrace();
}
public void actionPerformed(ActionEvent e1) {
String lookAndFeel = i.getClassName();
ATContentStudio.setLookAndFeel(lookAndFeel);
SwingUtilities.updateComponentTreeUI(ATContentStudio.frame);
ConfigCache.setFavoriteLaFClassName(lookAndFeel);
}
});
}