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 #165193

Closed

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

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
@robodoo
Copy link
Contributor

robodoo commented May 13, 2024

@fw-bot
Copy link
Contributor Author

fw-bot commented May 13, 2024

This PR targets 16.0 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
robodoo pushed a commit that referenced this pull request May 14, 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 #165193

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 14, 2024
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