瀏覽代碼

ADD: apply gZoomWithCtrlWheel elsewhere

rich2014 1 月之前
父節點
當前提交
dbc4d890b7

+ 2 - 2
src/fFindDlg.pas

@@ -2659,7 +2659,7 @@ end;
 procedure TfrmFindDlg.lsFoundedFilesMouseWheelDown(Sender: TObject;
   Shift: TShiftState; MousePos: TPoint; var Handled: boolean);
 begin
-  if (Shift = [ssCtrl]) and (gFonts[dcfSearchResults].Size > gFonts[dcfSearchResults].MinValue) then
+  if gZoomWithCtrlWheel and (Shift = [ssCtrl]) and (gFonts[dcfSearchResults].Size > gFonts[dcfSearchResults].MinValue) then
   begin
     dec(gFonts[dcfSearchResults].Size);
     lsFoundedFiles.Font.Size := gFonts[dcfSearchResults].Size;
@@ -2671,7 +2671,7 @@ end;
 procedure TfrmFindDlg.lsFoundedFilesMouseWheelUp(Sender: TObject;
   Shift: TShiftState; MousePos: TPoint; var Handled: boolean);
 begin
-  if (Shift = [ssCtrl]) and (gFonts[dcfSearchResults].Size < gFonts[dcfSearchResults].MaxValue) then
+  if gZoomWithCtrlWheel and (Shift = [ssCtrl]) and (gFonts[dcfSearchResults].Size < gFonts[dcfSearchResults].MaxValue) then
   begin
     inc(gFonts[dcfSearchResults].Size);
     lsFoundedFiles.Font.Size := gFonts[dcfSearchResults].Size;

+ 2 - 2
src/fileviews/ufileviewheader.pas

@@ -136,7 +136,7 @@ end;
 procedure TFileViewHeader.PathLabelMouseWheelUp(Sender: TObject;
   Shift: TShiftState; MousePos: TPoint;var Handled:Boolean);
 begin
-  if (ssCtrl in Shift) and (gFonts[dcfPathEdit].Size < gFonts[dcfPathEdit].MaxValue) then
+  if gZoomWithCtrlWheel and (ssCtrl in Shift) and (gFonts[dcfPathEdit].Size < gFonts[dcfPathEdit].MaxValue) then
   begin
     gFonts[dcfPathEdit].Size:= gFonts[dcfPathEdit].Size + 1;
     frmMain.ForEachView(@EachViewUpdateHeader, nil);
@@ -146,7 +146,7 @@ end;
 procedure TFileViewHeader.PathLabelMouseWheelDown(Sender: TObject;
   Shift: TShiftState; MousePos: TPoint;var Handled:Boolean);
 begin
-  if (ssCtrl in Shift) and (gFonts[dcfPathEdit].Size > gFonts[dcfPathEdit].MinValue) then
+  if gZoomWithCtrlWheel and (ssCtrl in Shift) and (gFonts[dcfPathEdit].Size > gFonts[dcfPathEdit].MinValue) then
   begin
      gFonts[dcfPathEdit].Size:= gFonts[dcfPathEdit].Size - 1;
      frmMain.ForEachView(@EachViewUpdateHeader, nil);

+ 2 - 2
src/fmain.pas

@@ -1279,7 +1279,7 @@ end;
 procedure TfrmMain.btnF3MouseWheelDown(Sender: TObject; Shift: TShiftState;
   MousePos: TPoint; var Handled: Boolean);
 begin
-  if (ssCtrl in Shift) and (gFonts[dcfFunctionButtons].Size > gFonts[dcfFunctionButtons].MinValue) then
+  if gZoomWithCtrlWheel and (ssCtrl in Shift) and (gFonts[dcfFunctionButtons].Size > gFonts[dcfFunctionButtons].MinValue) then
   begin
     Dec(gFonts[dcfFunctionButtons].Size);
     UpdateGUIFunctionKeys;
@@ -1289,7 +1289,7 @@ end;
 procedure TfrmMain.btnF3MouseWheelUp(Sender: TObject; Shift: TShiftState;
   MousePos: TPoint; var Handled: Boolean);
 begin
-  if (ssCtrl in Shift) and (gFonts[dcfFunctionButtons].Size < gFonts[dcfFunctionButtons].MaxValue) then
+  if gZoomWithCtrlWheel and (ssCtrl in Shift) and (gFonts[dcfFunctionButtons].Size < gFonts[dcfFunctionButtons].MaxValue) then
   begin
     Inc(gFonts[dcfFunctionButtons].Size);
     UpdateGUIFunctionKeys;

+ 2 - 2
src/frames/foptionsfonts.pas

@@ -211,7 +211,7 @@ end;
 { TfrmOptionsFonts.edtMouseWheelDown }
 procedure TfrmOptionsFonts.edtMouseWheelDown(Sender: TObject; Shift: TShiftState; MousePos: TPoint; var Handled: boolean);
 begin
-  if (ssCtrl in Shift) and (LocalVisualFontElements[TEdit(Sender).Tag].FontSpindEdit.Value > gFonts[TDCFont(TEdit(Sender).Tag)].MinValue) then
+  if gZoomWithCtrlWheel and (ssCtrl in Shift) and (LocalVisualFontElements[TEdit(Sender).Tag].FontSpindEdit.Value > gFonts[TDCFont(TEdit(Sender).Tag)].MinValue) then
   begin
     TEdit(Sender).Font.Size := TEdit(Sender).Font.Size - 1;
     LocalVisualFontElements[TEdit(Sender).Tag].FontSpindEdit.Value := TEdit(Sender).Font.Size;
@@ -221,7 +221,7 @@ end;
 { TfrmOptionsFonts.edtMouseWheelUp }
 procedure TfrmOptionsFonts.edtMouseWheelUp(Sender: TObject; Shift: TShiftState; MousePos: TPoint; var Handled: boolean);
 begin
-  if (ssCtrl in Shift) and (LocalVisualFontElements[TEdit(Sender).Tag].FontSpindEdit.Value < gFonts[TDCFont(TEdit(Sender).Tag)].MaxValue) then
+  if gZoomWithCtrlWheel and (ssCtrl in Shift) and (LocalVisualFontElements[TEdit(Sender).Tag].FontSpindEdit.Value < gFonts[TDCFont(TEdit(Sender).Tag)].MaxValue) then
   begin
     TEdit(Sender).Font.Size := TEdit(Sender).Font.Size + 1;
     LocalVisualFontElements[TEdit(Sender).Tag].FontSpindEdit.Value := TEdit(Sender).Font.Size;

+ 2 - 3
src/frames/foptionstreeviewmenucolor.pas

@@ -301,19 +301,18 @@ end;
 { TfrmOptionsTreeViewMenuColor.TreeViewMenuSampleMouseWheelDown }
 procedure TfrmOptionsTreeViewMenuColor.TreeViewMenuSampleMouseWheelDown(Sender: TObject; Shift: TShiftState; MousePos: TPoint; var Handled: Boolean);
 begin
-  if (Shift = [ssCtrl]) and (TempoFont.Size > TempoFont.MinValue) then
+  if gZoomWithCtrlWheel and (Shift = [ssCtrl]) and (TempoFont.Size > TempoFont.MinValue) then
   begin
     dec(TempoFont.Size);
     ApplyTempoFontToVisual;
     Handled := True;
   end;
-
 end;
 
 { TfrmOptionsTreeViewMenuColor.TreeViewMenuSampleMouseWheelUp }
 procedure TfrmOptionsTreeViewMenuColor.TreeViewMenuSampleMouseWheelUp(Sender: TObject; Shift: TShiftState; MousePos: TPoint; var Handled: Boolean);
 begin
-  if (Shift = [ssCtrl]) and (TempoFont.Size < TempoFont.MaxValue) then
+  if gZoomWithCtrlWheel and (Shift = [ssCtrl]) and (TempoFont.Size < TempoFont.MaxValue) then
   begin
     inc(TempoFont.Size);
     ApplyTempoFontToVisual;

+ 2 - 2
src/ftreeviewmenu.pas

@@ -675,7 +675,7 @@ end;
 procedure TfrmTreeViewMenu.tvMainMenuMouseWheelDown(Sender: TObject;
   Shift: TShiftState; MousePos: TPoint; var Handled: Boolean);
 begin
-  if (Shift = [ssCtrl]) and (gFonts[dcfTreeViewMenu].Size > gFonts[dcfTreeViewMenu].MinValue) then
+  if gZoomWithCtrlWheel and (Shift = [ssCtrl]) and (gFonts[dcfTreeViewMenu].Size > gFonts[dcfTreeViewMenu].MinValue) then
   begin
     dec(gFonts[dcfTreeViewMenu].Size);
     tvMainMenu.Font.Size := gFonts[dcfTreeViewMenu].Size;
@@ -686,7 +686,7 @@ end;
 { TfrmTreeViewMenu.tvMainMenuMouseWheelUp }
 procedure TfrmTreeViewMenu.tvMainMenuMouseWheelUp(Sender: TObject; Shift: TShiftState; MousePos: TPoint; var Handled: Boolean);
 begin
-  if (Shift = [ssCtrl]) and (gFonts[dcfTreeViewMenu].Size < gFonts[dcfTreeViewMenu].MaxValue) then
+  if gZoomWithCtrlWheel and (Shift = [ssCtrl]) and (gFonts[dcfTreeViewMenu].Size < gFonts[dcfTreeViewMenu].MaxValue) then
   begin
     inc(gFonts[dcfTreeViewMenu].Size);
     tvMainMenu.Font.Size := gFonts[dcfTreeViewMenu].Size;