mirror of https://github.com/buggins/dlangui.git
fixes editor key handling, file dialog
This commit is contained in:
parent
8d84223099
commit
d382cbf483
|
@ -898,6 +898,7 @@ class FilePathPanelItem : HorizontalLayout {
|
||||||
addChild(_button);
|
addChild(_button);
|
||||||
margins(Rect(2.pointsToPixels + 1, 0, 2.pointsToPixels + 1, 0));
|
margins(Rect(2.pointsToPixels + 1, 0, 2.pointsToPixels + 1, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool onTextClick(Widget src) {
|
private bool onTextClick(Widget src) {
|
||||||
if (onPathSelectionListener.assigned)
|
if (onPathSelectionListener.assigned)
|
||||||
return onPathSelectionListener(_path);
|
return onPathSelectionListener(_path);
|
||||||
|
@ -1134,6 +1135,10 @@ class FileNameEditLine : HorizontalLayout {
|
||||||
/// editor content is changed
|
/// editor content is changed
|
||||||
Signal!EditableContentChangeListener contentChange;
|
Signal!EditableContentChangeListener contentChange;
|
||||||
|
|
||||||
|
@property ref Signal!EditorActionHandler editorAction() {
|
||||||
|
return _edFileName.editorAction;
|
||||||
|
}
|
||||||
|
|
||||||
this(string ID = null) {
|
this(string ID = null) {
|
||||||
super(ID);
|
super(ID);
|
||||||
_caption = UIString.fromId("TITLE_OPEN_FILE"c).value;
|
_caption = UIString.fromId("TITLE_OPEN_FILE"c).value;
|
||||||
|
|
|
@ -1624,6 +1624,7 @@ class EditWidgetBase : ScrollWidgetBase, EditableContentListener, MenuItemAction
|
||||||
return true;
|
return true;
|
||||||
case SelectAll:
|
case SelectAll:
|
||||||
selectAll();
|
selectAll();
|
||||||
|
ensureCaretVisible();
|
||||||
return true;
|
return true;
|
||||||
case ToggleBookmark:
|
case ToggleBookmark:
|
||||||
if (_content.multiline) {
|
if (_content.multiline) {
|
||||||
|
@ -1654,7 +1655,6 @@ class EditWidgetBase : ScrollWidgetBase, EditableContentListener, MenuItemAction
|
||||||
_selectionRange.start.pos = 0;
|
_selectionRange.start.pos = 0;
|
||||||
_selectionRange.end = _content.lineEnd(_content.length - 1);
|
_selectionRange.end = _content.lineEnd(_content.length - 1);
|
||||||
_caretPos = _selectionRange.end;
|
_caretPos = _selectionRange.end;
|
||||||
ensureCaretVisible();
|
|
||||||
requestActionsUpdate();
|
requestActionsUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1809,7 +1809,7 @@ class EditWidgetBase : ScrollWidgetBase, EditableContentListener, MenuItemAction
|
||||||
// return true;
|
// return true;
|
||||||
//}
|
//}
|
||||||
bool res = super.onKeyEvent(event);
|
bool res = super.onKeyEvent(event);
|
||||||
if (focused) startCaretBlinking();
|
//if (focused) startCaretBlinking();
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue