From ba0a0117d44a997822914c937541d67b96b4c151 Mon Sep 17 00:00:00 2001 From: abose Date: Mon, 2 Mar 2026 22:33:00 +0530 Subject: [PATCH 1/3] fix: visually centralize the user profile button --- src/styles/brackets_patterns_override.less | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/styles/brackets_patterns_override.less b/src/styles/brackets_patterns_override.less index 7a5bc286c7..61700cdb50 100644 --- a/src/styles/brackets_patterns_override.less +++ b/src/styles/brackets_patterns_override.less @@ -300,6 +300,10 @@ a:focus { position: absolute; bottom: 5px; } + + #user-profile-button { + margin-left: 0.24em; + } } /* Toolbar appearance - shared by all toolbars, independent of layout */ From b8a066e98cd23e8ce4f4a32e831648c010f10bd2 Mon Sep 17 00:00:00 2001 From: abose Date: Wed, 4 Mar 2026 15:15:28 +0530 Subject: [PATCH 2/3] fix: use Tauri outerSize API for correct new window dimensions innerWidth/innerHeight in Tauri don't account for title bar height and are affected by webview zoom. Add brackets.app.getWindowSize() that uses Tauri's outerSize()/scaleFactor() to get the true logical window size, and brackets.app.getZoomFactor() using PhStore. --- src/document/DocumentCommandHandlers.js | 9 +++----- src/phoenix/shell.js | 28 +++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/src/document/DocumentCommandHandlers.js b/src/document/DocumentCommandHandlers.js index ce325dd041..2c35042527 100644 --- a/src/document/DocumentCommandHandlers.js +++ b/src/document/DocumentCommandHandlers.js @@ -1756,11 +1756,8 @@ define(function (require, exports, module) { ); } - function newPhoenixWindow(cliArgsArray = null, cwd=null) { - // Both Electron and Tauri need outerWidth/outerHeight (includes window chrome) - // so the new window matches the current window's total size. - let width = (window.__ELECTRON__ || window.__TAURI__) ? window.outerWidth : window.innerWidth; - let height = (window.__ELECTRON__ || window.__TAURI__) ? window.outerHeight : window.innerHeight; + async function newPhoenixWindow(cliArgsArray = null, cwd=null) { + const {width, height} = await brackets.app.getWindowSize(); Phoenix.app.openNewPhoenixEditorWindow(width, height, cliArgsArray, cwd); } @@ -1864,7 +1861,7 @@ define(function (require, exports, module) { return; } } - newPhoenixWindow(args, cwd); + await newPhoenixWindow(args, cwd); } function handleFileNewWindow() { diff --git a/src/phoenix/shell.js b/src/phoenix/shell.js index 7efcfc7265..edebfe0587 100644 --- a/src/phoenix/shell.js +++ b/src/phoenix/shell.js @@ -881,6 +881,34 @@ Phoenix.app = { return window.electronAPI.zoomWindow(scaleFactor); } }, + getZoomFactor: function () { + return (window.PhStore && window.PhStore.getItem("desktopZoomScale")) || 1; + }, + /** + * Returns the logical outer size of the current window (includes title bar and window chrome). + * @return {Promise<{width: number, height: number}>} + */ + getWindowSize: async function () { + if(window.__TAURI__) { + const currentWindow = window.__TAURI__.window.getCurrent(); + const outerSize = await currentWindow.outerSize(); + const scaleFactor = await currentWindow.scaleFactor(); + return { + width: Math.round(outerSize.width / scaleFactor), + height: Math.round(outerSize.height / scaleFactor) + }; + } + if(window.__ELECTRON__) { + return { + width: window.outerWidth, + height: window.outerHeight + }; + } + return { + width: window.innerWidth, + height: window.innerHeight + }; + }, _openUrlInBrowserWin: function (url, browser) { // private API for internal use only. May be removed at any time. // Please use NodeUtils.openUrlInBrowser for a platform independent equivalent of this. From 56779d926a16b970d1a9584d566fb441130793d3 Mon Sep 17 00:00:00 2001 From: abose Date: Wed, 4 Mar 2026 15:26:18 +0530 Subject: [PATCH 3/3] fix: windows os > file>new window size jumps --- src/phoenix/shell.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/phoenix/shell.js b/src/phoenix/shell.js index edebfe0587..6b58ca9c14 100644 --- a/src/phoenix/shell.js +++ b/src/phoenix/shell.js @@ -892,10 +892,15 @@ Phoenix.app = { if(window.__TAURI__) { const currentWindow = window.__TAURI__.window.getCurrent(); const outerSize = await currentWindow.outerSize(); + const innerSize = await currentWindow.innerSize(); + let size = outerSize; + if(Phoenix.platform !== 'mac'){ + size = innerSize; + } const scaleFactor = await currentWindow.scaleFactor(); return { - width: Math.round(outerSize.width / scaleFactor), - height: Math.round(outerSize.height / scaleFactor) + width: Math.round(size.width / scaleFactor), + height: Math.round(size.height / scaleFactor) }; } if(window.__ELECTRON__) {