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

BrewRenderer toolbar zoom level affects Print sizing #3744

Open
G-Ambatte opened this issue Sep 26, 2024 — with element.io GitHub Integration · 3 comments · May be fixed by #3767
Open

BrewRenderer toolbar zoom level affects Print sizing #3744

G-Ambatte opened this issue Sep 26, 2024 — with element.io GitHub Integration · 3 comments · May be fixed by #3767
Labels
bug We say this works but it doesn't solution found A solution exists; just needs to be applied tweak Small, non-breaking change

Comments

Copy link
Collaborator

When using the zoom function of the new BrewRenderer toolbar, attempting to print the brew results in pages at the zoomed size, not the intended print size. Possibly could be fixed by adding an @media print rule of zoom: 100% to override the toolbar's zoom setting (or whatever property it been uses to achieve this effect).

@G-Ambatte
Copy link
Collaborator Author

Investigation shows that the zoom property is set as an inline style on the .brewRenderer .pages element. However, experimentally, it appears that we can overwrite this by changing the print styling to the following:

@media print {
    .brewRenderer .pages {
        margin: 0px;
        zoom: 100% !important;
    }
}

@Gazook89
Copy link
Collaborator

Gazook89 commented Sep 26, 2024

I thought for sure we already had this done in brewRenderer.less, but maybe it got lost in some merges or maybe it just didn't make it in:

https://github.com/naturalcrit/homebrewery/blob/cd0bf9c947b6537763535358fcd2fe8558651e8d/client/homebrew/brewRenderer/brewRenderer.less#L34C1-L45C2

Edit: at least it was discussed: #3499 (comment)

@G-Ambatte
Copy link
Collaborator Author

I noticed some weird margins the other day, and didn't think anything further of it at the time. It came back up today because I was working on a A3 battle map that I had printed before, which of course zoomed out to fit in the Brew Renderer, and despite multiple attempts to print, I could not get it to fill the entire printed page today.
It was only after I went back to the brew and thought about what was different today that I realized that it was the zoom level. Returning to 100% zoom, it immediately printed correctly.

At the very least, it's a one line fix.

@5e-Cleric 5e-Cleric added bug We say this works but it doesn't solution found A solution exists; just needs to be applied tweak Small, non-breaking change labels Sep 26, 2024
@G-Ambatte G-Ambatte linked a pull request Sep 27, 2024 that will close this issue
G-Ambatte added a commit to G-Ambatte/homebrewery that referenced this issue Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug We say this works but it doesn't solution found A solution exists; just needs to be applied tweak Small, non-breaking change
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants