When selecting the application LookAndFeel, tries to be less explicit and relies on UIManager.getSystemLookAndFeelClassName() which has more advanced logic and tries to differentiate between Gnome and KDE.

cusax-fix
Lyubomir Marinov 18 years ago
parent 795e708c11
commit 1dff2bcfbe

@ -710,23 +710,12 @@ private void setDefaultThemePack()
* Attempt to use the OS-native LookAndFeel instead of
* SIPCommLookAndFeel.
*/
String laf;
String laf = UIManager.getSystemLookAndFeelClassName();
boolean lafIsSet = false;
if (osName.contains("Windows"))
{
laf = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
}
else if (osName.contains("Linux"))
{
laf = "com.sun.java.swing.plaf.gtk.GTKLookAndFeel";
}
else
{
laf = null;
}
if (laf != null)
if ((laf != null)
&& !laf
.equals(UIManager.getCrossPlatformLookAndFeelClassName()))
{
try
{

Loading…
Cancel
Save