Where to set Application.Theme?

Post

Posted
Rating:
#1 (In Topic #1038)
Regular
JumpyVB is in the usergroup ‘Regular’
I can't find the right way to change the icon theme.
Here are the steps to reproduce the problem
  1. New project > Graphical application
  2. Add Button1 with Picture "icon:/small/floppy"
  3. Try to set icon theme:

Code (gambas)

  1. Public Sub Form_BeforeArrange()
  2.   Application.Theme = "Gambas"
  3.   ' Application.Theme = "Gambas-Mono"
  4.   ' Application.Theme = "Adwaita"
  5.   ' Application.Theme = "Papirus"
4) Yeat default theme from desktop environment is show on Button1 when application is run
Image

(Click to enlarge)


PS: I am running Linux Mint 21.1 Cinnamon 5.6.8
Online now: No Back to the top

Post

Posted
Rating:
#2
Avatar
Regular
thatbruce is in the usergroup ‘Regular’
 It has to be done early, like in the main form _init or likewise.
BTW, you only get one shot, if you miss then you're stuck with whatever is loaded by default.
b

Online now: No Back to the top

Post

Posted
Rating:
#3
Regular
JumpyVB is in the usergroup ‘Regular’
Thank you.

Code (gambas)

  1. Static Public Sub _init()
  2.   Application.Theme = "Gambas"
  3.   ' Application.Theme = "Gambas-Mono"
  4.   ' Application.Theme = "Adwaita"
  5.   ' Application.Theme = "Papirus"
Online now: No Back to the top
1 guest and 0 members have just viewed this.