Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set Max Size of Window Based on Display Size #2412 #4466

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

derwin12
Copy link
Collaborator

@derwin12 derwin12 commented Apr 7, 2024

Remove the arbitrary hard coded largest window size configs with actual values for the hardware. This impacts the Display Elements, House Preview and Model Preview windows. #2412

@@ -89,15 +90,21 @@ void xLightsFrame::CreateSequencer()
logger_base.debug(" Set dock size constraints.");
m_mgr->SetDockSizeConstraint(0.25, 0.15);

const auto maxHeight = std::max(1, wxDisplay().GetGeometry().GetHeight() - 100);
const auto maxWidth = std::max(1, wxDisplay().GetGeometry().GetWidth());
Copy link
Member

Choose a reason for hiding this comment

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

How would this work for those of us that are using multiple displays, possibly/likely at different resolutions? I'd honestly prefer NOT setting any sort of MaxHeight on anything so that the windows can easily be moved to different displays and still be maximized.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If it goes off the screen you cant get to the bottom. The double click still maximizes it. The original code was setting the max off your screen. GetHeight should return the largest your monitor can handle. Not sure how it handles resolutions and such though. This code is similar to code used in Audacity.

Copy link
Member

Choose a reason for hiding this comment

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

But that's part of the problem.... My "main" monitor has a height of 1620 (logical size), but if the window appears on notebook screen, it has a max of 1329 and it gets cut off.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The current code is hard coded to 1050. This is better than hard coded arbitrary value. Is there an even better way? If you dont have it set, you end up having to resize the box every time.

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.

None yet

2 participants