1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-05 20:54:12 +01:00

Zoom stuff.

This commit is contained in:
Kris Maglione
2011-10-09 20:49:34 -04:00
parent 40d9642cc3
commit d444435600
2 changed files with 6 additions and 3 deletions

View File

@@ -1229,7 +1229,7 @@ var Editor = Module("editor", XPCOM(Ci.nsIEditActionListener, ModuleBase), {
},
{ count: true });
mappings.add([modes.TEXT_EDIT, modes.VISUAL],
mappings.add([modes.COMMAND],
['"'], "Bind a register to the next command",
function ({ arg }) {
editor.currentRegister = arg;

View File

@@ -175,7 +175,10 @@ var Buffer = Module("Buffer", {
* @property {number} The current browser's zoom level, as a
* percentage with 100 as 'normal'.
*/
get zoomLevel() this.contentViewer[this.fullZoom ? "fullZoom" : "textZoom"] * 100,
get zoomLevel() {
let v = this.contentViewer;
return v[v.textZoom == 1 ? "fullZoom" : "textZoom"] * 100
},
set zoomLevel(value) { this.setZoom(value, this.fullZoom); },
/**
@@ -1162,7 +1165,7 @@ var Buffer = Module("Buffer", {
fullZoom = ZoomManager.useFullZoom;
let values = ZoomManager.zoomValues;
let cur = values.indexOf(ZoomManager.snap(this.zoom));
let cur = values.indexOf(ZoomManager.snap(this.zoomLevel / 100));
let i = Math.constrain(cur + steps, 0, values.length - 1);
util.assert(i != cur || fullZoom != ZoomManager.useFullZoom);