Issue #27: Added ctrl+shift+f to toggle fullscreen and updated startup to use aspect ratio 1x method for consistency.

This commit is contained in:
Brendan Robert 2016-02-20 21:30:23 -06:00
parent ce6a8ca873
commit abbe5d007e
2 changed files with 12 additions and 8 deletions

View File

@ -52,6 +52,7 @@ import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.image.Image;
import javafx.scene.input.KeyCombination;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.AnchorPane;
import javafx.stage.FileChooser;
@ -256,14 +257,16 @@ public class EmulatorUILogic implements Reconfigurable {
// Emulator.resizeVideo();
}
@InvokableAction(
name = "Toggle fullscreen",
category = "general",
description = "Activate/deactivate fullscreen mode",
alternatives = "fullscreen,maximize",
defaultKeyMapping = "ctrl+shift+f")
public static void toggleFullscreen() {
// AbstractEmulatorFrame frame = Emulator.getFrame();
// if (frame == null) {
// return;
// }
// Emulator.computer.pause();
// frame.toggleFullscreen();
// Emulator.computer.resume();
Stage stage = JaceApplication.getApplication().primaryStage;
stage.setFullScreenExitKeyCombination(KeyCombination.NO_MATCH);
stage.setFullScreen(!stage.isFullScreen());
}
@InvokableAction(
@ -383,7 +386,7 @@ public class EmulatorUILogic implements Reconfigurable {
static int size = -1;
@InvokableAction(
name = "Resize window",
category = "UI",
category = "general",
description = "Resize the screen to 1x/1.5x/2x video size",
alternatives = "Adjust screen;Adjust window size;Adjust aspect ratio;Fix screen;Fix window size;Fix aspect ratio;Correct aspect ratio;",
defaultKeyMapping = {"ctrl+shift+a"})

View File

@ -47,6 +47,7 @@ public class JaceApplication extends Application {
Scene s = new Scene(node);
primaryStage.setScene(s);
primaryStage.setTitle("Jace");
EmulatorUILogic.scaleIntegerRatio();
Utility.loadIcon("woz_figure.gif").ifPresent(primaryStage.getIcons()::add);
} catch (IOException exception) {
throw new RuntimeException(exception);