Jump to content

TUniNativeImageList AddIconsCls


hph

Recommended Posts

I need my own font fcons set from Icons8.

How can I load this icons into a TUniNativeImageList. 

AddIconCls('icons8-delete', uicoFontAwesome);  <-- uicoFontAwesome is wrong, i need uicoFontIcon8 or any else...

Is this component only compatible for Pictos or FontAwesome or is there any workaround?

Link to comment
Share on other sites

What you can do is to replace Font-Awesome with Line-Awesome from Icons8 by adding one line to your ServerModule.

There is a little trick however! I had to edit the "line-awesome-font-awesome.css" file to get it to work with UniGUI. Basically adding "!important" to all CSS selectors to override the Font-Awesome equivalent. See the attached screenshots.

I have included a project with the file already modified (in the "\LineAwsomeFont\Win32\Debug\files\line-awesome\css" folder) - please note it is not the "minified" version of the file that was edited.

See more details here:

https://icons8.com/line-awesome

 

bds_2018-11-23_18-34-09.png

Edit After.png

Edit Before.png

explorer_2018-11-23_18-32-38.png

View After.png

View Before.png

LineAwsomeFont.zip

Link to comment
Share on other sites

  • 2 weeks later...

Hi GerhardV

Many thanks for your detailed suggestion! It works bretty, but it's not what I was looking for. I need my own font-icon library, because I can easly create it with the icon8 library. It works very well for each component like UniSpeedbutton, UniLabel etc. (html text), but the only thing I'm missing is to use this custom css library with the TUniNativeImageList component!

thanks and best regards

Link to comment
Share on other sites

  • 10 months later...
On 23/11/2018 at 13:51, GerhardV said:

Lo que puede hacer es reemplazar Font-Awesome con Line-Awesome de Icons8 agregando una línea a su ServerModule.

¡Sin embargo, hay un pequeño truco! Tuve que editar el archivo "line-awesome-font-awesome.css " para que funcione con UniGUI. Básicamente agregando "! Important" a todos los selectores CSS para anular el equivalente Font-Awesome. Ver las capturas de pantalla adjuntas. 

He incluido un proyecto con el archivo ya modificado (en la carpeta "\ LineAwsomeFont \ Win32 \ Debug \ files \ line-awesome \ css"). Tenga en cuenta que no es la versión "minificada" del archivo que se editó.

Ver más detalles aquí:

https://icons8.com/line-awesome

 

bds_2018-11-23_18-34-09.png

Editar después.png

Editar antes.png

explorer_2018-11-23_18-32-38.png

Ver después.png

Ver antes.png

LineAwsomeFont.zip

Hello, could you share this example again, thank you very much!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...