IDEA-194533 Change 'Paste from History' dialog

make button order in dialog on macOS comply with official guidelines (https://developer.apple.com/design/human-interface-guidelines/macos/windows-and-views/dialogs/)
This commit is contained in:
Dmitry Batrak
2018-07-05 18:35:40 +03:00
parent 291dc76cd0
commit db4813969c
@@ -495,11 +495,11 @@ public abstract class DialogWrapper {
actions.add(getOKAction());
}
// move cancel action to the left
// move cancel action to the left of OK action, if present, and to the leftmost position otherwise
int cancelNdx = actions.indexOf(getCancelAction());
if (cancelNdx > 0) {
actions.remove(getCancelAction());
actions.add(0, getCancelAction());
actions.add(okNdx < 0 ? 0 : actions.size() - 1, getCancelAction());
}
}
else if (UIUtil.isUnderGTKLookAndFeel() && actions.contains(getHelpAction())) {