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

Fix badge background handling #3238

Merged
merged 3 commits into from Feb 15, 2018
Merged

Conversation

@bpedersen2
Copy link
Contributor

@bpedersen2 bpedersen2 commented Feb 13, 2018

The background position setting in a template was never honored in pdf-generation.
Additionally the calculation did the wrong scaling

@bpedersen2 bpedersen2 force-pushed the bpedersen2:fix_badge_background branch 2 times, most recently from 1b2bb64 to a61ded6 Feb 13, 2018
@bpedersen2
Copy link
Contributor Author

@bpedersen2 bpedersen2 commented Feb 13, 2018

Note: This may alter existing ticket, if the background position has already been set to centered in the designer, as they were rendered as if stretched was set up to now. Do we need a migration to set all templates to stretched, or is it better to just have templates that now print much more like their preview in th designer?

CHANGES.rst Outdated
@@ -53,6 +53,8 @@ Improvements
(:issue:`3181`, thanks :user:`bpedersen2`)
- Improve flower redirect URI generation (:issue:`3187`, thanks
:user:`bpedersen2`)
- Fix and honor badge/ticket background position setting (thanks

This comment has been minimized.

@ThiefMaster

ThiefMaster Feb 13, 2018
Member

should be in a "Bugfixes" section like the one we have for 2.0.1 and now that you know the ID of the PR you can reference it as well (just like in the other entries)

This comment has been minimized.

@bpedersen2

bpedersen2 Feb 13, 2018
Author Contributor

Done

@ThiefMaster
Copy link
Member

@ThiefMaster ThiefMaster commented Feb 13, 2018

Do we need a migration to set all templates to stretched

I don't think that's necessary - I guess people didn't really notice it so far since they usually uploaded images of the right size anyway. But I'll have a look at a few existing events in our DB that have with custom badges just in case.

@bpedersen2 bpedersen2 force-pushed the bpedersen2:fix_badge_background branch 3 times, most recently from bb89424 to 9d77d42 Feb 13, 2018
bpedersen2 added 2 commits Feb 13, 2018
The 'streched' parameter is never set by callers and
the setting actually available in 'tpl_data.background_position'.
The input data is already pixel-scaled, and use correct items
to calculate scaling factors.
@ThiefMaster ThiefMaster force-pushed the bpedersen2:fix_badge_background branch from 9d77d42 to 170801d Feb 15, 2018
@ThiefMaster ThiefMaster force-pushed the bpedersen2:fix_badge_background branch from 170801d to 3716ebe Feb 15, 2018
@ThiefMaster ThiefMaster merged commit e6c3c56 into indico:master Feb 15, 2018
1 check was pending
1 check was pending
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
ThiefMaster added a commit that referenced this pull request Feb 15, 2018
* Fix badge/ticket Background position

The 'streched' parameter is never set by callers and
the setting is actually available in 'tpl_data.background_position'.

* Badge/Ticket: Fix 'centered' calculation

The input data is already pixel-scaled, and use correct items
to calculate scaling factors.

* Add changelog entry
@bpedersen2 bpedersen2 deleted the bpedersen2:fix_badge_background branch Mar 1, 2018
ThiefMaster added a commit that referenced this pull request Mar 7, 2018
* Fix badge/ticket Background position

The 'streched' parameter is never set by callers and
the setting is actually available in 'tpl_data.background_position'.

* Badge/Ticket: Fix 'centered' calculation

The input data is already pixel-scaled, and use correct items
to calculate scaling factors.

* Add changelog entry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants