ivantodorovich / odoo-icon Goto Github PK
View Code? Open in Web Editor NEWOdoo App Icon Builder
Odoo App Icon Builder
In some situations, roundish figures' flat shadow fail like this:
Playing with the icon size can affect the result.
I've tracked this down to the following line:
odoo-icon/src/icon/paper-motion.js
Line 69 in 0be5803
It seems to be a bug in paperjs, that fails to perform this unite operations:
const pathData1 = "M35,63.5c7.87004,0 14.99504,-3.18998 20.15253,-8.34747l-49.49747,49.49747c-5.15749,5.15749 -12.28249,8.34747 -20.15253,8.34747z"
const pathData2 = "M55.15253,55.15253c5.15749,-5.15749 8.34747,-12.28249 8.34747,-20.15253l-49.49747,49.49747c0,7.87004 -3.18998,14.99504 -8.34747,20.15253z";
const path1 = new paper.Path(pathData1);
const path2 = new paper.Path(pathData2);
const path3 = path1.unite(path2);
path3.fillColor = "red";
Simple means "basic because it is not an image editor" :)
The main idea is to give the ability to have a secondary icon in order to give more context for a specific module (in case this module is just extending an existing app, not creating a new one).
It implies that the original path of the primary icon should probably be kept somewhere before the path difference with the basic shape.
Would it be possible to acces the icon generator with puppeteer?
This would make it possible to integrate it with the oca tooling.
OCA/maintainer-tools#584
This would solve one of the current implementation gaps of that tool. Which is the SVG export.
It would be nice to be able to re-import a previously generated SVG.
All settings would be stored in the SVG as custom attributes with an oib (odoo-icon-builder) prefix (like inkscape does) :
<svg
oib:version="1.0"
oib:odoo-version="14.0"
oib:color="#fdd835"
oib:iconify-name="mdi:home"
oib:size="0.5"
>
...
</svg>
When dropping a such file on the generator, if the attribute oib:version
is detected then ask the user if he wants replace active settings with the ones stored into the file, else just replace the svg content as usual.
Noticed that the color scheme here is different then the colors used by odoo.
This mismatch in style can be fixed by using the same color scheme as odoo uses.
for color codes see: https://codepen.io/fheodoo/pen/XWNawZd?editors=1100
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.