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:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user