From 809fefbe81bc6e19f7da8fec24f079fb02f11edb Mon Sep 17 00:00:00 2001 From: Samuel Degueldre Date: Thu, 20 Aug 2020 10:09:30 +0000 Subject: [PATCH] [FIX] web_editor: fix small gaps between shapes and their environments Because of the way browsers render SVGs as background images, background SVGs will sometimes not perfectly hug the top or bottom of their containers because of rounding in the calculation of the width from the height, or height from the width. This commit fixes a number of the shapes displaying this behaviour, by making their viewbox a perfect square, this means that whenever the width or height of the SVG is determined by the brower, it will use the same number for the height or width respectively because the aspect ratio is exactly one, rather than using the closest integer approximation of the aspect ratio, which causes those artifacts. task-2319484 closes odoo/odoo#56200 Signed-off-by: Quentin Smetz (qsm) --- addons/web_editor/static/shapes/Airy/12.svg | 2 +- addons/web_editor/static/shapes/Airy/13.svg | 2 +- addons/web_editor/static/shapes/Blobs/01.svg | 2 +- addons/web_editor/static/shapes/Blobs/03.svg | 4 ++-- addons/web_editor/static/shapes/Blobs/05.svg | 4 ++-- addons/web_editor/static/shapes/Blobs/06.svg | 4 ++-- addons/web_editor/static/shapes/Blobs/07.svg | 2 +- addons/web_editor/static/shapes/Blobs/09.svg | 2 +- addons/web_editor/static/shapes/Blobs/10.svg | 2 +- addons/web_editor/static/shapes/Blocks/01.svg | 2 +- addons/web_editor/static/shapes/Blocks/02.svg | 2 +- addons/web_editor/static/shapes/Blocks/04.svg | 2 +- addons/web_editor/static/shapes/Bold/01.svg | 2 +- addons/web_editor/static/shapes/Bold/02.svg | 2 +- addons/web_editor/static/shapes/Bold/03.svg | 2 +- addons/web_editor/static/shapes/Bold/04.svg | 2 +- addons/web_editor/static/shapes/Bold/07.svg | 2 +- addons/web_editor/static/shapes/Bold/08.svg | 2 +- addons/web_editor/static/shapes/Bold/09.svg | 2 +- addons/web_editor/static/shapes/Bold/10.svg | 2 +- addons/web_editor/static/shapes/Bold/11.svg | 2 +- addons/web_editor/static/shapes/Origins/02.svg | 2 +- addons/web_editor/static/shapes/Origins/03.svg | 2 +- addons/web_editor/static/shapes/Origins/04.svg | 2 +- addons/web_editor/static/shapes/Origins/05.svg | 2 +- addons/web_editor/static/shapes/Origins/08.svg | 2 +- addons/web_editor/static/shapes/Origins/09.svg | 2 +- addons/web_editor/static/shapes/Origins/10.svg | 2 +- addons/web_editor/static/shapes/Origins/11.svg | 2 +- addons/web_editor/static/shapes/Origins/12.svg | 2 +- addons/web_editor/static/shapes/Origins/14.svg | 2 +- addons/web_editor/static/shapes/Origins/15.svg | 2 +- addons/web_editor/static/shapes/Rainy/01.svg | 2 +- addons/web_editor/static/shapes/Rainy/02.svg | 2 +- addons/web_editor/static/shapes/Rainy/04.svg | 2 +- addons/web_editor/static/shapes/Rainy/05.svg | 2 +- addons/web_editor/static/shapes/Rainy/06.svg | 2 +- addons/web_editor/static/shapes/Rainy/07.svg | 2 +- addons/web_editor/static/shapes/Rainy/08.svg | 2 +- addons/web_editor/static/shapes/Rainy/09.svg | 2 +- addons/web_editor/static/shapes/Wavy/01.svg | 2 +- addons/web_editor/static/shapes/Wavy/02.svg | 2 +- addons/web_editor/static/shapes/Wavy/03.svg | 2 +- addons/web_editor/static/shapes/Wavy/04.svg | 2 +- addons/web_editor/static/shapes/Wavy/05.svg | 2 +- addons/web_editor/static/shapes/Wavy/06.svg | 2 +- addons/web_editor/static/shapes/Wavy/07.svg | 2 +- addons/web_editor/static/shapes/Wavy/08.svg | 2 +- addons/web_editor/static/shapes/Wavy/09.svg | 2 +- addons/web_editor/static/shapes/Wavy/13.svg | 2 +- addons/web_editor/static/shapes/Wavy/14.svg | 2 +- addons/web_editor/static/shapes/Wavy/15.svg | 2 +- addons/web_editor/static/shapes/Wavy/16.svg | 2 +- addons/web_editor/static/shapes/Wavy/17.svg | 2 +- addons/web_editor/static/shapes/Wavy/18.svg | 2 +- addons/web_editor/static/shapes/Wavy/19.svg | 2 +- addons/web_editor/static/shapes/Wavy/20.svg | 2 +- addons/web_editor/static/shapes/Wavy/21.svg | 2 +- addons/web_editor/static/shapes/Wavy/22.svg | 2 +- addons/web_editor/static/shapes/Wavy/23.svg | 2 +- addons/web_editor/static/shapes/Zigs/01.svg | 2 +- addons/web_editor/static/shapes/Zigs/02.svg | 2 +- addons/web_editor/static/shapes/Zigs/05.svg | 2 +- 63 files changed, 66 insertions(+), 66 deletions(-) diff --git a/addons/web_editor/static/shapes/Airy/12.svg b/addons/web_editor/static/shapes/Airy/12.svg index c8ad4777f49..b2b2430d0ed 100644 --- a/addons/web_editor/static/shapes/Airy/12.svg +++ b/addons/web_editor/static/shapes/Airy/12.svg @@ -1,7 +1,7 @@ + viewBox="0 0 1400 1400" xml:space="preserve">