feat(desktop): add auto-zoom scaling for high-DPI displays #406
ClosedSuperComboGamer(GitHub profile, opens in a new tab)wants to merge 15 commits into
main fromrefs/pull/406/headopened View on GitHub- apps/desktop/src/main.ts lines 1138 to 1143OutdatedResolvedby SuperComboGamer(GitHub profile, opens in a new tab)@@ -1089,3 +1131,13 @@10891131 return iconPath ? { icon: iconPath } : {};10901132 }109111331134+function getFocusedBrowserWindow(): BrowserWindow | null {1135+ return BrowserWindow.getFocusedWindow() ?? mainWindow ?? BrowserWindow.getAllWindows()[0] ?? null;1136+}1137+1138+function adjustZoom(delta: number): void {1139+ const win = getFocusedBrowserWindow();1140+ if (!win) return;1141+ const current = win.webContents.getZoomFactor();1142+ win.webContents.setZoomFactor(Math.min(Math.max(current + delta, MIN_ZOOM_FACTOR), MAX_ZOOM_FACTOR));1143+}
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
juliusmarminge closed this
Sign in to join this conversation.
Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID:
3f222629-7b30-4cb2-a280-b77dd0570619You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Tip
CodeRabbit can suggest fixes for GitHub Check annotations.
Configure the
reviews.tools.github-checkssetting to adjust the time to wait for GitHub Checks to complete.