Pimp your Gtk application with CSS

 GTK is a powerful framework for building GUI application in Linux and other OSes. It is written in C, but there is binding for many programing languages like Python.

GTK uses a subset of CSS for styling your application. I have made a little Python Demo Application to show how to pimp your application like a pimp.

It shows the basics of how to use a CSS file with GTK python bindings and  the basics of how to write custom styling in CSS for your GTK application.  It is not meant to be good looking 😊, but to show how the styling works. It shows the basics like colors, padding, margins, borders etc, but also more advanced features like transitions and animations.

Check out the code here. (Tested in Fedora 34 Workstation)

https://github.com/timlau/gtk-demo




There is 2 versions, One for GTK3 and one for GTK4. Check out the Readme for how to run.

Video



References.



Comments

Popular posts from this blog

Yum Extender is very keyboard friendly

Yum Extender - Rises Like a Phoenix