custom icons

bolter7 years ago

Hello,
Is there a way to upload custom icons for the devices?
Thank You
Bolter

Anton Tananaev7 years ago

It's possible, but you would have to modify some source code.

bolter7 years ago

I am testing it now on the QNAP version (downloaded the Q package), will probably install it on a linux machine

obby6 years ago

Hi Anton, I'm trying to change the icons for some custom ones. I've created a car icon following the same design of the category icons, then I switched it for car.svg in the images folder. I assumed the code will work the same way but somehow the code can't get the width and height of the new svg. I get the following error.

Error Screenshot

Anton Tananaev6 years ago

I guess your SVG file doesn't have those parameters.

obby6 years ago

I've actually checked its properties and they are the same size as the default icons (40px by 40px).

obby6 years ago

Hello Anton, sorry to be a bother again. Do the default icons svg contain element ids
e.g.

svg.getElementById(fill[i]).style.fill = color;
svg.getElementById(info.get('rotateId')).setAttribute('transform', rotateTransform);
obby6 years ago

could i ask which tool you used in order to be able to edit the svg xml editor?

Anton Tananaev6 years ago

Inkscape and then regular text editor.

obby6 years ago

Thanks. Managed it