From 1042970ffed5085c94b82bc8be720b50635612d7 Mon Sep 17 00:00:00 2001 From: JianjunLiu Date: Tue, 23 Aug 2022 16:52:01 +0800 Subject: [PATCH] =?UTF-8?q?=E7=95=8C=E9=9D=A2=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 优化 --- designer/tslvcldesigner.tsf | 20 ++++++++++---------- funcext/tvclib/ugtkinterface.tsf | 17 ++++++++++------- funcext/tvclib/utslvclpage.tsf | 4 ++-- funcext/tvclib/utslvclstdctl.tsf | 12 +++++++++++- 4 files changed, 33 insertions(+), 20 deletions(-) diff --git a/designer/tslvcldesigner.tsf b/designer/tslvcldesigner.tsf index 8833aff..5ccdf57 100644 --- a/designer/tslvcldesigner.tsf +++ b/designer/tslvcldesigner.tsf @@ -667,7 +667,7 @@ type TDVirutalWindow = class(TCustomControl) function paint();override; begin //canvas.draw("polyline",array((0,0),(20,0),(20,20),(0,20))); - canvas.StretchDraw(array(0,0,30,30),GetBitmap()); + canvas.StretchDraw(array(1,1,width-3,height-3),GetBitmap()); end function GetBitmap(); begin @@ -702,7 +702,7 @@ type TDVirutalWindow = class(TCustomControl) r := FBindComponent.GetPublishEvents(); return r; end - if not r then return array(1:nil); + if not r then return array();//array(1:nil); return r; end function GetChangedPublish();override; @@ -2157,7 +2157,7 @@ type TDFileWindow = class(TDVirutalWindow) end function GetPublishEvents();override; begin - return array(1:nil); + return array();//array(1:nil); end function bitmapinfo();override; begin @@ -2176,7 +2176,7 @@ type TDFileSaveWindow = class(TDVirutalWindow) end function GetPublishEvents();override; begin - return array(1:nil); + return array();//array(1:nil); end function bitmapinfo();override; begin @@ -2196,7 +2196,7 @@ type TDInputQuerysWindow = class(TDVirutalWindow) function GetPublishEvents();override; begin return array(); - //return array(1:nil); + //return array();//array(1:nil); end function bitmapinfo();override; begin @@ -2216,7 +2216,7 @@ type TDColorChooseWindow = class(TDVirutalWindow) end function GetPublishEvents();override; begin - return array(1:nil); + return array();//array(1:nil); end function bitmapinfo();override; begin @@ -2235,7 +2235,7 @@ type TDFontChooseWindow = class(TDVirutalWindow) end function GetPublishEvents();override; begin - return array(1:nil); + return array();//array(1:nil); end function bitmapinfo();override; begin @@ -2254,7 +2254,7 @@ type TDFolderChooseWindow = class(TDVirutalWindow) end function GetPublishEvents();override; begin - return array(1:nil); + return array();//array(1:nil); end function bitmapinfo();override; begin @@ -7092,7 +7092,7 @@ type TPropEditGrid = class(TPropGrid) TSLData := v.GetPublishProperties(); end else begin - TSLData := array(NIL); + TSLData := array();//array(NIL); end inherited; end @@ -8409,7 +8409,7 @@ type TDMessageboxWindow = class(TDVirutalWindow) end function GetPublishEvents();override; begin - return array(1:nil); + return array();//array(1:nil); end function bitmapinfo();override; begin diff --git a/funcext/tvclib/ugtkinterface.tsf b/funcext/tvclib/ugtkinterface.tsf index 3efde30..ace689b 100644 --- a/funcext/tvclib/ugtkinterface.tsf +++ b/funcext/tvclib/ugtkinterface.tsf @@ -1887,11 +1887,12 @@ type tsgtkapi = class(tgtkapis) //cairo_pattern_set_extend(cairo_get_source(hdc),1); cairo_set_source_surface(hdc, img, x-rc[0], y-rc[1]); cairo_rectangle(hdc,xb+x,yb+y,rc[2]-rc[0],rc[3]-rc[1]); - if flag = 0x8800c6 or flag = 0x4 then + if flag = 0x8800c6 or flag = 0x4 then begin //echo "\r\nset alopha***********"; - //cairo_paint_with_alpha(hdc,0.5); + //cairo_paint_with_alpha(hdc,0.2); //cairo_set_source_rgba(hdc, 0.6, 0.6, 0.6, 0.5); + //cairo_set_operator(hdc, 12); end else begin //cairo_paint_with_alpha(hdc,0); @@ -1900,6 +1901,7 @@ type tsgtkapi = class(tgtkapis) //cairo_fill(hdc); end cairo_fill(hdc); + //cairo_set_operator(hdc, 1); //cairo_set_source_surface(hdc, img, x-rc[0], y-rc[1]); end function drawbitmapstretchtodc(bm,hdc,drect,rc,flag,thdc); @@ -2567,12 +2569,13 @@ type tsgtkapi = class(tgtkapis) h := gtk_event_box_new(); gtk_widget_hide(h); g_object_set_data(hwnd,"gtk_window_caret",h); - if nWidth>=0 and nHeight>=0 then - begin - g_object_set_data(h,"width_c",nWidth); - g_object_set_data(h,"heigt_c",nHeight); - end + end + if nWidth>=0 and nHeight>=0 then + begin + g_object_set_data(h,"width_c",nWidth); + g_object_set_data(h,"heigt_c",nHeight); + end return h; end function DestroyCaret():integer; diff --git a/funcext/tvclib/utslvclpage.tsf b/funcext/tvclib/utslvclpage.tsf index ad19510..3655951 100644 --- a/funcext/tvclib/utslvclpage.tsf +++ b/funcext/tvclib/utslvclpage.tsf @@ -324,7 +324,7 @@ type tcustompagecontrol = class(TCustomControl) if FCurrentid=i then begin - dc.brush.color := rgb(200,200,200); + dc.brush.color := rgb(100,192,250);//rgb(230,240,250);//rgb(200,200,200); end else dc.brush.color := rgb(254,254,254); dc.draw("roundrect",array(rec[0:1],rec[2:3],array(2,2))); //dc.draw("rectangle",array(rec[0:1],rec[2:3],array(5,5))); @@ -431,10 +431,10 @@ type tcustompagecontrol = class(TCustomControl) PaintTabs(); PaintScroll(); end - function MouseUp(o,e);override; begin ps := e.pos(); + if e.button()=mbRight then return ; if FScrollBtnRect and pointinrect(ps,fnextrect) then begin if e.Button() = mbLeft then diff --git a/funcext/tvclib/utslvclstdctl.tsf b/funcext/tvclib/utslvclstdctl.tsf index 01bb2f9..5db48b0 100644 --- a/funcext/tvclib/utslvclstdctl.tsf +++ b/funcext/tvclib/utslvclstdctl.tsf @@ -4587,7 +4587,17 @@ type TcustomToolBar=class(TCustomControl) begin c.draw("framecontrol",array(ci[0:1],ci[2:3]),DFC_BUTTON,DFCS_BUTTONCHECK); end else - c.draw("framecontrol",array(ci[0:1],ci[2:3]),DFC_BUTTON,DFCS_BUTTONPUSH); + begin + if bi.enabled then + begin + c.draw("framecontrol",array(ci[0:1],ci[2:3]),DFC_BUTTON,DFCS_BUTTONPUSH); + end else + begin + c.brush.Color := 0x8c8c8c;////0xc0c0cc; + c.FillRect(ci); + end + + end igslist := ImageList; if igslist is class(TCustomImageList)then begin