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

Conversation

bpedersen2
Copy link
Contributor

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 fix_badge_background branch 2 times, most recently from 1b2bb64 to a61ded6 Compare February 13, 2018 06:58
@bpedersen2
Copy link
Contributor Author

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@ThiefMaster
Copy link
Member

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 fix_badge_background branch 3 times, most recently from bb89424 to 9d77d42 Compare February 13, 2018 07:41
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 merged commit e6c3c56 into indico:master Feb 15, 2018
ThiefMaster pushed 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 fix_badge_background branch March 1, 2018 14:03
ThiefMaster pushed 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
Development

Successfully merging this pull request may close these issues.

None yet

2 participants