This commit is contained in:
liujianjun 2024-10-11 17:53:41 +08:00
parent 6d2f348019
commit 4a548c4861
6 changed files with 35 additions and 10 deletions

View File

@ -1681,17 +1681,28 @@ type TPageEditer=class(TPage) //
IF ssCtrl in e.shiftstate then IF ssCtrl in e.shiftstate then
begin begin
fw := font.Width; fw := font.Width;
hw := font.height;
if e.delta<0 then if e.delta<0 then
begin begin
if fw>6 then if fw>6 then
begin begin
finfo := array("width":fw-1,"height":font.height-2); if fw=18 then
begin
fw :=17;
hw :=34;
end
finfo := array("width":fw-1,"height":hw-2);
end end
end else end else
begin begin
if fw<24 then if fw<24 then
begin begin
finfo := array("width":fw+1,"height":font.height+2); if fw=16 then
begin
fw := 17;
hw := 34;
end
finfo := array("width":fw+1,"height":hw+2);
end end
end end
if finfo then if finfo then

Binary file not shown.

View File

@ -3956,7 +3956,6 @@ type TSynCustomMemo = class(TCustomMemo)
bfc := cvs.Font.color; bfc := cvs.Font.color;
Highlighter.InsureTokenParserd(LastLine); Highlighter.InsureTokenParserd(LastLine);
cw := GetXScrollDelta(); cw := GetXScrollDelta();
//********************´¦Àí**************************************8 //********************´¦Àí**************************************8
bb := BlockBegin; bb := BlockBegin;
ee := BlockEnd; ee := BlockEnd;
@ -4307,21 +4306,32 @@ type TSynMemoNorm = class(TsynCustomMemo) //
IF ssCtrl in e.shiftstate then IF ssCtrl in e.shiftstate then
begin begin
fw := font.Width; fw := font.Width;
hw := font.height;
flg := false; flg := false;
//echo "\r\n:",fw,"--",font.Height; //echo "\r\n:",fw,"--",font.Height;
if e.delta<0 then if e.delta<0 then
begin begin
if fw>6 then if fw>7 then
begin begin
if fw=18 then
begin
fw := 17;
hw := 34;
end
flg := true; flg := true;
font := array("width":fw-1,"height":font.height-2); font := array("width":fw-1,"height":hw-2);
end end
end else end else
begin begin
if fw<18 then if fw<18 then
begin begin
if fw=16 then
begin
fw := 17;
hw := 34;
end
flg := true; flg := true;
font := array("width":fw+1,"height":font.height+2); font := array("width":fw+1,"height":hw+2);
end end
end end
e.skip := true; e.skip := true;

View File

@ -172,7 +172,7 @@ type Tcustomfont = class(tgdi)
end end
function Setheight(v) function Setheight(v)
begin begin
if ifnumber(v)and v <> Fheight then if ifnumber(v)and v <> Fheight and v<>34 then
begin begin
Fheight := v; Fheight := v;
onchange(); onchange();
@ -180,8 +180,9 @@ type Tcustomfont = class(tgdi)
end end
function Setwidth(v) function Setwidth(v)
begin begin
if ifnumber(v)and v <> Fwidth then if ifnumber(v)and v <> Fwidth and v<>17 then
begin begin
echo "\r\nset:",v;
Fwidth := v; Fwidth := v;
onchange(); onchange();
end end
@ -422,7 +423,10 @@ type Tcustomfont = class(tgdi)
if not ifnil(vsv)then if not ifnil(vsv)then
begin begin
ovi := invoke(self,"f"+v0); ovi := invoke(self,"f"+v0);
if ovi <> vsv then {$ifdef linux}{$else}
if (vsv=17 and v0="width") or (vsv=34 and v0="height") then continue;
{$endif}
if (ovi <> vsv) then
begin begin
invoke(self,"f"+v0,1,vsv); invoke(self,"f"+v0,1,vsv);
cg := true; cg := true;

Binary file not shown.

Binary file not shown.