瀏覽代碼

UPD: remove duplicate code related to cmMainFontZoomIn / MainFontZoomOut

rich2014 2 月之前
父節點
當前提交
0a277a0ec3
共有 1 個文件被更改,包括 2 次插入8 次删除
  1. 2 8
      src/fileviews/ucolumnsfileview.pas

+ 2 - 8
src/fileviews/ucolumnsfileview.pas

@@ -383,11 +383,8 @@ begin
   if not IsLoadingFileList then
   if not IsLoadingFileList then
   begin
   begin
 
 
-    if (Shift=[ssCtrl])and(gFonts[dcfMain].Size < gFonts[dcfMain].MaxValue) then
+    if (Shift=[ssCtrl])and(frmMain.Commands.MainFontZoomIn()) then
     begin
     begin
-      gFonts[dcfMain].Size:=gFonts[dcfMain].Size+1;
-      frmMain.FrameLeft.UpdateView;
-      frmMain.FrameRight.UpdateView;
       Handled:=True;
       Handled:=True;
       Exit;
       Exit;
     end;
     end;
@@ -414,11 +411,8 @@ begin
   if not IsLoadingFileList then
   if not IsLoadingFileList then
   begin
   begin
 
 
-    if (Shift=[ssCtrl])and(gFonts[dcfMain].Size > gFonts[dcfMain].MinValue) then
+    if (Shift=[ssCtrl])and(frmMain.Commands.MainFontZoomOut()) then
     begin
     begin
-      gFonts[dcfMain].Size:=gFonts[dcfMain].Size-1;
-      frmMain.FrameLeft.UpdateView;
-      frmMain.FrameRight.UpdateView;
       Handled:=True;
       Handled:=True;
       Exit;
       Exit;
     end;
     end;