mirror of
https://github.com/mitb-archive/filebot
synced 2025-03-10 14:31:04 -04:00
make sure that the popup window displays above the task bar
This commit is contained in:
parent
38d9af01fe
commit
c9876e093e
@ -1,8 +1,12 @@
|
|||||||
package net.filebot.util.ui;
|
package net.filebot.util.ui;
|
||||||
|
|
||||||
|
import static javax.swing.SwingUtilities.*;
|
||||||
|
import static net.filebot.Logging.*;
|
||||||
import static net.filebot.ui.ThemeSupport.*;
|
import static net.filebot.ui.ThemeSupport.*;
|
||||||
|
|
||||||
|
import java.awt.Component;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import javax.swing.Action;
|
import javax.swing.Action;
|
||||||
import javax.swing.Icon;
|
import javax.swing.Icon;
|
||||||
@ -48,6 +52,18 @@ public class ActionPopup extends JPopupMenu {
|
|||||||
setLightWeightPopupEnabled(false);
|
setLightWeightPopupEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void show(Component invoker, int x, int y) {
|
||||||
|
super.show(invoker, x, y);
|
||||||
|
|
||||||
|
// make sure that the popup window displays above the task bar
|
||||||
|
try {
|
||||||
|
getWindowAncestor(this).setAlwaysOnTop(true);
|
||||||
|
} catch (Exception e) {
|
||||||
|
debug.log(Level.WARNING, e, e::getMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected JLabel createLabel(String text) {
|
protected JLabel createLabel(String text) {
|
||||||
JLabel label = new JLabel(text);
|
JLabel label = new JLabel(text);
|
||||||
label.setForeground(getForeground());
|
label.setForeground(getForeground());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user