Commit Graph
9 Commits
Author SHA1 Message Date
Jeremy Kersten 3de58cf56e [IMP] web_editor: shape - merge some style + fix color
Blocks and Rainy / Airy and Zigs merged together
Fix color of Bold 5 and bold 6 shape that are not easy to use due to contrast
with black, now it is grey by default.

task-2357174

closes odoo/odoo#62352

X-original-commit: 978fcbd4f6ba9f618b69560cb5fbe26602828bcb
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-11-25 16:39:42 +00:00
Benoit Socias 8c2dd4aa03 [FIX] web_editor: make Bold shapes 10 & 11 transparent
Before this commit Bold shape 10 & 11 had no transparent color

After this commit Bold shape 10 & 11 have a transparent color instead of
their former color #3 (#F6F6F6)

task-2357174
https://github.com/odoo/odoo/pull/59613

X-original-commit: 71b3b2d61b7acad601da38457671a20357298587
2020-11-25 16:39:41 +00:00
Samuel Degueldre c5a2652c9b [FIX] web_editor: fix gap between transformed shape and next section
Previously, when flipping some shapes vertically on chrome, and
vertically or horizontally on firefox, there was a gap of 1px or less at
some screen widths. This is caused by the way these browsers render
backgrounds on transformed elements. It seems like firefox will round
the size of the element to render the background image on it if the
element is transformed, while chrome will always render the background
at the correct size (or render it at a larger size and clip it to the
correct size after the fact), but will round the coordinates of the
symmetry point, causing only the vertical flip to have this issue, and
only if the background image would not extend beyond the bounds of the
element (on firefox, even shapes that would extend beyond the bounds of
the element would showcase a gap, eg origins 1)

This commit fixes that by applying the transform to the SVG rather than
to the element, by use of the shapes controller.

task-2369560

closes odoo/odoo#61609

X-original-commit: 42b3ad10e0b32b7fc72f801e2c67d6baf938c566
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-11-10 18:27:45 +00:00
Samuel Degueldre 5e811936c7 [IMP] web_editor: replace some bottom shape colors with transparent
Previously, rainy 05 and wavy 06 had a bottom color with a hard edge.
This means that in order to not have a harsh color transition in the
section, the user would have to match the bottom color to the background
color of the section or vice versa. This commit makes it so that this
color is transparent by default instead. This means that the user can
now simply choose the background color and have the same result, without
having to configure two separate colors.

Part of: odoo/odoo#58333

closes odoo/odoo#59420

X-original-commit: 8e6728f7fa486e264737ce068f637c8a76fdb7d9
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-07 13:49:09 +00:00
Samuel Degueldre 0f7a7639d1 [FIX] web_editor: various shapes fixes
This commit fixes a number of shapes, usually the problems were with
imperfect joints between connecting shapes, shapes being cut not close
enough to the edge, or shapes using embedded PNGs for shadows instead of
using SVG filters.

Part of: odoo/odoo#58333

X-original-commit: ac82407b259eab929486bf0a333a48bc507efa60
2020-10-07 13:49:09 +00:00
Samuel Degueldre fab02b45af [FIX] web_editor: make angle of shapes into a multiple of 10deg
This commit changes the angle of some slanted shapes so that they're a
multiple of 10 degrees, this increases consistency between shapes.

closes odoo/odoo#58134

X-original-commit: dc591641f3bf8dee50f172134ffd686edc571bd3
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-09-21 13:16:22 +00:00
Samuel Degueldre 5314557a78 [FIX] web_editor: various shape fixes (hide on mobile, bad joint, ...)
This commit fixes various things with the shapes: shapes are now hidden
on mobile by default, the shapes "blobs 02" and "blobs 03" now connect
properly, and the shape pager now shows the name of the current page.
Airy shapes now have embedded media-queries so that they're more visible
in the shape selector. The order of the pages in the shape selector has
been adapted so that shapes that are easier to use are on the first few
pages. A number of shapes have been "cut" differently to leave more
space for content, and some shapes have had their top/bottom anchoring
swapped.

task-2319484

closes odoo/odoo#57279

X-original-commit: c0f62593a4da37e8404dddc0a5762879a5ebbf7f
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-09-08 19:35:02 +00:00
Samuel Degueldre 809fefbe81 [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) <qsm@odoo.com>
2020-08-22 07:59:59 +00:00
Samuel Degueldre b84e0af742 [IMP] web_editor, website: add background shapes snippet option
This commit adds a new snippet option allowing the user to choose one of
a series of SVG shapes as their background, or to be overlaid over the
background image of a snippet and to customize the colors of those
shapes.

Part of https://github.com/odoo/odoo/pull/53017
task-2210790

closes odoo/odoo#53017

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-07 15:34:45 +00:00