Skip to content

Commit

Permalink
Add the Menubar to the Titlebar in MacOS (#3751)
Browse files Browse the repository at this point in the history
* Add the Menubar to the Titlebar in MacOS

* Remove obsolete Swing menubar stuff
  • Loading branch information
LinusDietz authored and tobiasdiez committed Feb 20, 2018
1 parent 244c74f commit a32f579
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
7 changes: 0 additions & 7 deletions src/main/java/org/jabref/JabRefGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import org.jabref.logic.l10n.Localization;
import org.jabref.logic.shared.exception.InvalidDBMSConnectionPropertiesException;
import org.jabref.logic.shared.exception.NotASharedDatabaseException;
import org.jabref.logic.util.OS;
import org.jabref.logic.util.Version;
import org.jabref.model.database.shared.DatabaseNotSupportedException;
import org.jabref.preferences.JabRefPreferences;
Expand Down Expand Up @@ -74,12 +73,6 @@ public static void checkForNewVersion(boolean manualExecution) {
}

private void openWindow(Stage mainStage) {

// This property is set to make the Mac OSX Java VM move the menu bar to the top of the screen
if (OS.OS_X) {
System.setProperty("apple.laf.useScreenMenuBar", "true");
}

// Set antialiasing on everywhere. This only works in JRE >= 1.5.
// Or... it doesn't work, period.
// TODO test and maybe remove this! I found this commented out with no additional info ( payload@lavabit.com )
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jabref/gui/JabRefFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,6 @@ public void setTabTitle(BasePanel comp, String title, String toolTip) {
*/
private MenuBar createMenu() {
ActionFactory factory = new ActionFactory(Globals.getKeyPrefs());

Menu file = new Menu(Localization.menuTitle("File"));
Menu edit = new Menu(Localization.menuTitle("Edit"));
Menu library = new Menu(Localization.menuTitle("Library"));
Expand Down Expand Up @@ -1011,6 +1010,7 @@ private MenuBar createMenu() {
view,
options,
help);
menu.setUseSystemMenuBar(true);
return menu;
}

Expand Down

0 comments on commit a32f579

Please sign in to comment.