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

[FW][FIX] web_editor: export icon to png correctly #165273

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented May 13, 2024

Commit that introduced the issue:
e806328

Issue:

when an icon is converted to png it's cropped.

Steps to reproduce the issue:

  • Go to this url: {host}/web_editor/font_to_img/61802/rgb(0,143,140)/rgb(255,255,255)/190x200
  • The icon is cropped.

Origin of the issue:

In this case we are using top and left as they are the top left corner of the icon inside the image , but in reality the returned value is 0 , and the top left corner is represented by box[0] and box[1].

Solution:

Use of box values instead of top and left

Before:

before_icon

After:

after_icon

opw-3865845

Forward-Port-Of: #163006

@robodoo
Copy link
Contributor

robodoo commented May 13, 2024

@fw-bot
Copy link
Contributor Author

fw-bot commented May 13, 2024

This PR targets saas-17.2 and is part of the forward-port chain. Further PRs will be created up to master.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@robodoo robodoo added the forwardport This PR was created by @fw-bot label May 13, 2024
@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label May 13, 2024
@fw-bot
Copy link
Contributor Author

fw-bot commented May 13, 2024

@Mtaylorr @dmo-odoo ci/runbot failed on this forward-port PR

@Mtaylorr Mtaylorr force-pushed the saas-17.2-15.0-opw-3865845-macr-gL-Z-fw branch from 2d81b38 to 04480e9 Compare May 14, 2024 06:54
@fw-bot
Copy link
Contributor Author

fw-bot commented May 14, 2024

@Mtaylorr @dmo-odoo this PR was modified / updated and has become a normal PR. It should be merged the normal way (via @robodoo)

@C3POdoo C3POdoo requested a review from a team May 14, 2024 06:57
@Mtaylorr Mtaylorr force-pushed the saas-17.2-15.0-opw-3865845-macr-gL-Z-fw branch from 04480e9 to 122fc0c Compare May 14, 2024 08:41
Commit that introduced the issue:
=================================
odoo@e806328

Issue:
=====
when an icon is converted to png it's cropped.

Steps to reproduce the issue:
=============================
- Go to this url: {host}/web_editor/font_to_img/61802/rgb(0,143,140)/rgb(255,255,255)/190x200
- The icon is cropped.

Origin of the issue:
=====================
In this case we are using `top` and `left` as they are the top left
corner of the icon inside the image , but in reality the returned value
is 0 , and the top left corner is represented by `box[0]` and `box[1]`.

Solution:
=========
Use of `box` values instead of `top` and `left`

opw-3865845

X-original-commit: 07de2db
@Mtaylorr
Copy link
Contributor

@robodoo r+

robodoo pushed a commit that referenced this pull request May 15, 2024
Commit that introduced the issue:
=================================
e806328

Issue:
=====
when an icon is converted to png it's cropped.

Steps to reproduce the issue:
=============================
- Go to this url: {host}/web_editor/font_to_img/61802/rgb(0,143,140)/rgb(255,255,255)/190x200
- The icon is cropped.

Origin of the issue:
=====================
In this case we are using `top` and `left` as they are the top left
corner of the icon inside the image , but in reality the returned value
is 0 , and the top left corner is represented by `box[0]` and `box[1]`.

Solution:
=========
Use of `box` values instead of `top` and `left`

opw-3865845

closes #165273

X-original-commit: 07de2db
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
@robodoo robodoo closed this May 15, 2024
@fw-bot fw-bot deleted the saas-17.2-15.0-opw-3865845-macr-gL-Z-fw branch May 29, 2024 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forwardport This PR was created by @fw-bot OE the report is linked to a support ticket (opw-...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants