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

Layout doesn't fit to HDPI displays #1356

Closed
ActiveChooN opened this issue Apr 3, 2020 · 15 comments
Closed

Layout doesn't fit to HDPI displays #1356

ActiveChooN opened this issue Apr 3, 2020 · 15 comments
Assignees
Labels
bug Something isn't working

Comments

@ActiveChooN
Copy link
Contributor

On small displays with high resolution (tested on 15'' FHD display, W10, Firefox 76 & Chrome 80) layout does not completely fit to the browser window (able to scroll page)

изображение

изображение

@ActiveChooN ActiveChooN added the bug Something isn't working label Apr 3, 2020
@bsekachev
Copy link
Member

bsekachev commented Apr 6, 2020

@ActiveChooN
@zhiltsov-max

A couple of comments about double scrolling. Probably there aren't problem in CVAT. Let me explain.

Minimum resolution supported by CVAT is 1280x768px.
In our case we have resolution 1920x1280 and system scale 1.25 (by default).

Artificially decrease resolution in (1 / 1.25) times and get 1440x864px. It is still more than minimum CVAT supported resolution. But a browser takes a part of resolution for its header. Actually available resolution can be got with window.innerHeight and I get this value equal to 754px.
For example if we open browser fullscreen, there aren't any header and window.innerHeight is 864px and we don't have an additional scroll.

But as far as I know a lot of people has exact resolution 1920x1080px and default scale in windows 10 is 1.25. So, I can suggest just to decrease a bit minimum supported resolution (for example set it to 750px). It doesn't resolve the issue (because it actually is not an issue), but it will probably make life easier for a lot of users.

@bsekachev
Copy link
Member

@ActiveChooN

About the first screenshot. I assumed it was resolved.
Can you reproduce it on develop now?

@bsekachev
Copy link
Member

@ActiveChooN
@zhiltsov-max

One more suggestion is to notify a user about his resolution if it is to small and offer to decrease scale if possible or open the tool fullscreen.

@ActiveChooN
Copy link
Contributor Author

@bsekachev

@ActiveChooN

About the first screenshot. I assumed it was resolved.
Can you reproduce it on develop now?

Yes, it was resolved, but there are two sliders instead. I can change screenshot to actual

@ActiveChooN
Copy link
Contributor Author

But as far as I know a lot of people has exact resolution 1920x1080px and default scale in windows 10 is 1.25. So, I can suggest just to decrease a bit minimum supported resolution (for example set it to 750px).

Ok, sounds good. But i don't clearly understand, will layout completely fit to the browser window in that case?

@bsekachev
Copy link
Member

But as far as I know a lot of people has exact resolution 1920x1080px and default scale in windows 10 is 1.25. So, I can suggest just to decrease a bit minimum supported resolution (for example set it to 750px).

Ok, sounds good. But i don't clearly understand, will layout completely fit to the browser window in that case?

It depends on user screen resolution and scale.
For 1920x1080 and 1.25 it will.

CVAT root div container has min-height: 768px, min-width: 1080px. It means that if outer body less than this size, we see scrolls.

@zhiltsov-max
Copy link
Contributor

zhiltsov-max commented Apr 6, 2020

@bsekachev,

I'm still questioned about what the situation you described has to do with all non-annotation pages. I mean, it is normal that some pages do not fit entirely into one screen, where it is not required, for instance - dashboard, task creation, etc, so we should not expect it and, probably, just use the standard html logic for this.

For the annotation page specifically the situation is different, I agree. Maybe we can automatically rescale the interface? Or require the browser to do this, if this is possible. Another idea is to take some space from image section, kind of reminds of good old table layouts.

@ActiveChooN
Copy link
Contributor Author

But as far as I know a lot of people has exact resolution 1920x1080px and default scale in windows 10 is 1.25. So, I can suggest just to decrease a bit minimum supported resolution (for example set it to 750px).

Ok, sounds good. But i don't clearly understand, will layout completely fit to the browser window in that case?

It depends on user screen resolution and scale.
For 1920x1080 and 1.25 it will.

CVAT root div container has min-height: 768px, min-width: 1080px. It means that if outer body less than this size, we see scrolls.

Ok. But i tested it with WIP cuboid PR and realized that now it is overflow with sidebar with icons(

изображение

@bsekachev
Copy link
Member

bsekachev commented Apr 6, 2020

@ActiveChooN

I am not sure what you mean.
Have you tried to setup min-height: 750px for #root in the browser?

@ActiveChooN
Copy link
Contributor Author

ActiveChooN commented Apr 6, 2020

@bsekachev

@ActiveChooN

I am not sure what you mean.
Have you tried to setup min-height: 750px for #root in the browser?

Yes, setup it to 750px but sidebar with icons can't completely fit to the screen unfortunately

@bsekachev
Copy link
Member

bsekachev commented Apr 6, 2020

@ActiveChooN
What is window.innerHeight for you?
Browser scale is 100%?

@ActiveChooN
Copy link
Contributor Author

@bsekachev
innerHeight is 754px
browser scale is 100%
windows scale is 125%

@bsekachev
Copy link
Member

@ActiveChooN

Oh, on your screenshot left panel looks to be more than 750px because you have added additional control
Need to think about it.

@bsekachev
Copy link
Member

@ActiveChooN

Let's try @zhiltsov-max advice.
We won't control min-height on all pages except of annotation page.

On annotation page we anyway still need 768px (in other case you don't have enough space to add cuboids control). So, scroll is okay here. Just resolution is too small and you can use fullscreen to avoid it.

@bsekachev bsekachev mentioned this issue Apr 6, 2020
6 tasks
@bsekachev
Copy link
Member

@ActiveChooN
Can we close the issue?

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

No branches or pull requests

3 participants