LoadScript (CSS)

Share your advanced knowledge/code with the community.
AZJIO
Posts: 73
Joined: Wed Dec 14, 2022 1:13 pm

LoadScript (CSS)

Post by AZJIO »

Try switching the "flat" style to black. The archive contains all the necessary files.
Download

Code: Select all

Procedure Callback(URL$, Success)
	Debug Success
EndProcedure

Procedure ButtonHandler()
	LoadScript("./data/flat.css", @Callback(), #PB_Script_CSS)
	LoadScript("./data/window.css", @Callback(), #PB_Script_CSS)
	LoadScript("./data/dgrid.css", @Callback(), #PB_Script_CSS)
;	LoadScript("./data/index.css", @Callback(), #PB_Script_CSS)
;	LoadScript("./data/font-awesome.min.css", @Callback(), #PB_Script_CSS)
; 	LoadStyle("./data/styles.css", @Callback())
EndProcedure
Dirk Geppert
Posts: 284
Joined: Fri Sep 22, 2017 7:02 am

Re: LoadScript (CSS)

Post by Dirk Geppert »

Great! Many thanks for that! :D
AZJIO
Posts: 73
Joined: Wed Dec 14, 2022 1:13 pm

Re: LoadScript (CSS)

Post by AZJIO »

You can replace the files, then you will have a black theme initially.
SpiderBasic\Libraries\javascript\dojo\dgrid\css\dgrid.css
SpiderBasic\Libraries\javascript\dojo\themes\flat\flat.css
SpiderBasic\Libraries\javascript\themes\flat\window.css
Fred
Site Admin
Posts: 1510
Joined: Mon Feb 24, 2014 10:51 am

Re: LoadScript (CSS)

Post by Fred »

That's very cool !
User avatar
Paul
Posts: 197
Joined: Wed Feb 26, 2014 6:46 pm
Location: Canada
Contact:

Re: LoadScript (CSS)

Post by Paul »

Unfortunately SB's SetGadgetColor command becomes no longer usable.
AZJIO
Posts: 73
Joined: Wed Dec 14, 2022 1:13 pm

Re: LoadScript (CSS)

Post by AZJIO »

Fred wrote: Wed Sep 27, 2023 12:26 pmThat's very cool !
You can add a new theme "FlatBlack". I already tried it, it works, but if black is enabled, then some of the controls do not switch to white when using LoadScript(). I may have used " !important" to force the color to be applied at a high priority. I also increased the font size for the menu, otherwise my finger would press two menu items at once.
Post Reply