mirror of https://gitlab.com/basile.b/dexed.git
added zooming shortcuts Ctrl+<+> Ctrl+<-> Ctrl+<.> to TCESynMemo
This commit is contained in:
parent
0fb3a06a90
commit
cfc89ff0d4
|
@ -7,7 +7,7 @@ interface
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, SynEdit, SynMemo, ce_d2syn, SynEditHighlighter, controls,
|
Classes, SysUtils, SynEdit, SynMemo, ce_d2syn, SynEditHighlighter, controls,
|
||||||
lcltype, LazSynEditText, SynPluginSyncroEdit, SynEditKeyCmds, ce_project,
|
lcltype, LazSynEditText, SynPluginSyncroEdit, SynEditKeyCmds, ce_project,
|
||||||
SynHighlighterLFM, SynEditMouseCmds, ce_common, ce_observer;
|
SynHighlighterLFM, SynEditMouseCmds, ce_common, ce_observer, menus;
|
||||||
|
|
||||||
type
|
type
|
||||||
TCESynMemo = class(TSynMemo)
|
TCESynMemo = class(TSynMemo)
|
||||||
|
@ -21,6 +21,7 @@ type
|
||||||
fIdentifier: string;
|
fIdentifier: string;
|
||||||
fTempFileName: string;
|
fTempFileName: string;
|
||||||
fMultiDocSubject: TCECustomSubject;
|
fMultiDocSubject: TCECustomSubject;
|
||||||
|
fStoredFontSize: Integer;
|
||||||
procedure changeNotify(Sender: TObject);
|
procedure changeNotify(Sender: TObject);
|
||||||
procedure identifierToD2Syn;
|
procedure identifierToD2Syn;
|
||||||
protected
|
protected
|
||||||
|
@ -70,6 +71,7 @@ begin
|
||||||
eoTrimTrailingSpaces, eoDragDropEditing, eoShowCtrlMouseLinks,
|
eoTrimTrailingSpaces, eoDragDropEditing, eoShowCtrlMouseLinks,
|
||||||
eoEnhanceHomeKey, eoTabIndent];
|
eoEnhanceHomeKey, eoTabIndent];
|
||||||
Options2 := [eoEnhanceEndKey, eoFoldedCopyPaste, eoOverwriteBlock];
|
Options2 := [eoEnhanceEndKey, eoFoldedCopyPaste, eoOverwriteBlock];
|
||||||
|
fStoredFontSize := Font.Size;
|
||||||
|
|
||||||
MouseOptions := MouseOptions +
|
MouseOptions := MouseOptions +
|
||||||
[ emAltSetsColumnMode, emDragDropEditing, emCtrlWheelZoom];
|
[ emAltSetsColumnMode, emDragDropEditing, emCtrlWheelZoom];
|
||||||
|
@ -203,6 +205,12 @@ procedure TCESynMemo.KeyDown(var Key: Word; Shift: TShiftState);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
identifierToD2Syn;
|
identifierToD2Syn;
|
||||||
|
//
|
||||||
|
if (Shift = [ssCtrl]) then case Key of
|
||||||
|
VK_ADD: if Font.Size < 50 then Font.Size := Font.Size + 1;
|
||||||
|
VK_SUBTRACT: if Font.Size > 3 then Font.Size := Font.Size - 1;
|
||||||
|
VK_DECIMAL: Font.Size := fStoredFontSize;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCESynMemo.MouseMove(Shift: TShiftState; X, Y: Integer);
|
procedure TCESynMemo.MouseMove(Shift: TShiftState; X, Y: Integer);
|
||||||
|
|
Loading…
Reference in New Issue