diff --git a/CommKrnl.dll b/CommKrnl.dll index ab50757..5ff4258 100644 Binary files a/CommKrnl.dll and b/CommKrnl.dll differ diff --git a/DocProc.dll b/DocProc.dll index c46a210..d42c5cd 100644 Binary files a/DocProc.dll and b/DocProc.dll differ diff --git a/MathKrnl.dll b/MathKrnl.dll index c0bea75..ed519bb 100644 Binary files a/MathKrnl.dll and b/MathKrnl.dll differ diff --git a/Mod_TSL24.dll b/Mod_TSL24.dll index d273883..9a6795a 100644 Binary files a/Mod_TSL24.dll and b/Mod_TSL24.dll differ diff --git a/TSCrypt.dll b/TSCrypt.dll index 509bade..ed653f2 100644 Binary files a/TSCrypt.dll and b/TSCrypt.dll differ diff --git a/TSLDebugModule.dll b/TSLDebugModule.dll index ca02e26..824b21f 100644 Binary files a/TSLDebugModule.dll and b/TSLDebugModule.dll differ diff --git a/TSLInterp.dll b/TSLInterp.dll index 6d9939b..2c23bf3 100644 Binary files a/TSLInterp.dll and b/TSLInterp.dll differ diff --git a/TSLPlugin.dll b/TSLPlugin.dll index 3dc65b5..1e0824b 100644 Binary files a/TSLPlugin.dll and b/TSLPlugin.dll differ diff --git a/funcext/tvclib/ugtkinterface.tsf b/funcext/tvclib/ugtkinterface.tsf index 5f7313c..fcf7b51 100644 --- a/funcext/tvclib/ugtkinterface.tsf +++ b/funcext/tvclib/ugtkinterface.tsf @@ -783,7 +783,7 @@ type tsgtkapi = class(tgtkapis) end Function TextOutA(hdc :pointer;X:integer;y:integer;txt:string;len:integer):integer; begin - cl := gtk_object_get_data(hdc,"text.color"); + cl := gtk_object_get_data(hdc,"text.color"); // gtk_rgb_color_rgb(cl,r,g,b); // cairo_set_source_rgb(hdc, r, g, b); xb := gtk_object_get_data(hdc,"viewport.x"); @@ -815,8 +815,7 @@ type tsgtkapi = class(tgtkapis) end } cft := (fnotset?fc:"AR PL UKai CN"); global g_gtk_font_get_size ; - if not ifarray(g_gtk_font_get_size) then g_gtk_font_get_size := array(); - cfinfo := g_gtk_font_get_size[cft,ht,wd,it,wt]; + cfinfo := g_gtk_font_get_size[cft{,ht},wd,it,wt]; if cfinfo then begin wd := cfinfo["width"]; @@ -826,13 +825,13 @@ type tsgtkapi = class(tgtkapis) cairo_set_font_size(hdc,cfinfo["iwd2"]); end else begin - cairo_select_font_face(hdc,cft,it,wt); - ext := new _cairo_text_extents_t(nil); + cairo_select_font_face(hdc,cft,it,wt); brk := 0; - wd2 := wd*2-2-wt; //稍微缩小一点 + wd2 := wd*2{-2-wt}; //稍微缩小一点 iwd2 := wd2; brk_Ct := 0; dkzt := false; + {ext := new _cairo_text_extents_t(nil); while not brk do begin brk_Ct++; @@ -851,25 +850,28 @@ type tsgtkapi = class(tgtkapis) iwd2 := wd+1+it-wt; end end - if nwd>(wd2+0.4) then + if nwd>(wd2+0.04) then begin - iwd2-=0.25; + iwd2-=0.001; end else - if nwd<(wd2) then + if nwd<(wd2+0.04) then begin - iwd2+=0.25; + iwd2+=0.001; end else begin brk := true; - end + end + echo "\r\n",iwd2,"++++",wd; if brk_Ct>50 then break; end - g_gtk_font_get_size[cft,ht,wd,it,wt] := array("width":wd,"zczw":dkzt,"iwd2":iwd2); + echo "\r\ncalc count:",brk_Ct;} + g_gtk_font_get_size[cft,{ht,}wd,it,wt] := array("width":wd,"zczw":dkzt,"iwd2":iwd2); + cairo_set_font_size(hdc,iwd2); end end end - + ht := wd*2; wid := wd; idx := 1 ; tlen := (len<0)?length(txt):(min(len,length(txt))); @@ -878,23 +880,69 @@ type tsgtkapi = class(tgtkapis) ///////////////////背景///////////////////////////////////////// if gtk_object_get_data(hdc,"font.bkmode") = 2 then begin - gtk_rgb_color_rgb(gtk_object_get_data(hdc,"font.bkcolor"),r,g,b); + fillbk := true; + gtk_rgb_color_rgb(gtk_object_get_data(hdc,"font.bkcolor"),bkr,bkg,bkb); //cairo_fill - cairo_move_to(hdc,xp,yp); - cairo_line_to(hdc,xp+wid*tlen,yp); - cairo_line_to(hdc,xp+wid*tlen,yp-ht); - cairo_line_to(hdc,xp,yp-ht); - cairo_line_to(hdc,xp,yp); - cairo_set_source_rgb(hdc, r, g, b); - cairo_fill(hdc); + end - gtk_rgb_color_rgb(cl,r,g,b); - cairo_set_source_rgb(hdc, r, g, b); + //////////////////////////////////////////////////////// if udl then begin - cairo_set_line_width(hdc,0.5); + cairo_set_line_width(hdc,0.4); end + txts := array(); + txtidx := 0; + txti := ""; + while idx<=tlen do + begin + ci := GetChar(txt,idx); + idx++; + if ci=10 then + begin + txts[txtidx++] := array(txti,yp,xp); + txti := ""; + yp+=ht; + continue; + end + if ci=13 then + continue; + if ci=9 then txti+=" "; + else + txti+=txt[idx-1]; + end + if txti then txts[txtidx++] := array(txti,yp,xp); + gtk_rgb_color_rgb(cl,pr,pg,pb); + for i ,v in txts do + begin + v0 := v[0]; + if not v0 then continue; + vl := length(v0); + xx := v[2]; + yy := v[1]; + if fillbk then + begin + cairo_move_to(hdc,xx,yy); + cairo_line_to(hdc,xx+wid*vl,yy); + cairo_line_to(hdc,xx+wid*vl,yy-ht); + cairo_line_to(hdc,xx,yy-ht); + cairo_line_to(hdc,xx,yy); + cairo_set_source_rgb(hdc, bkr, bkg, bkb); + cairo_fill(hdc); + end + + cairo_set_source_rgb(hdc, pr, pg, pb); + if udl then + begin + cairo_move_to(hdc,xx,yy-1); + cairo_line_to(hdc,(xx+wid*vl),yy-1); + end + cairo_move_to(hdc,xx,yy); + cairo_show_text(hdc,TslStringToGtk(v0)); + cairo_stroke(hdc); + end + + return 1; while idx<=tlen do begin if udl then bxp := xp; @@ -8957,7 +9005,8 @@ begin end function igtk(); begin - global g_w_i_datas,g_w_c_width, g_gtk_buttontable,g_gtk_keytable,g_gtk_call_handler_manager; + global g_w_i_datas,g_w_c_width, g_gtk_buttontable,g_gtk_keytable,g_gtk_call_handler_manager,g_gtk_font_get_size; + g_gtk_font_get_size := array(); gtk_init_check(nil,nil); g_w_i_datas := array(); g_w_c_width := 35; diff --git a/funcext/tvclib/utslmemo.tsf b/funcext/tvclib/utslmemo.tsf index f7ca287..1862a55 100644 --- a/funcext/tvclib/utslmemo.tsf +++ b/funcext/tvclib/utslmemo.tsf @@ -2643,6 +2643,7 @@ type TSynCompletion = class(TSynCompletionList) function Create(AOwner);override; begin inherited; + fmatchfirst := true; {$ifdef linuxpop} //处理避免闪烁 {$else} @@ -2871,7 +2872,8 @@ type TSynCompletion = class(TSynCompletionList) for i,v in FCompData do begin vi := v[cindex]; - if pos(cs,vi)=1 then + ps := pos(cs,vi); + if (fmatchfirst?(ps=1):(ps>=1)) then begin d[ld++] := v; wd := max(wd,v["clen"]); @@ -2902,7 +2904,9 @@ type TSynCompletion = class(TSynCompletionList) property Memo Read FMemo write SetMemo; //编辑器 property IgnoreCase read FIgnoreCase Write SetIgnoreCase; //忽略大小写 property OnJumpChoosed read GetJumpChoosed write SetJumpChoosed; + property matchfirst read fmatchfirst write fmatchfirst ;//匹配首字母 private + fmatchfirst; FCurrentWidth; FCompData; [weakref]FMemo; diff --git a/plugin/DOCEXT.DLL b/plugin/DOCEXT.DLL index 4a43228..27b1abf 100644 Binary files a/plugin/DOCEXT.DLL and b/plugin/DOCEXT.DLL differ diff --git a/plugin/FileMgr.dll b/plugin/FileMgr.dll index 5e74b41..000e3ff 100644 Binary files a/plugin/FileMgr.dll and b/plugin/FileMgr.dll differ diff --git a/plugin/LocFunc.dll b/plugin/LocFunc.dll index c852b29..ef08118 100644 Binary files a/plugin/LocFunc.dll and b/plugin/LocFunc.dll differ diff --git a/plugin/TSCURL.DLL b/plugin/TSCURL.DLL index 7a2145c..52bd025 100644 Binary files a/plugin/TSCURL.DLL and b/plugin/TSCURL.DLL differ diff --git a/plugin/TSLCPLUGIN.DLL b/plugin/TSLCPLUGIN.DLL index 0506948..fdf30cd 100644 Binary files a/plugin/TSLCPLUGIN.DLL and b/plugin/TSLCPLUGIN.DLL differ diff --git a/plugin/TSLClient.dll b/plugin/TSLClient.dll index d5d8677..19eb5df 100644 Binary files a/plugin/TSLClient.dll and b/plugin/TSLClient.dll differ diff --git a/protocol.dll b/protocol.dll index 0983f79..eb4db27 100644 Binary files a/protocol.dll and b/protocol.dll differ diff --git a/pubKrnl.dll b/pubKrnl.dll index b195491..6da8c9c 100644 Binary files a/pubKrnl.dll and b/pubKrnl.dll differ diff --git a/tslkrnl.dll b/tslkrnl.dll index 5156210..cf55821 100644 Binary files a/tslkrnl.dll and b/tslkrnl.dll differ diff --git a/tslpcre.dll b/tslpcre.dll index 7818881..dd7aa11 100644 Binary files a/tslpcre.dll and b/tslpcre.dll differ diff --git a/tsnet.dll b/tsnet.dll index b45e004..14a4ae2 100644 Binary files a/tsnet.dll and b/tsnet.dll differ