调整编辑器工具栏图标大小

This commit is contained in:
2025-01-24 11:26:28 +08:00
parent e8d2e5851e
commit 0ff9cbf615
7 changed files with 63 additions and 25 deletions
+18 -12
View File
@@ -1749,6 +1749,15 @@ type TCustomImageList=class(tcomponent)
begin
return csDesigning in ComponentState;
end
function recreatehandle();
begin
tmp := FBmpItems;
DestroyHandle();
for i:= 0 to tmp.length()-1 do
begin
addbmp(tmp[i]);
end
end
function addbmps();
begin
if ifarray(FImages)and FImages["type"]="bmps" then
@@ -1880,8 +1889,9 @@ type TCustomImageList=class(tcomponent)
if flg then
begin
FChanged := true;
DestroyHandle();
addbmps();
//DestroyHandle();
//addbmps();
recreatehandle();
change();
end
end
@@ -1891,8 +1901,8 @@ type TCustomImageList=class(tcomponent)
begin
FWidth := w;
FChanged := true;
DestroyHandle();
addbmps();
//DestroyHandle();
recreatehandle();//addbmps();
change();
end
end
@@ -1902,8 +1912,8 @@ type TCustomImageList=class(tcomponent)
begin
FHeight := h;
FChanged := true;
DestroyHandle();
addbmps();
//DestroyHandle();
recreatehandle();//addbmps();
change();
end
end
@@ -1943,12 +1953,8 @@ type TCustomImageList=class(tcomponent)
FimageCount := 0;
FBmpItems := new tnumindexarray();
end
function add(Image,Mask);
{function add(Image,Mask);
begin
{**
@ignore 忽略%%
@explan(说明) 添加位图 %%
**}
if not FAutoDestroy then exit;
if not(Image is class(tcustombitmap))then exit;
HandleNeeded();
@@ -1967,7 +1973,7 @@ type TCustomImageList=class(tcomponent)
FimageCount := _wapi.ImageList_GetImageCount(FHandle);
end
return r;
end
end}
function addbmp(bmp);
begin
{**
+1
View File
@@ -5699,6 +5699,7 @@ type TcustomToolBar=class(TCustomControl)
begin
if fmainmenu then return ;
if not HandleAllocated() then return ;
if autosize then return AdjustSize();
CalcButtonsRect();
InvalidateRect(nil,false);
return 0;