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

Resize popup for consistent size on Windows and Mac OS #1242

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

Conversation

F-OBrien
Copy link
Contributor

Due to the differences in the way that Windows and Mac OS renders the window frames and borders it results in inconsistent popup sizes which obscures some information. e.g. the "Ask again later" option as shown below for Windows. This only happens when a popup is created and not when clicking on the extension icon. chrome.windows.create doesn't have a clean way to handle both OS's. This PR is a hacky way to try to handle both OS's.

Original chrome.windows.create outer dimensions = 560x621 (from POPUP_WINDOW_OPTS)
Resulting Windows popup inner dimension = 544x582
image

After resize to 560x600 inner dimension
image

@F-OBrien F-OBrien changed the title Resize for popup for consistent size on Windows and Mac OS Resize popup for consistent size on Windows and Mac OS Mar 29, 2023
@Tbaut
Copy link
Contributor

Tbaut commented Apr 3, 2023

I tested it on Firefox Linux and the hack doesn't seem to work. For instance, here's QR code request:
image

@jacogr
Copy link
Member

jacogr commented Apr 3, 2023

... These window sizes between browsers and platforms has been a huge PITA since the start...

@Tbaut
Copy link
Contributor

Tbaut commented Apr 3, 2023

Indeed, I've hit a wall many times trying to fix these. Even a somewhat hacky solution may be better than the current state. Thanks for looking into it @F-OBrien

@F-OBrien
Copy link
Contributor Author

F-OBrien commented Apr 3, 2023

That's disappointing. Well it seems to work with Chrome at least if you wanted to consider it as a slight improvement over the current implementation.

@jacogr
Copy link
Member

jacogr commented Apr 4, 2023

I'll defer to @Tbaut on this one since (like he mentioned above), he spent a lot of time on this in the past.

My general feeling is that - if it is better in some cases and no worse in others (e.g. FF), it is certainly worth a merge.

TL;DR As long as it doesn't make anything worse, I'm ok with it.

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.

3 participants