Преглед на файлове

Disable zoom on UI (darwin).

Daniel Scalzi преди 7 години
родител
ревизия
f257208e2f
променени са 1 файла, в които са добавени 5 реда и са изтрити 1 реда
  1. 5 1
      app/assets/js/uicore.js

+ 5 - 1
app/assets/js/uicore.js

@@ -5,7 +5,11 @@
  * modules, excluding dependencies.
  */
 const $ = require('jquery');
-const {remote, shell} = require('electron')
+const {remote, shell, webFrame} = require('electron')
+
+// Disable zoom, needed for darwin.
+webFrame.setVisualZoomLevelLimits(1, 1)
+webFrame.setLayoutZoomLevelLimits(0, 0)
 
 /* jQuery Example
 $(function(){