Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Look and Feel related issues #4002

Merged
merged 9 commits into from
May 4, 2018
6 changes: 3 additions & 3 deletions src/main/java/org/jabref/JabRefGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -239,17 +239,17 @@ private void setLookAndFeel() {
if (Globals.prefs.getBoolean(JabRefPreferences.USE_DEFAULT_LOOK_AND_FEEL)) {
// FIXME: Problems with GTK L&F on Linux and Mac. Needs reevaluation for Java9
if (GTK_LF_CLASSNAME.equals(systemLookFeel)) {
// Metal L&F
lookFeel = NIMBUS_LOOK_AND_FEEL;
LOGGER.warn("There seem to be problems with OGTK Look&Feel. Using Nimbus L&F instead. Change to another L&F with caution.");
LOGGER.warn("There seems to be problems with GTK Look&Feel. Using Nimbus L&F instead. Change to another L&F with caution.");
} else {
lookFeel = systemLookFeel;
}
} else {
lookFeel = Globals.prefs.get(JabRefPreferences.WIN_LOOK_AND_FEEL);
}

if (UIManager.getCrossPlatformLookAndFeelClassName().equals(lookFeel) && !GTK_LF_CLASSNAME.equals(lookFeel)) {
//Prevent metal l&f
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use Default L&F:

  1. System L&F = gtk => Nimbus
  2. System L&F = win => win
  3. System L&F = metal look and feel

Check cross platform

  1. Metal look and feel => Nimbus

if (UIManager.getCrossPlatformLookAndFeelClassName().equals(lookFeel)) {
UIManager.setLookAndFeel(NIMBUS_LOOK_AND_FEEL);
} else {
try {
Expand Down