简体   繁体   中英

how can I create own style for GTK and enforce it in my application

I would like to create a custom style for GTK and /use/ that in my application.

Even if I knew how to create the style, the application would use the style that is system default (or default choice of user who is running the application). Is it possible to override it, so that my application always use this my style (skin) created for it?

You can embed the entire Mono Runtime (19 mb overhead) into your Application. Then there won't be any dependencies, your users won't even need to install .NET or MONO. Refer following link: http://www.mono-project.com/Embedding_Mono

You can copy all the GTK# assemblies into your program directory. It isn't reccomended however because you may run into a lot of problems if the user has another version of the Gtk runtime installed.

You can integrate the GTK# installer with the Windows Installer of your Application.

You can use Deployment Management / Dependency Management Software, but this is expensive since all the good ones are propriety.

Also refer Following link:

http://www.mono-project.com/Embedding_Mono

Hope its helpful.

You need to look at GtkCssProvider . This is the class used in Gtk to parse and load css themes tweaked, you need to set a new provider for your application and make that provider load your custom theme. The related functions are there, or closely enough.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM