mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-14 03:32:22 -05:00
Do not try to set Nimbus Look And Feel on Linux with Gtk
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@652 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
a4843fe9a3
commit
ff4c2c2392
@ -144,16 +144,7 @@ public class SwtGatewayTray implements DavGatewayTrayInterface {
|
|||||||
String lafClassName = UIManager.getSystemLookAndFeelClassName();
|
String lafClassName = UIManager.getSystemLookAndFeelClassName();
|
||||||
// workaround for bug when SWT and AWT both try to access Gtk
|
// workaround for bug when SWT and AWT both try to access Gtk
|
||||||
if (lafClassName.indexOf("gtk") > 0) {
|
if (lafClassName.indexOf("gtk") > 0) {
|
||||||
// try to set Nimbus LAF
|
|
||||||
for (UIManager.LookAndFeelInfo laf : UIManager.getInstalledLookAndFeels()) {
|
|
||||||
if ("Nimbus".equals(laf.getName())) {
|
|
||||||
lafClassName = laf.getClassName();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// failover to default
|
|
||||||
if (lafClassName == null) {
|
|
||||||
lafClassName = UIManager.getCrossPlatformLookAndFeelClassName();
|
lafClassName = UIManager.getCrossPlatformLookAndFeelClassName();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
UIManager.setLookAndFeel(lafClassName);
|
UIManager.setLookAndFeel(lafClassName);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user