Commit fc0ca16d authored by Markus's avatar Markus
Browse files

Numpad wird nicht mehr diskriminiert

parent 7884b94f
......@@ -90,7 +90,7 @@ public class GUI extends JFrame {
if (!reset) {
// changeFontSize(toolBar, size);
changeFontSize(output, size);
changeFontSize(input, size);
changeFontSize(input, size);
// changeFontSize(popupMenu, size);
// changeFontSize(popUpRefresh, size); changeFontSize(popUpOpen, size);
// changeFontSize(popUpDelete, size); changeFontSize(popUpRun, size);
......@@ -118,11 +118,11 @@ public class GUI extends JFrame {
// resetFontSize(list, size);
}
}
private void changeFontSize(Object o, int size) {
((JComponent) o).setFont(new Font(((Component) o).getFont().getFontName(), Font.PLAIN, ((Component) o).getFont().getSize()+size));
private void changeFontSize(Component c, int size) {
c.setFont(new Font(c.getFont().getFontName(), Font.PLAIN, c.getFont().getSize()+size));
}
private void resetFontSize(Object o, int size) {
((JComponent) o).setFont(new Font(((Component) o).getFont().getFontName(), Font.PLAIN, size));
private void resetFontSize(Component c, int size) {
c.setFont(new Font(c.getFont().getFontName(), Font.PLAIN, size));
}
/**
......@@ -776,13 +776,13 @@ public class GUI extends JFrame {
@Override
public boolean dispatchKeyEvent(KeyEvent e) {
if (e.getID() == KeyEvent.KEY_PRESSED && e.isControlDown()) {
if (e.getKeyCode() == KeyEvent.VK_PLUS) {
if (e.getKeyCode() == KeyEvent.VK_PLUS || e.getKeyCode() == KeyEvent.VK_ADD) {
changeFontSize(1, false);
}
else if (e.getKeyCode() == KeyEvent.VK_MINUS) {
else if (e.getKeyCode() == KeyEvent.VK_MINUS || e.getKeyCode() == KeyEvent.VK_SUBTRACT) {
changeFontSize(-1, false);
}
else if (e.getKeyCode() == KeyEvent.VK_0) {
else if (e.getKeyCode() == KeyEvent.VK_0 || e.getKeyCode() == KeyEvent.VK_NUMPAD0) {
changeFontSize(12, true);
}
}
......
......@@ -189,7 +189,7 @@ public class DebuggerFrame extends JFrame {
private static final long serialVersionUID = 1L;
public RestartAction(){
super("", ResourceLoader.loadIcon("debug.png"));
super("", ResourceLoader.loadIcon("run.png"));
putValue(Action.SHORT_DESCRIPTION, "Restarts the current program");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment