mirror of https://github.com/buggins/dlangui.git
Merge pull request #457 from triplejam/master
Added ability to EditWidgetBase to turn off caret blinking.
This commit is contained in:
commit
47411b724c
|
@ -958,6 +958,11 @@ class EditWidgetBase : ScrollWidgetBase, EditableContentListener, MenuItemAction
|
||||||
protected ulong _caretTimerId;
|
protected ulong _caretTimerId;
|
||||||
protected bool _caretBlinkingPhase;
|
protected bool _caretBlinkingPhase;
|
||||||
protected long _lastBlinkStartTs;
|
protected long _lastBlinkStartTs;
|
||||||
|
protected bool _caretBlinks = true;
|
||||||
|
|
||||||
|
void showCaretBlinking(bool blinks) {
|
||||||
|
_caretBlinks = blinks;
|
||||||
|
}
|
||||||
|
|
||||||
protected void startCaretBlinking() {
|
protected void startCaretBlinking() {
|
||||||
if (window) {
|
if (window) {
|
||||||
|
@ -1076,7 +1081,7 @@ class EditWidgetBase : ScrollWidgetBase, EditableContentListener, MenuItemAction
|
||||||
/// draws caret
|
/// draws caret
|
||||||
protected void drawCaret(DrawBuf buf) {
|
protected void drawCaret(DrawBuf buf) {
|
||||||
if (focused) {
|
if (focused) {
|
||||||
if (_caretBlinkingPhase) {
|
if (_caretBlinkingPhase && _caretBlinks) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// draw caret
|
// draw caret
|
||||||
|
|
Loading…
Reference in New Issue