1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-23 16:28:51 -05:00

Fix MAS review issue:

The user interface of your app is not consistent with the macOS Human Interface Guidelines. Specifically:

We found that menu items are not visible, except by right-clicking (see screenshot). See the "WYSIWYG (What You See Is What You Get)," "Give Users Alternate Ways to Accomplish Tasks," and "Designing Contextual Menus" sections of the Human Interface Guidelines.
This commit is contained in:
Reinhard Pointner 2018-04-17 17:32:22 +07:00
parent 7f09ea696c
commit eb7310f095
2 changed files with 41 additions and 33 deletions

View File

@ -1,5 +1,6 @@
package net.filebot.ui.episodelist; package net.filebot.ui.episodelist;
import static net.filebot.Settings.*;
import static net.filebot.ui.episodelist.SeasonSpinnerModel.*; import static net.filebot.ui.episodelist.SeasonSpinnerModel.*;
import static net.filebot.util.ui.SwingUI.*; import static net.filebot.util.ui.SwingUI.*;
import static net.filebot.web.EpisodeUtilities.*; import static net.filebot.web.EpisodeUtilities.*;
@ -244,7 +245,9 @@ public class EpisodeListPanel extends AbstractSearchPanel<EpisodeListProvider, E
listScrollPane.setBorder(null); listScrollPane.setBorder(null);
setBorder(null); setBorder(null);
// popup menu // XXX The user interface of your app is not consistent with the macOS Human Interface Guidelines. Specifically: We found that menu items are not visible, except by right-clicking (see screenshot). See the "WYSIWYG (What You See Is What You Get)," "Give Users
// Alternate Ways to Accomplish Tasks," and "Designing Contextual Menus" sections of the Human Interface Guidelines.
if (!isMacSandbox()) {
JPopupMenu popup = new JPopupMenu("Episodes"); JPopupMenu popup = new JPopupMenu("Episodes");
JMenu menu = new JMenu("Send to"); JMenu menu = new JMenu("Send to");
@ -267,6 +270,7 @@ public class EpisodeListPanel extends AbstractSearchPanel<EpisodeListProvider, E
popup.add(new SaveAction(getExportHandler())); popup.add(new SaveAction(getExportHandler()));
getListComponent().setComponentPopupMenu(popup); getListComponent().setComponentPopupMenu(popup);
} }
}
} }

View File

@ -3,6 +3,7 @@ package net.filebot.ui.list;
import static java.awt.Font.*; import static java.awt.Font.*;
import static java.util.stream.Collectors.*; import static java.util.stream.Collectors.*;
import static javax.swing.BorderFactory.*; import static javax.swing.BorderFactory.*;
import static net.filebot.Settings.*;
import static net.filebot.util.ui.SwingUI.*; import static net.filebot.util.ui.SwingUI.*;
import java.awt.BorderLayout; import java.awt.BorderLayout;
@ -77,7 +78,9 @@ public class ListPanel extends JComponent {
list.setExportHandler(exportHandler); list.setExportHandler(exportHandler);
list.getTransferHandler().setClipboardHandler(exportHandler); list.getTransferHandler().setClipboardHandler(exportHandler);
// context menu // XXX The user interface of your app is not consistent with the macOS Human Interface Guidelines. Specifically: We found that menu items are not visible, except by right-clicking (see screenshot). See the "WYSIWYG (What You See Is What You Get)," "Give Users
// Alternate Ways to Accomplish Tasks," and "Designing Contextual Menus" sections of the Human Interface Guidelines.
if (!isMacSandbox()) {
JPopupMenu popup = new JPopupMenu("List"); JPopupMenu popup = new JPopupMenu("List");
JMenu menu = new JMenu("Send to"); JMenu menu = new JMenu("Send to");
for (PanelBuilder panel : PanelBuilder.textHandlerSequence()) { for (PanelBuilder panel : PanelBuilder.textHandlerSequence()) {
@ -94,6 +97,7 @@ public class ListPanel extends JComponent {
})); }));
popup.add(new SaveAction(list.getExportHandler())); popup.add(new SaveAction(list.getExportHandler()));
list.getListComponent().setComponentPopupMenu(popup); list.getListComponent().setComponentPopupMenu(popup);
}
// cell renderer // cell renderer
list.getListComponent().setCellRenderer(new DefaultFancyListCellRenderer() { list.getListComponent().setCellRenderer(new DefaultFancyListCellRenderer() {