Improve window sizing for high-DPI and scaled displays (EIM-599)#555
Improve window sizing for high-DPI and scaled displays (EIM-599)#555kirltrz wants to merge 1 commit intoespressif:masterfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses critical UI/UX issues related to window sizing and element visibility, particularly on high-DPI and scaled displays. It ensures that the application's main window is appropriately sized, prevents it from becoming unusable when resized, and correctly positions it upon launch. Additionally, it refines the layout of the welcome card by reducing unnecessary padding, contributing to a more compact and accessible user interface. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request addresses UI scaling issues on high-DPI displays by adjusting the default window dimensions and reducing unnecessary padding. The changes in tauri.conf.json set a smaller default height and introduce minimum dimensions to improve usability, and the CSS change in Welcome.vue effectively reduces excessive whitespace. My main feedback is an opportunity to make the window sizing more robust. While the new hardcoded height works for the tested configurations, it may not be suitable for all screen resolutions. I've left a comment suggesting a dynamic approach to window sizing based on the user's monitor dimensions for a better user experience across more devices.
| "title": "ESP-IDF Installation Manager(EIM)", | ||
| "width": 1200, | ||
| "height": 1000 | ||
| "height": 875, |
There was a problem hiding this comment.
While reducing the height to 875px is a good step for high-DPI displays, this fixed value might still be too large for screens with lower vertical resolutions, like 1366x768. This could lead to a similar problem where UI elements are initially off-screen.
A more robust approach would be to determine the window size dynamically at startup. You could use Tauri's API to get the primary monitor's available size and set the window height to a percentage of that (e.g., 90%), with 875px as a maximum. This would provide a better out-of-the-box experience on a wider variety of screen sizes.
You could implement this in your Rust backend using app.handle().primary_monitor() during the setup phase.
|
hi @kirltrz, Thank you for the detailed PR and for taking the time to document the scaling issues on high-resolution displays. We appreciate the thorough testing on 1440p configurations. Regarding the window height adjustment: we actually previously had the default height set lower than 1000px, but we received significant feedback from users whose content felt too cramped, which led us to increase it to the current 1000px. Since display preferences vary so widely across different scaling settings, we’re hesitant to revert this globally as it may negatively impact those who requested the larger view. That said, your suggestions regarding the minimum constraints, centering, and the specific padding adjustments in Welcome.vue are very valid. Current Status: Thanks again for your contribution and for being part of the project! |
Problem




On monitors with certain resolutions or display scaling (e.g. 1440p @ 150%, which is very common on laptops), the default window height of 1000px causes the bottom UI elements (buttons and action cards) to be cut off or hidden behind the taskbar, making them inaccessible without manually resizing the window.
Additionally, the welcome card had excessive bottom padding (3rem) that created a large empty space below the "Learn more about usage tracking" link, pushing content layout further down unnecessarily.
Changes
tauri.conf.json
• Reduced default window height from 1000 to 875 to better fit common screen configurations with scaling enabled
• Added minWidth: 600 and minHeight: 175 to prevent the window from being resized to a state where UI becomes unusable
• Added center: true to ensure the window opens centered on screen, avoiding edge cases where it spawns partially off-screen
• Explicitly set resizable: true for clarity
Welcome.vue
• Reduced .welcome-card bottom padding from 3rem to 0.25rem to eliminate unnecessary blank space below the tracking documentation link
Tested on
• Windows 11, 2560x1440 @ 150% scaling, 2560x1600 @ 150% scaling
The bottom element is completely obscured:
The window size can be adjusted to 0x0 px:
Modified effect: