CtrlLib: Fixed issue in EditField/ShowSpaces

git-svn-id: svn://ultimatepp.org/upp/trunk@11791 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2018-02-22 13:41:27 +00:00
parent 1403bfc1af
commit 20dd22e5d3
2 changed files with 3 additions and 2 deletions

View file

@ -1,5 +1,4 @@
topic "AsyncWork and Async";
[2 $$0,0#00000000000000000000000000000000:Default]
[i448;a25;kKO9;2 $$1,0#37138531426314131252341829483380:class]
[l288;2 $$2,2#27521748481378242620020725143825:desc]
[0 $$3,0#96390100711032703541132217272105:end]
@ -9,6 +8,7 @@ topic "AsyncWork and Async";
[l288;i1121;b17;O9;~~~.1408;2 $$7,0#10431211400427159095818037425705:param]
[i448;b42;O9;2 $$8,8#61672508125594000341940100500538:tparam]
[b42;2 $$9,9#13035079074754324216151401829390:normal]
[2 $$0,0#00000000000000000000000000000000:Default]
[{_}
[ {{10000@(113.42.0) [s0;%% [*@7;4 AsyncWork and Async]]}}&]
[s3; &]
@ -18,7 +18,7 @@ topic "AsyncWork and Async";
can return a value. It is similar to future/promise pattern,
but it allows cancelation and is based on U`+`+ thread pool shared
with CoWork. AsyncWork has pick constructor / operator.&]
[s0;i448;a25;kKO9;:noref:@(0.0.255) &]
[s3; &]
[ {{10000F(128)G(128)@1 [s0;%% [* Public Method List]]}}&]
[s3; &]
[s5;:Upp`:`:AsyncWork`:`:Do`(Upp`:`:Function`&`&`,Args`&`&`.`.`.args`): [@(0.0.255) tem

View file

@ -290,6 +290,7 @@ void EditField::Paints(Draw& w, int& x, int fcy, const wchar *&txt,
if(showspaces) {
int xx = x;
Size sz = GetTextSize(" ", fnt) / 2;
e = txts + n;
for(const wchar *q = txts; q < e; q++) {
if(*q == ' ')
w.DrawRect(xx + sz.cx, sz.cy, 2, 2, Blend(SColorHighlight(), SColorPaper()));