Xel Toolkit is an awesome UI toolkit for creating the native desktop-like look and feel in electron apps. The only issue that I came across it is while having a different folder structure of electron app. So when your electron app's folder structure is different (i.e. customized) the icons were not loading due to the relative path. Here is a small snippet of code that I have written to overcome this bug.
This bug fix will give electron users an option to use this wonderful toolkit while maintaining their folder structure :)
Few details:-
Also works when you build the electron app!
icons were not loading due to the relative path if your electron folder structure is different (i.e. customized)
fixed using a small electron specific code which only executes if the toolkit is used in electron
rest of the code is untouched
we are requiring electron directly here because the code is electron specific, so electron will be by default present in the node_modules of the user & hence by using app object (available in electron framework ) generating an absolute path
I have tested this by serving the electron app and the building it (i.e. by creating Debian package and installing)
Xel Toolkit is an awesome UI toolkit for creating the native desktop-like look and feel in electron apps. The only issue that I came across it is while having a different folder structure of electron app. So when your electron app's folder structure is different (i.e. customized) the icons were not loading due to the relative path. Here is a small snippet of code that I have written to overcome this bug.
This bug fix will give electron users an option to use this wonderful toolkit while maintaining their folder structure :)
Few details:- Also works when you build the electron app!