Skip to content
Snippets Groups Projects
Commit 69d0326f authored by Tobias Ullerich's avatar Tobias Ullerich
Browse files

#167 - Close search with esc key

parent ed71bd21
No related branches found
No related tags found
No related merge requests found
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
<file url="file://$PROJECT_DIR$/PlayWallPlugins/PlayWallPluginPlayoutLog/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/PlayWallPlugins/PlayWallPluginPlayoutLog/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/PlayWallPlugins/PlayWallPluginPlayoutLog/src/main/resources" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/PlayWallPlugins/PlayWallPluginPlayoutLog/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/PlayWallPlugins/PlayWallPluginWebAPI" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/PlayWallPlugins/PlayWallPluginWebAPI" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/PlayWallPlugins/PlayWallPluginWebAPI/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/PlayWallPlugins/PlayWallPluginWebAPI/src/main/resources" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/PlayWallPlugins/PlayWallPluginWebAPI/src/main/resources" charset="UTF-8" />
<file url="PROJECT" charset="UTF-8" /> <file url="PROJECT" charset="UTF-8" />
</component> </component>
......
...@@ -66,6 +66,7 @@ import javafx.scene.control.MenuBar; ...@@ -66,6 +66,7 @@ import javafx.scene.control.MenuBar;
import javafx.scene.control.MenuItem; import javafx.scene.control.MenuItem;
import javafx.scene.control.TextField; import javafx.scene.control.TextField;
import javafx.scene.control.*; import javafx.scene.control.*;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyCombination; import javafx.scene.input.KeyCombination;
import javafx.scene.input.MouseEvent; import javafx.scene.input.MouseEvent;
import javafx.scene.layout.HBox; import javafx.scene.layout.HBox;
...@@ -756,6 +757,12 @@ public class DesktopMenuToolbarViewController extends BasicMenuToolbarViewContro ...@@ -756,6 +757,12 @@ public class DesktopMenuToolbarViewController extends BasicMenuToolbarViewContro
NotificationPane pane = mainViewController.getNotificationPane(); NotificationPane pane = mainViewController.getNotificationPane();
pane.setOnShown(e -> searchField.requestFocus()); pane.setOnShown(e -> searchField.requestFocus());
pane.show("", box); pane.show("", box);
searchField.setOnKeyPressed(e -> {
if (e.getCode() == KeyCode.ESCAPE) {
pane.hide();
}
});
} }
@FXML @FXML
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment