mirror of https://github.com/buggins/dlangui.git
update preview on delete or Ctrl+[S|V|Z]
This commit is contained in:
parent
0f1a9f4b8c
commit
8f9974479a
4
dub.json
4
dub.json
|
@ -34,8 +34,8 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"inilike": "~>1.2.2",
|
"inilike": "~>1.2.2",
|
||||||
"icontheme": "~>1.2.3",
|
"icontheme": "~>1.2.3",
|
||||||
"arsd-official:dom": "~>11.1.0",
|
"arsd-official:dom": "11.2.3",
|
||||||
"arsd-official:image_files": "~>11.1.0"
|
"arsd-official:image_files": "11.2.3"
|
||||||
},
|
},
|
||||||
|
|
||||||
"subPackages": [
|
"subPackages": [
|
||||||
|
|
|
@ -468,6 +468,25 @@ class EditFrame : AppFrame
|
||||||
_editor = new DMLSourceEdit();
|
_editor = new DMLSourceEdit();
|
||||||
_editor.text = SAMPLE_SOURCE_CODE;
|
_editor.text = SAMPLE_SOURCE_CODE;
|
||||||
|
|
||||||
|
_editor.keyEvent = delegate(Widget w, KeyEvent e) {
|
||||||
|
if (e.action == KeyAction.KeyUp)
|
||||||
|
{
|
||||||
|
if ((e.keyCode == KeyCode.DEL)
|
||||||
|
|| (e.flags == KeyFlag.LControl && e.keyCode == KeyCode.KEY_S)
|
||||||
|
|| (e.flags == KeyFlag.LControl && e.keyCode == KeyCode.KEY_V)
|
||||||
|
|| (e.flags == KeyFlag.LControl && e.keyCode == KeyCode.KEY_Z))
|
||||||
|
{
|
||||||
|
updatePreview();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Log.d(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
auto editorDockWin = new DockWindow("editor");
|
auto editorDockWin = new DockWindow("editor");
|
||||||
editorDockWin.layoutWidth = makePercentSize(50);
|
editorDockWin.layoutWidth = makePercentSize(50);
|
||||||
editorDockWin.bodyWidget = _editor;
|
editorDockWin.bodyWidget = _editor;
|
||||||
|
|
Loading…
Reference in New Issue