Skip to content

fix: dynamically resize window height based on selected monitor aspect ratio - #93

Merged
SamsidParty merged 1 commit into
SamsidParty:mainfrom
richardadonnell:main
Dec 5, 2025
Merged

fix: dynamically resize window height based on selected monitor aspect ratio#93
SamsidParty merged 1 commit into
SamsidParty:mainfrom
richardadonnell:main

Conversation

@richardadonnell

Copy link
Copy Markdown
Contributor

When a portrait-oriented monitor is selected, the preview area consumes
most of the fixed 650px window height, pushing controls out of view.

This fix calculates the window height dynamically based on the selected
monitor's aspect ratio:

  • Window height = (352 × aspect ratio) + 420px padding
  • The 352px matches the preview width used in Preview.jsx
  • The 420px accounts for header, dropdown, controls, and buttons

The window now resizes automatically when switching between landscape
and portrait monitors in the dropdown.

Fixes #91

@richardadonnell
richardadonnell marked this pull request as ready for review December 5, 2025 22:07
Copilot AI review requested due to automatic review settings December 5, 2025 22:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a UI issue where portrait-oriented monitors caused the preview area to consume most of the fixed 650px window height, pushing controls out of view. The fix dynamically calculates and resizes the window height based on the selected monitor's aspect ratio.

Key Changes:

  • Added dynamic window height calculation in RequestConfig method based on monitor aspect ratio
  • Removed trailing whitespace from two lines for code cleanliness

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@SamsidParty

Copy link
Copy Markdown
Owner

Thank you so much for fixing this issue, I haven't had much time to work on TopNotify recently. I'll see when I can publish this fix to the store.

@SamsidParty
SamsidParty merged commit 40770f3 into SamsidParty:main Dec 5, 2025
6 checks passed
@richardadonnell

Copy link
Copy Markdown
Contributor Author

Hi @SamsidParty

Thank you for building TopNotify in the first place — it’s a fantastic tool and I really appreciate all the work you’ve put into it. I’m happy I could contribute in this small way!

@richardadonnell

Copy link
Copy Markdown
Contributor Author

Hi @SamsidParty

Just another quick heads up - I noticed another issue mentioning this same issue, here: #77

Just wanted to let you know, to help clean up the list of open issues 😉

Thanks again for your efforts!!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to resize window

3 participants