调整编辑器工具栏图标大小
This commit is contained in:
@@ -419,11 +419,11 @@ 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
|
||||
end
|
||||
if importfile(ftstream(),"",fdirspath,dirs)=1 then
|
||||
begin
|
||||
Fdirview.addrootdirs(dirs);
|
||||
|
||||
+41
-10
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user