提交 c66373be 编写于 作者: B Benjamin Pasero

"Zoom Out" does not work as expected if window.zoomLevel > 0 (fixes #1243)

上级 b1998cf4
......@@ -198,8 +198,8 @@ export class ZoomOutAction extends BaseZoomAction {
public run(): Promise {
return this.loadConfiguredZoomLevel().then(level => {
let newZoomLevelCandiate = webFrame.getZoomLevel() - 1;
if (newZoomLevelCandiate < level) {
newZoomLevelCandiate = level; // do not allow to zoom below the configured level
if (newZoomLevelCandiate < 0 && newZoomLevelCandiate < level) {
newZoomLevelCandiate = Math.min(level, 0); // do not zoom below configured level or below 0
}
webFrame.setZoomLevel(newZoomLevelCandiate);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册