Fixed exp tracker pop-up in the progress bar

Fixes #2989

The interaction to open the pop-up menu contains "reset" and "open
online tracker" wasn't accessible if the user clicked on the progress
bar. What I did was add the component pop menu to the progress bar too.

Grouped these two attributions and moved them lower on the constructor.
This commit is contained in:
Ruben Amendoeira
2018-05-21 16:24:15 +01:00
parent b999118486
commit b85ca418db

View File

@@ -99,7 +99,6 @@ class XpInfoBox extends JPanel
popupMenu.setBorder(new EmptyBorder(5, 5, 5, 5));
popupMenu.add(openXpTracker);
popupMenu.add(reset);
container.setComponentPopupMenu(popupMenu);
JLabel skillIcon = new JLabel(new ImageIcon(iconManager.getSkillImage(skill)));
skillIcon.setHorizontalAlignment(SwingConstants.CENTER);
@@ -153,6 +152,9 @@ class XpInfoBox extends JPanel
container.add(headerPanel, BorderLayout.NORTH);
container.add(progressWrapper, BorderLayout.SOUTH);
container.setComponentPopupMenu(popupMenu);
progressBar.setComponentPopupMenu(popupMenu);
add(container, BorderLayout.NORTH);
}