In the process of trying out new themes for my Ubuntu system I came across the elementary theme from the Elementary Project (theme files came from their PPA on Launchpad), which I find I rather like, except for one thing. My top panel in GNOME should be pretty transparent but there are some sections that show a very visible background. It doesn’t happen much, just for a few applets, namely the GnoMenu, timer and the clock applets. That’s bugged the daylights out of me, but I finally found a solution for the problem.
While perusing the newer (to me) posts on the Jovial June Screen shots thread on the Ubuntu Forums user TheNessus asked koleoptero about the problem that he had on his system with a theme that koleoptero made.
I’m using your gtk theme but cannot make the panel transaprent, it only makes parts of it transparent, but not the applet backgrounds as well. Dunno..
koleoptero knew just what he was talking about, and told TheNessus
Yeah you’re right. You have to go into the theme’s folder/gtk2.0/ , open the gtkrc file, find the panel line that sets the default panel background and comment it out (add a # at the beginning). It’s easier than it sounds. The panel part has a whole title saying it’s the panel part. After that reload the theme.
As TheNessus pointed out in the very next post on the thread, the file in question is the panel.rc file. I fired up Synaptic, did a search for the elementary theme, and found it in /usr/share/themes/elementary. Since I needed to edit it as root to apply the fix I simply copied that entire folder to ~/themes so I could make the edits without messing up the original file or finding my changes replaced when the theme gets updated. The first thing I did with my copied folder was to rename ~/.themes/elementary/elementary to peng_elementary (both the theme folder and the file got that name to help tell it apart from the original elementary theme components), and I then edited the file to change line 3 from
Name=elementary
to
Name=peng_elementary
This is just to let it show up in the theme customization dialog so I’d be able to tell exactly which components I’m dealing with. Then I edited ~/.themes/peng_elementary/gtk-2.0/Apps/panel.rc to comment out the line setting the panel background. While every theme may have it in slightly different locations you want to look for the panel.rc file in either [theme_root]/gtk-2.0 or [theme_root]/gtk-2.0/Apps. On line 7 I changed
bg_pixmap[NORMAL] = "/Panel/panel.png" # Disable for normal panel backgrounds.
to
#bg_pixmap[NORMAL] = "/Panel/panel.png" # Disable for normal panel backgrounds.
Then save the file and close your editor, then open System > Preferences> Appearance. If you’re changing the appearance you now use I’d select another theme, then close the Appearances window, just to make sure your system loads in the edited files. Reopen Appearances, select the theme you’re editing, and click the Customize button. In the Customize theme dialog stay on the Controls tab and select the modified theme you created.
Close the Customize dialog and click the Save As… button. Give the theme a name that will let you know it’s your modified theme, save it, and close the Appearance window. Voilà! You have gotten rid of the non-transparent backgrounds behind your panel applets.
You may notice that my modified elementary theme doesn’t use the traditional elementary icons. When I was customizing the theme I also switched from the elementary icons to the Mac4Lin icons because I’m not 100% thrilled with all of the elementary icons. One of these days I want to create a mashup icon theme to use some elementary icons and some Mac4Lin icons. Unfortunately Mac4Lin’s icon theme is set up to allow compatibility with older style GNOME icon themes so updating it to make it work with the current GNOME icon theme specifications is very tedious process.









