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

Menu is not in visible window if window is not maximized #242

Closed
ghost opened this issue Apr 3, 2024 · 7 comments
Closed

Menu is not in visible window if window is not maximized #242

ghost opened this issue Apr 3, 2024 · 7 comments
Assignees
Labels
bug Something isn't working ready for release

Comments

@ghost
Copy link

ghost commented Apr 3, 2024

If you open ecode with a clean user profile (it's the first time you open it, or you deleted the config directory), it will open a fixed-size window that doesn't fill up the whole screen. If you click on the menu icon, the menu is not displayed in the visible window (part of it is outside of the visible window). You have to maximize the window to see the menu. Note: If you close ecode and open it again, it will remember the previous window size, so if you have maximized the window then you can't observe this.

@SpartanJ SpartanJ self-assigned this Apr 3, 2024
@SpartanJ SpartanJ added the bug Something isn't working label Apr 3, 2024
@SpartanJ
Copy link
Owner

SpartanJ commented Apr 3, 2024

What's your screen resolution? Also can you share a screenshot?
ecode does some logic to get the initial resolution on its first boot, but it's not that crazy:

	const Sizei desiredRes( 1280, 720 );
	Sizei defWinSize( desiredRes.getWidth(), desiredRes.getHeight() );
	if ( displaySize.getWidth() > desiredRes.getWidth() &&
		 displaySize.getWidth() - desiredRes.getWidth() > 60 ) {
		defWinSize.setWidth( desiredRes.getWidth() );
	} else {
		defWinSize.setWidth( displaySize.getWidth() - 60 );
	}
	if ( displaySize.getHeight() > desiredRes.getHeight() &&
		 displaySize.getHeight() - desiredRes.getHeight() > 60 ) {
		defWinSize.setHeight( desiredRes.getHeight() );
	} else {
		defWinSize.setHeight( displaySize.getHeight() - 60 );
	}
	windowState.size.setWidth( iniState.getValueI( "window", "width", defWinSize.getWidth() ) );
	windowState.size.setHeight( iniState.getValueI( "window", "height", defWinSize.getHeight() ) );

@ghost
Copy link
Author

ghost commented Apr 3, 2024

What's your screen resolution? Also can you share a screenshot? ecode does some logic to get the initial resolution on its first boot, but it's not that crazy:

	const Sizei desiredRes( 1280, 720 );
	Sizei defWinSize( desiredRes.getWidth(), desiredRes.getHeight() );
	if ( displaySize.getWidth() > desiredRes.getWidth() &&
		 displaySize.getWidth() - desiredRes.getWidth() > 60 ) {
		defWinSize.setWidth( desiredRes.getWidth() );
	} else {
		defWinSize.setWidth( displaySize.getWidth() - 60 );
	}
	if ( displaySize.getHeight() > desiredRes.getHeight() &&
		 displaySize.getHeight() - desiredRes.getHeight() > 60 ) {
		defWinSize.setHeight( desiredRes.getHeight() );
	} else {
		defWinSize.setHeight( displaySize.getHeight() - 60 );
	}
	windowState.size.setWidth( iniState.getValueI( "window", "width", defWinSize.getWidth() ) );
	windowState.size.setHeight( iniState.getValueI( "window", "height", defWinSize.getHeight() ) );

It seems you assumed 16:9. My screen is 16:10.

@SpartanJ
Copy link
Owner

SpartanJ commented Apr 4, 2024

It seems you assumed 16:9. My screen is 16:10.

That shouldn't matter, if the base desired size doesn't fit the coordinate it will take the display size width or height and subtract 60 pixels. I'm trying to think how this can fail and I don't see it.

Please can you answer the previous questions? That will help. Thanks

What's your screen resolution? Also can you share a screenshot?

@ghost
Copy link
Author

ghost commented Apr 4, 2024

What's your screen resolution?

1680x1050

@ghost
Copy link
Author

ghost commented Apr 4, 2024

Also can you share a screenshot?

Here you are:

Capture

Capture2

After reboot:

Capture3

@SpartanJ
Copy link
Owner

SpartanJ commented Apr 4, 2024

Oh, I didn't get what you were saying. Menu doesn't fit a small screen resolution. As a first step I'll fix the incorrect positioning of the menu, it should be completely visible. Thanks

SpartanJ added a commit to SpartanJ/eepp that referenced this issue Apr 5, 2024
…reduce main menu size. I'll continue redesigning menus later.

Tentative fix for SpartanJ/ecode#219.
@SpartanJ
Copy link
Owner

SpartanJ commented Apr 5, 2024

Latests changes should give you a menu that fits on the screen. "Window" submenu won't fix though, I'll clean up that later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ready for release
Projects
None yet
Development

No branches or pull requests

1 participant