This blog describes how to style GTK+ based User interface using custom css. Styling gtk based user interface is now an easy task. gtk3 provides following important class to use css inside gtk+ program.

Let us see below figure. We are going to implement this GUI in gtk+ program.

gtk css tutorial with example code

gtk css tutorial with example code to implement above gui

  • Write gtk+ program. Let us look at the below code (sample.c)

  • Let us create custom style.css file.

  • We can build the above program using below command and run the binary sample.


Gtk+ layout and progress bar

Related Contents to follow