Recent

Author Topic: [SOLVED] [Icon theme  (Read 686 times)

Pe3s

  • Full Member
  • ***
  • Posts: 242
[SOLVED] [Icon theme
« on: August 01, 2022, 06:57:11 pm »
Hello, I would like to write the ability to change icons in the program and save the icons theme to an ini file.
I thought to load all the icons into the icon list and change the index and write to ini, is there another option?
I can ask for hints
« Last Edit: August 02, 2022, 07:47:20 am by Pe3s »

Handoko

  • Hero Member
  • *****
  • Posts: 4712
  • My goal: build my own game engine using Lazarus
Re: Icon theme
« Reply #1 on: August 01, 2022, 07:28:16 pm »
Option for what? Did you mean for storing the theme settings? If yes, you can use TRegistry too.

https://wiki.freepascal.org/fcl-registry

Pe3s

  • Full Member
  • ***
  • Posts: 242
Re: Icon theme
« Reply #2 on: August 01, 2022, 07:35:32 pm »
I was thinking if it is possible to change the theme of the icons in a different way

Handoko

  • Hero Member
  • *****
  • Posts: 4712
  • My goal: build my own game engine using Lazarus
Re: Icon theme
« Reply #3 on: August 01, 2022, 07:47:46 pm »
Your concept should work. But you may want to let user to add new icons or pictures. If yes, you should learn "How to load a TImagelist at run time" in the Graphics section in the link below:

https://wiki.freepascal.org/Portal:HowTo_Demos#Graphics

But before you use that image, you need to check and make sure that image's size is suitable for use in the GUI.

lainz

  • Hero Member
  • *****
  • Posts: 3980
Re: Icon theme
« Reply #4 on: August 02, 2022, 01:10:07 am »
Better do this way:

[Theme]
0=image1.png
1=icon3.png
...

And load each image in the index. This way you don't load all images on the image list. And these images are not fixed to the images you provide. The indexes are fixed that's good too.

Nicole

  • Sr. Member
  • ****
  • Posts: 331
Re: Icon theme
« Reply #5 on: August 02, 2022, 06:51:19 am »
Perhaps this may help you.
Google will translate it

https://www.lazarusforum.de/viewtopic.php?t=13170

Pe3s

  • Full Member
  • ***
  • Posts: 242
Re: Icon theme
« Reply #6 on: August 02, 2022, 07:46:58 am »
Thank you  :)

 

TinyPortal © 2005-2018