Giter Club home page Giter Club logo

odoo-icon's People

Contributors

dependabot[bot] avatar ivantodorovich avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

odoo-icon's Issues

Roundish figures' flat shadow fail

In some situations, roundish figures' flat shadow fail like this:
icon (2)
icon (3)

Playing with the icon size can affect the result.

I've tracked this down to the following line:

facePaths.reduce((path1, path2) => path1.unite(path2, {insert: false})) :

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";

[IMP] Icon variation using a secondary icon

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).

  • The first step would be to select a basic shape that will remove content from the first icon (like Path > Difference in Inkscape)
    • This basic shape could be a rectangle, a triangle or a circle
    • You have presets to move it to 8 common anchors (4 corners, 4 middles)
    • You can also move it manually (using normalized value from -1.0 to 1.0 for horizontal/vertical positions)
    • You can resize it
  • Then you select a secondary icon that will appears centered in the middle of the basic shape
    • You can resize it
    • You can flip-it vertically/horizontally
      image
    • You can rotate it
      image

It implies that the original path of the primary icon should probably be kept somewhere before the path difference with the basic shape.

image

Reimport generator settings with a drag & drop

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.