调整编辑器工具栏图标大小
This commit is contained in:
parent
e8d2e5851e
commit
0ff9cbf615
|
|
@ -419,8 +419,8 @@ type teditorform = class(TVCform) //
|
|||
if (importfile(ftstream(),"",feditorglobalpath,ginfo)=1) and ifarray(ginfo) then
|
||||
begin
|
||||
global g_editer_font_size := ginfo["font"];
|
||||
FEdter.getpage().font := ginfo["font"];
|
||||
FEdter.getcodemap().font := ginfo["font"];
|
||||
//FEdter.getpage().font := ginfo["font"];
|
||||
//FEdter.getcodemap().font := ginfo["font"];
|
||||
|
||||
//Fdirview.addrootdirs(dirs);
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1097,12 +1097,12 @@ type TFTSLScriptMemo = class(TFTSLScriptcustomMemo)
|
|||
function create(AOwner);
|
||||
begin
|
||||
inherited;
|
||||
global g_editer_font_size;
|
||||
{global g_editer_font_size;
|
||||
if g_editer_font_size and ifarray(g_editer_font_size) then
|
||||
begin
|
||||
ft := array("width":g_editer_font_size["width"]+1,"height":g_editer_font_size["height"]+2);
|
||||
font := ft;
|
||||
end
|
||||
end }
|
||||
end
|
||||
function SetFocus();override;
|
||||
begin
|
||||
|
|
@ -1712,7 +1712,7 @@ type TPageEditer=class(TPage) //
|
|||
finfo := array("width":fw+1,"height":hw+2);
|
||||
end
|
||||
end
|
||||
if finfo then
|
||||
if finfo then
|
||||
begin
|
||||
font := finfo;
|
||||
callMessgeFunction(onscrollfont,o,finfo);
|
||||
|
|
@ -1787,18 +1787,43 @@ type TEditer=class(TCustomcontrol) //
|
|||
ftoolbarb := new TToolBar(self); //¹¤¾ßÀ¸
|
||||
FStatus := new TStatusBar(self); //״̬À¸
|
||||
fcoolbar := new tcoolbar(self);
|
||||
ftoolbara.Align := alNone;
|
||||
ftoolbarb.Align := alNone;
|
||||
ftoolbara.Width := 430;
|
||||
ftoolbarb.Width := 250;
|
||||
fcoolbar.ParentFont := false;
|
||||
//ftoolbara.Align := alNone;
|
||||
//ftoolbarb.Align := alNone;
|
||||
//ftoolbara.Width := 430;
|
||||
//ftoolbarb.Width := 250;
|
||||
fcoolbar.autosize := true;
|
||||
FInfoShowWnd := new TEditerAuxiliary(self);
|
||||
FPageEditer := new TPageEditer(self);
|
||||
FPageEditer.onscrollfont := function(o,ft)begin
|
||||
fh := ft["height"];
|
||||
if fh>34 then return ;
|
||||
global g_editer_font_size := ft;
|
||||
self.Notification(self,array("font",ft));
|
||||
FinCodemap.FTree.font := ft;
|
||||
FinCodemap.FTree.ItemHeight := ft["height"]+6;
|
||||
|
||||
FinCodemap.FTree.ItemHeight := fh+6;
|
||||
if fh<20 then
|
||||
begin
|
||||
isz := array(24,24);
|
||||
end else
|
||||
if fh>=20 and fh<24 then
|
||||
begin
|
||||
isz := array(28,28);
|
||||
end else
|
||||
if fh>=24 and fh<28 then
|
||||
begin
|
||||
isz := array(32,32);
|
||||
end else
|
||||
if fh>=28 and fh<31 then
|
||||
begin
|
||||
isz := array(36,36);
|
||||
end else
|
||||
begin
|
||||
isz := array(40,40);
|
||||
end
|
||||
FImages.imgsize := isz;
|
||||
fcoolbar.font := ft;
|
||||
end
|
||||
//FPageEditer.CloseBtn := true;
|
||||
FPageEditer.Onbmpbclick := function(o,e)
|
||||
|
|
@ -1897,8 +1922,9 @@ type TEditer=class(TCustomcontrol) //
|
|||
////////////
|
||||
FPageEditer.PageItemOnRClick := thisfunction(PageItemOnRClick);
|
||||
FImages := new TControlImageList(self);
|
||||
FImages.Width := 24;
|
||||
FImages.Height := 24;
|
||||
//FImages.Width := 24;
|
||||
//FImages.Height := 24;
|
||||
FImages.imgsize := array(24,24);
|
||||
imgs := GetEditIcons();
|
||||
id := 0;
|
||||
FToolbtns := array();
|
||||
|
|
@ -1936,6 +1962,10 @@ type TEditer=class(TCustomcontrol) //
|
|||
Fdbgbtns := dbgbtns;
|
||||
FTslDebug.addbtns(dbgbtns);
|
||||
//FToolbar.ImageList := FImages;
|
||||
ftoolbara.autosize := true;
|
||||
ftoolbara.ParentFont := true;
|
||||
ftoolbarb.autosize := true;
|
||||
ftoolbarb.ParentFont := true;
|
||||
ftoolbara.ImageList := FImages;
|
||||
ftoolbarb.ImageList := FImages;
|
||||
ftoolbara.Parent := fcoolbar;
|
||||
|
|
@ -4244,6 +4274,7 @@ type TEditer=class(TCustomcontrol) //
|
|||
FFileopen;
|
||||
FFileSave;
|
||||
FPageMenu;
|
||||
FImages;
|
||||
//ͼ±ê
|
||||
FNeedSaveBmp;
|
||||
FNotNeedSaveBmp;
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -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
|
||||
{**
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
BIN
tsleditor.exe
BIN
tsleditor.exe
Binary file not shown.
BIN
tslvcltool.exe
BIN
tslvcltool.exe
Binary file not shown.
Loading…
Reference in New Issue