Question

I'm trying to customize a theme - I want to remove the rounded corners for a theme I'm using in xfce.

In the gtkrc

style "clearlooks-notebook-bg"
{
  bg[NORMAL] = @bg_color
}

style "clearlooks-notebook" = "clearlooks-notebook-bg"
{
  xthickness = 5
  ythickness = 0
}

Those aren't the properties I'm looking for..so I browse over to http://developer.gnome.org/gtk/stable/GtkNotebook.html#GtkNotebook.style-properties and there really isn't anything I am seeing that points me to the panels.

I see /usr/lib/gtk-2.0/2.10.0/engines/libclearlooks.so but I don't know where the theme files are located (xubuntu) so that I can see how clearlooks is handling the style of the tabs.

Pointers please

Was it helpful?

Solution

Theme resource file i.e. gtkrc is generally located under /usr/share/themes/<theme-name>/gtk-2.0/. For Clearlooks on Fedora 15, I can see gtkrc under /usr/share/themes/Clearlooks/gtk-2.0/.
What you are looking for cannot be achieved simple change in the gtkrc file. You have to understand that Clearlooks provides a Gtk Engine (/usr/lib/gtk-2.0/2.10.0/engines/libclearlooks.so is loadable module with the implementation of Gtk Engine for Clearlooks theme) along with theme resource file. Gtk Engine is responsible for implementation of drawing functions. These drawing functions override the ones provided by gtk+ library (GtkStyle, GtkRCStyle source files in Gtk) Thus you need to update the source of Clearlooks for changing the appearance. Source code is not very large (about ~10 files or so)! To get the source code of Clearlooks Gtk Engine on your system, check the package name for clearlooks (dpkg -S /usr/lib/gtk-2.0/2.10.0/engines/libclearlooks.so) & get the source for the package (apt-get source <clearlooks-package-name>). Modify the source code (look for draw_*/clearlooks_draw_* functions, clearlooks has code for drawing rounded rectangle thus draw_*/clearlooks_draw_* functions draw rounded rectangle as needed so change it to draw normal rectangle instead), build, install & have fun with new sharp unrounded tab corners!
Hope this helps!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top