some adhoc event handling to unify L&F button focus behavior, e.g. Mac OS X vs. Nimbus;
--- a/src/Tools/jEdit/src/query_dockable.scala Mon May 19 15:00:11 2014 +0200
+++ b/src/Tools/jEdit/src/query_dockable.scala Mon May 19 15:23:08 2014 +0200
@@ -251,7 +251,13 @@
private val apply_button = new Button("<html><b>Apply</b></html>") {
tooltip = "Apply to current context"
- reactions += { case ButtonClicked(_) => apply_query() }
+ listenTo(keys)
+ reactions += {
+ case ButtonClicked(_) => apply_query()
+ case evt @ KeyPressed(_, Key.Enter, 0, _) =>
+ evt.peer.consume
+ apply_query()
+ }
}
private val control_panel = new Wrap_Panel(Wrap_Panel.Alignment.Right)()