Skip to content

宽屏 3440x1440 用户 UI 放大过大 ,影响使用 #32

Description

@jackpasser

main.js 中

function updateZoomFactor(targetView) { if (!targetView || !targetView.webContents || targetView.webContents.isDestroyed()) { return; } const viewBounds = targetView.getBounds(); const viewWidth = viewBounds.width; if (viewWidth > 0) { const idealWidth = 1400; // Assumed ideal width for video websites const zoomFactor = viewWidth / idealWidth; targetView.webContents.setZoomFactor(zoomFactor); console.log([Zoom] View width is ${viewWidth}, setting zoom to ${zoomFactor.toFixed(2)}); } }

如果分辨率是3440 的宽屏显示器 会得到3440/1400 =2.45 的放大率 , 这样会使3440x1440 用户 UI 横向过大 竖向内容不够 ,影响使用 ,建议限制大小

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions