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

Enable YAFC window to shrink to half the monitor width, Windows #321

Open
CricketBr opened this issue Oct 20, 2024 · 4 comments
Open

Enable YAFC window to shrink to half the monitor width, Windows #321

CricketBr opened this issue Oct 20, 2024 · 4 comments

Comments

@CricketBr
Copy link

The large screen is great for playing with recipe chains, but it's so wide that there isn't much room for the game. I'm making do with a screenshot for now, but miss being able to move lines around as I finish them.

@veger
Copy link
Collaborator

veger commented Oct 21, 2024

Can you provide some more details about your setup, like OS, size of your screen(s), etc. so we can have a better idea what is going on and figure out what we can do about it?

@CricketBr
Copy link
Author

My main screen is 1920x1080.

When I use windows-arrow to make each screen half-width, I get thisL
image
YAFC cannot be made narrower.

Thank you so much for the quick update to 2.0! It's a big help when I wonder how much room to leave.

@veger
Copy link
Collaborator

veger commented Oct 22, 2024

There is (since ages) a minimum width for YAFC(-CE) defined.

// Min width/height define the minimum size of the main window when it gets resized.
// The minimal size prevents issues/unreachable spots within the UI (like dialogs that do not size with the window size).
int minWidth = MathUtils.Round(85f * pixelsPerUnit);
int minHeight = MathUtils.Round(60f * pixelsPerUnit);

We could consider whether we can narrow it down to ~960 (half of 1920) without raising issues with the GUI. As one can see from the code, the actual pixelsPerUnit depends of display settings, so adjusting this (properly) might not be very straightforward...?

@CricketBr
Copy link
Author

I hadn't thought about dialogs inside the window, if the window's too small.

Is the window measured by outer frame or by content? If by content, it needs to be a bit smaller than half, to avoid flickering when changing focus.

Turning into a setting, similar to dark mode might work. If a dialog window doesn't fit, the user would know why. Does esc work on all dialogs, in case the cancel button is hidden? That might be more work than it's worth.

I'll be happy to beta test whatever you do to solve the problem. In the meantime, I'll make do.

Thanks again! YAFC makes the factory much easier.

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

No branches or pull requests

2 participants