# The Ubuntu Forum Community > Other Discussion and Support > Art & Design >  A Beginner "How To" for gtkrc themes.

## crimesaucer

!!!!!!!**********EDITED June18th,2007************!!!!!!!!!!!! (This Thread is very old and out of date, consider it closed - Nov.24,2009)


#### This is a short story about my beginner experiences with gtkrc themes and other things having to do with being a beginner on xubuntu/ubuntu.####





I AM A BEGINNER, SO DON'T BE RUDE IF I DID SOMETHING THE WRONG WAY, JUST POST THE PROPER WAY AND IT WILL HELP EVERYONE TO LEARN.





When I first started to look into re-writing my themes, I opened up my /usr/share/themes/Xfce-winter/gtk-2.0 directory, which was the gtk-2.0 theme that I wanted to modify. 

I then opened up that gtk-2.0 folder to read the gtkrc file inside of it, to see if I could change some of the basic colors of that theme on my own. 

When I first looked at the gtkrc for Xfce-winter, the only thing that I could understand was the hex-code colors (#C0C0C0 is gray). Even then I wasn't sure of which color was for what location in my theme. 

So, through trial and error, I ended up modifying the Xfce-winter gtkrc into one of my first themes that I called Xfce-rusted. 

I had successfully changed all of the colors but nothing else. I was very proud of it, and it even worked in Firefox and Thunderbird. Every detail that I had modified with my new colors had made my xubuntu theme more enjoyable then most of my installed default themes, and I had been able to match my new desktop OS theme to my wallpaper's colors exactly.

Well, it's funny how you can be proud of something, and then keep improving on it, then look back at your first attempts, and feel that they all look so lame now. I'll try to show what I mean with a few screenshots. 




....This was maybe my 5th or 6th theme attempt, pretty much just Xfce-winter with different colors called Xfce-rusted....




.... My next attempt with a gradient....




.... Then with a different gradient....




.... Then with no dividing lines....




.... And a newer style....




....the newest way I made it look with a Firefox fix on the tab bar so the theme would look better in xubuntu....




....another way to make it look...





This "How To" guide is not from an expert, but rather a list of tips that I have self taught myself through many hours of trial and error. I had searched for guides to explain the different theme engines and could not find any that fully explained every detail that I wanted to know, and after learning a few things on my own, I thought I might help other beginners that might want to start making their own themes by sharing a few things I had learned.

I hope that anybody that has something to add, or any corrections or tips to help out with, will post on this thread. Let's make this an ongoing thread for those of us that enjoy themes, and sharing themes with others. Any shared tips and bits of code to help better each others themes will be appreciated. Always give credit where credit is due, and try to share as many links as you can that have any info on theme development. 

And if you have a nice Emerald theme to share, then post a link too.  


***LONG BORING STORY IS OVER, NOW FOR THE LIST: 

**PLEASE DO NOT INSTALL THE LIST.** THIS IS NOT THE GTKRC. **

# xfce-rusty_newb, my modification of xfce-winter
# This is a modification of the gtk-2.0-engines-xfce theme called Xfce-winter. I have changed a lot of settings
# and I have tried to explain things that I did. These are my default settings for most all of my themes now. The
# only thing I need to change usually is the gradient percentages to work with the colors I have chosen. What I don't know
# I usually leave alone because I am happy with the way the theme works. 
#
#
# WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!!!!!#######
#
#   DO NOT INSTALL THIS.
#
#
###### THIS IS NOT AN ACTUAL GTKRC!!!!! THIS IS A CHEAT SHEET FOR LOACTIONS AND EXPLAINATIONS OF WHAT I'VE LEARNED!!!!!!########

gtk-can-change-accels             = 1
gtk-menu-drop-shadow              = 1
gtk-menu-shadow-delay             = 100

style "default"
{
    GtkButton::default_border         = {0, 0, 0, 0}
    GtkButton::default_outside_border = {0, 0, 0, 0} # a border around the close button
    GtkButton::default_spacing        = 10 
    GtkButton::focus-line-width       = 1
    GtkButton::focus-padding          = 0
    GtkCheckButton::indicator_size    = 15 #size of the indicator for the roll over
    GtkMenuBar::shadow_type           = out
    GtkMenuItem::selected_shadow_type = out
    GtkPaned::handle_full_size        = 1
    GtkPaned::handle_size             = 8 # this is for the movable divider in Thunar between the folders of the leftside and rightside
    GtkRadioButton::indicator_size    = 15 #size of the indicator for the roll over
    GtkRange::slider_width            = 15
    GtkRange::stepper_size            = 15
    GtkRange::stepper_spacing         = 0
    GtkRange::trough_border           = 0
    GtkScrollbar::min_slider_length   = 37  # smallest size of scroll bar slider to match size of buttons (4 X 4), it looks good in User inter Pref.
    GtkToolbar::shadow_type           = out # I changed this from none to out to fix the way it looks in certain apps. There are other ways to draw the shadows with "etched-in" and other ways. Just read other xfce gtkrc files to learn.
    GtkWidget::focus-line-width       = 1
    GtkWidget::focus_padding          = 2
    GtkWidget::interior_focus         = 5
    GtkWidget::internal_padding       = 0

    xthickness = 0 # I changed this from 2 to 0 to make the dividing lines between icons disappear, it makes my Orage calendar look better.
    ythickness = 0 # I changed this from 2 to 0 to make the dividing lines between tool bars disappear.

    fg[NORMAL]        = This is the font color in the menu bars in FF and xubuntu, and also the color of the app in the pager that is open on a different Desktop.
    fg[ACTIVE]        = This is the font color of a unopened tab and of the text for a roll-over check box before it is rolled over. Example: like the font for the check boxes for- "Use hinting :" in User Interface Pref 
    fg[PRELIGHT]      = Selected (roll over) font color of check boxes like- "Use hinting :"
    fg[SELECTED]      = The opened app color in the pager for the Desktop you are on.
    fg[INSENSITIVE]   = This is for the color of the font that can't be clicked (usually lighter) that is in drop down menus, also the Firefox right click menu for the "Back" and "Forward" options for when you can't go back or forward. This is also the color of the the word "Google" in the search bar before you type anything. Also the arrows of the scroll bars.

    bg[NORMAL]        = This is the overall color of the Browser for Firefox, xubuntu/ubuntu, Thunderbird, and all apps. It creates the color that is used for my gradient browser themes. It is also all of the buttons, scroll bar handles, panel handle, Drop down menus (before you roll over them with the mouse tool tip). 
    bg[ACTIVE]        = Scroll bar gradient background color, unopened Tab background color.
    bg[PRELIGHT]      = The color of a loading process bar (Firefox tabs), or the downloading process bar as seen in Firefox Downloading Manager , or apps loading like the GIMP. Also is the selected color of background for check boxes like- "Use hinting" in the User Inter Prefs. And the color of the scroll bar slider when you press it- (basically where the you move a scroll bar at).
    bg[SELECTED]      = End Session border color for the End Session dialog box. Also the filler color of an open app on top of another app in the Desktop you have open in the pager.
    bg[INSENSITIVE]   = Toggle buttons that can't be clicked, regular Menu arrow backgrounds, nonactive check box outlines and nonactive radio button outlines

    text[NORMAL]      = Font color used for Mousepad, Firefox (web pages unless you un-check you "Use System Colors" in Firefox Preferences-->--Content-->--Colors), Url font, Thunar font (not selected), xubuntu menus (not selected). Checks for check boxes, radio dots too. Combobox, ComboBoxEntry, GtkCombo, GtkEntry, and numbers in numberbox.  
    text[ACTIVE]      = The font color in the left side of the Thunar File System- Home, Trash, Desktop, File System, when you are in a different folder like /usr. (mess around with it and you will see)
    text[PRELIGHT]    = Radio/Checks and ComboBox font colors. ComboBox is important to match.
    text[SELECTED]    = Highlighted font color in web pages and mousepad. Selected font color in the Thunar file system, and xubuntu menus like User interface.
    text[INSENSITIVE] = nonactive font in un-clickable Combos and GtkCombos. un-clickable radio/checks.

    base[NORMAL]      = Mousepad background color, Thunar files use this for the background strips on the right side and the background color on the left side, Firefox URL/Search bar backgrounds, ComboBoxEntry bg, GtkEntry bg, GtkCombo bg, Checkbox RadioButton backgrounds, Header and menu bg color for User Interface Preferences.
    base[ACTIVE]      = The bg color for the last folder opened (not selected and current) folder of Thunar or User Interface Pref. If you have Thunar open to File system-->--usr or "/usr", the File system folder (on the left, and any other folder in a different app like User Interface Pref.), will have this bg color while you are in the currently opened /usr folder.
    base[PRELIGHT]    = Background color for radio boxes and check boxes when rolled over (selected).
    base[SELECTED]    = The bg color for the open (selected and current) folder of Thunar User Inter Pref, Also the background color of Highlighted text, and the coloring of the Frame divider, and the strip in the scroll bar slider, basically the part you click onto when moving the scroll bar. 
    base[INSENSITIVE] = ComboBoxEntry bg (Disabled), GtkEntry bg (Disabled), GtkCombo bg (Disabled), Checkbox (Disabled) RadioButton (Disabled) backgrounds.


engine "xfce"
    {
        grip_style = slide
        smooth_edge = true
	boxfill             # I added a boxfill here to create a gradient in my toolbar. 
                              # I use shade_start = 0.90 to start the gradient darker at the top of the tool bar
                              # I use shade_start = 1.10 to start the gradient lighter at the top of the tool bar
                              # I use shade_end = 1.00 to end the gradient at a 100% fill of the bg[NORMAL] color, this way the color blends perfectly into the app.
                            # NOW........if you don't want to use a Firefox userChrome.css to fix the tab-bar...you can do it my old way of fading into the Firefox
                            # default gradient used....it's usually near shade_end = 0.87 and just match the shade_start in the same way, so that it matches the shade_end of the menu bar.

        {
            fill_style = gradient
            orientation = auto
            shade_start = 0.90
            shade_end = 1.00
        }
    }
} 
widget_class "*" style "default"

#/***** OK, I'll try to explain this, but remember, I am a beginner and am totally self taught since I can't find any
#      documentation, or "How To's" on gtkrc modification. So this might be wrong, and if you know how to explain it
#      better, please write it down so I can learn it and so others can learn it. I will edit this, or just post a new guide.  
#
#  This is where the next styles start. 

style "colored" = "default"
{
    xthickness = 4  # Play around with this for your own preference.
    ythickness = 4  # this I changed from 3 to 4 to make the Thunar Path Box taller. Play around with this for your own preference.

    bg[ACTIVE]        = Active button on panel handle, selected background color when clicking any app button, (not Firefox), ComboBox Drop down menu arrow button bg.
    bg[PRELIGHT]      = Rollover background color (hover) on all buttons and drop down menus.

    fg[ACTIVE]        = Font for active button, ComboBoxEntry drop down foreground arrow.
    fg[PRELIGHT]      = Font color for all selected buttons (roll over) except ComboBox and ComboBoxEntry (only arrows), Also font color for all rollover drop down menus.

    text[ACTIVE]      = Old highlighted font (like if you highlight text, and then click on a different window, the text color and bg color will change. This is for the text foreground font color for the base[active] background color. (basically, "active" is like a folder that is opened before opening the next folder which is base[selected] and text[selected] ) 
    text[PRELIGHT]    = ComboBox and ComboBoxEntry font color.

    engine "xfce" 
    {
        smooth_edge = true
        grip_style = slide
        boxfill
        {
            fill_style = gradient     # this I changed from a fill_style = plain, to gradient so I could have gradient roll-
            orientation = vertical    # over, drop down menus in Firefox, and other menus. I chose orientation = vertical
            shade_start = 1.24        # to force the menus to match the tool bars. try "auto" and see if you like it.   
            shade_end = 0.83          # it will draw the gradient sideways. Also mess with the percentage numbers for
	}                             # your own style.
    }
}

widget_class "*List*"              style "colored"
class "*List*"                     style "colored"
widget_class "*Text*"              style "colored"
class "*Text*"                     style "colored"
widget_class "*Entry*"             style "colored"
class "*Entry*"                    style "colored"

# And now a new style starts for menubar


style "menubar" = "colored"
{
    xthickness = 0  # I changed this from 2 to 0 to change size of the dividing lines between the icons on the menu bar. Play around with this for your own preference.
    ythickness = 0  # I changed this from 2 to 0 to erase the dividing line between the menu bar and the tool bar. Play around with this for your own preference.

    engine "xfce" 
    {
        smooth_edge = true
        grip_style = slide
        boxfill
        {
            fill_style = gradient  # I changed the fill style to gradient and added the percentages.
            orientation = auto
          shade_start = 0.80  # This is the very top of your menubar, 0.80 is a darker gradient, 1.20 is a lighter gradient   
            shade_end = 0.90  # This is the bottom of the menubar, 0.90 is the exact color of the top of the toolbar...also 1.10 would be the same if you made it lighter...
        }
    }
}

widget_class "*BonoboDockItem"     style "menubar"
class "*BonoboDockItem"            style "menubar"
widget_class "*HandleBox"          style "menubar"
class "*HandleBox"                 style "menubar"
widget_class "*ToolBar"            style "menubar"
class "*ToolBar"                   style "menubar"
widget_class "*MenuBar"            style "menubar"
class "*MenuBar"                   style "menubar"

style "menuitem" = "colored"
{
    xthickness = 2 # Play around with this for your own preference.
    ythickness = 2 # Play around with this for your own preference.

    engine "xfce" 
    {
        smooth_edge = true
        grip_style = slide
        boxfill
        {
             fill_style = gradient
            orientation = auto
            shade_start = 1.73  # I have changed the percentage and flipped it to create a different look in the drop down menus. Play around with this for your own preference.
            shade_end = 0.83    # I have changed the percentage and flipped it to create a different look in the drop down menus. Play around with this for your own preference.
        }
    }
}

widget_class "*MenuItem*"          style "menuitem"
class "*MenuItem*"                 style "menuitem"

style "scrollbar" = "default"
{
    xthickness = 0   # I changed this from 2 to 0 to change the space divider between the scroll bar slider, and the scroll arrows. 0 is no space. Play around with this for your own preference.
    ythickness = 1   # I changed this from 2 to 1 to change the way the progress looks in the Firefox tabs. It's wider. Play around with this for your own preference.
    engine "xfce" 
    {
        smooth_edge = true
        grip_style = slide
        boxfill
        {
            fill_style = gradient
            orientation = auto
            shade_start = 1.73   # I have changed the percentage and flipped it to create a different "bubbled out" look in the scroll bar. Play around with this for your own preference.
            shade_end = 0.60     # I have changed the percentage and flipped it to create a different "bubbled out" look in the scroll bar. Play around with this for your own preference.
        }
    }
}
widget_class "*Scrollbar*"         style "scrollbar"
class "*Scrollbar*"                style "scrollbar"
widget_class "*GtkProgress*"       style "scrollbar" 
class "*GtkProgress*"              style "scrollbar" 

style "button" = "colored"
{
    xthickness = 4  # I changed this from 3 to 4 to make my buttons wider
    ythickness = 4  # I changed this from 3 to 4 to make my buttons longer.

    engine "xfce" 
    {
        smooth_edge = true
        grip_style = slide
        boxfill
        {
            fill_style = gradient
            orientation = vertical
            shade_start = 1.92   # I have changed the percentage and flipped it to create a different "bubbled out" look
            shade_end = 0.82     # I have changed the percentage and flipped it to create a different "bubbled out" look
        }
    }
}
widget_class "*Button*"            style "button" 
class "*Button*"                   style "button" 
widget_class "*button*"            style "button" 
class "*button*"                   style "button" 
widget_class "*Togglebutton*"      style "button" 
class "*Togglebutton*"             style "button" 
widget_class "*togglebutton*"      style "button" 
class "*togglebutton*"             style "button" 
widget_class "*OptionMenu*"        style "button" 
class "*OptionMenu*"               style "button" 
widget_class "*Tree*"              style "button" 
class "*Tree*"                     style "button" 
widget_class "*GtkScale*"          style "button" 
class "*GtkScale*"                 style "button" 

widget_class "*CheckButton*"       style "default"
class "*CheckButton*"              style "default"
widget_class "*RadioButton*"       style "default"
class "*RadioButton*"              style "default"

# OK I removed the rox filer part since I don't have it installed.

# This is for the window borders (xfwm4 & metacity)
# 
style "titlebar" = "default"
{
    bg[SELECTED]      = color for opened window frame (window in front of windows)
    fg[SELECTED]      =  color of titlebar text on open frame (window in front of windows)
    bg[INSENSITIVE]   = color for non-opened window frame (windows behind the open window)
    fg[INSENSITIVE]   = color of titlebar text on non-open frame (windows behind the open window)
}

widget "xfwm"                      style "titlebar" 
class "MetaFrames"                 style "titlebar" 
widget_class "MetaFrames"          style "titlebar" 

# I removed this part so it doesn't use the rodent yellow "X" close button and menu icons: (include "/usr/share/icons/Rodent/iconrc-png")
That way it uses all of the icons from my different icon packs for the close buttons...and other buttons.


...ALSO, FEEL FREE TO POST YOUR OWN LISTS OF EXPLANATIONS FOR OTHER THEMES, AND ANY THING THAT MY LIST FOR THE XFCE-ENGINE LEFT OUT. ALSO BE SURE TO POST YOUR SCREENSHOTS AND YOUR GTKRC THAT YOU WANT TO SHARE WITH OTHERS.

----------


## crimesaucer

I EDITED this part since I change the post above.

----------


## crimesaucer

Here are two links for my Emerald themes if anybody would like them:


http://themes.beryl-project.org/theme_details.php?id=81



http://themes.beryl-project.org/theme_details.php?id=58

----------


## ffxr

excellent work, crimesaucer & many thanks.. 

ll have a good go at customising a theme, when i get a chance.. later in the week..

i do like your dark emerald one, can you post your latest gtkrc for it pls..?

----------


## crimesaucer

old theme Edited....

----------


## scigirl

Hi,
This is a great little "how to"!
I have one problem though - when creating the theme, somehow it applies itself not only to windows, dialogs, menus, toolbars and stuff, but somehow manages to apply itself to the buttons and text fields in firefox. This causes a problem because if you choose a dark theme with white font (like the moonglow one above), all the buttons and text fields look out of place, and if the website overwrites one color (say the bg color of text fields like this forum does), then the text still stays white and I can't see what I'm typing. Has anyone found a solution around that? I know Firefox somehow uses GTK, but how? Is the only solution to get a different web browser? If so, which one? Any help would be appreciated. Thanks a bunch!

----------


## crimesaucer

Go to Firefox-->--Edit-->--Preferences-->--Content-->--Colors-->-- and then "un-check" the box that says "Use System Color"

Try that.

Usually that fixes it everywhere to the font colors you have selected in Firefox. Black with White background.

It also changes the screen color to blank white page instead of a dark one.

I should maybe re-do the "How To" and explain that part better.

----------


## scigirl

Actually, I believe I didn't quite state the problem correctly. The solution you gave works, but only if you choose to not allow pages select their own colors. I guess my problem is that I'd like to let pages select their own color, I don't want to overwrite them with mine, so that for example gmail is nicely colored  as it is meant to be rather them just plain 4-colored scheme. So if i choose to check the option of allowing pages to select their own colors, everything works well except for buttons and text fields. So for example if I go to www.google.com, it appears white as it should but the area where I must enter the search as well as the two submit buttons are dark with white font as my theme suggests. Would you happen to know of a way to let pages choose their color, and not use system color for buttons (the "use system colors" button is already un-cheked in my preferences). Thanks a bunch  :Smile:

----------


## crimesaucer

I know what you mean, all though if you uncheck it for "to not allow pages select their own colors", then sites get ugly fast.

Ubuntu is the only site that writes in a light unreadable text in the text box and I can't figure out why. My Berly forum doesn't do this, and neither does the Stumbleupon text areas.

I'm sure there are other sites with the text area done in a light font, but I haven't found one yet.

I'll try to fix this, but it is the reason I changed my style to a Dark Charcoal with black text and why I also have the other Black theme that makes mousepad use a white back ground so it has black text.

But then you lose the Black strips on the folder, and I like that part..

Would you like my other dark version gtkrc that has the white and green folder area in Thunar. It has readable text basically everywhere if you keep the "Use System Color" box unchecked. It is the one pictured above the all black theme that looks the same except the white/green parts.

----------


## crimesaucer

old theme Edited...

----------


## 10Digits

After digging through so many sites for gtk themes ur post was most helpful...trying to mod clearlooks mettalico....an already perfect looking theme.


Anyways found a software called The Widget Laboratory...it shows what changes you have done to the current theme instantly...which encouraged me to use it as I am uncomfortable with codes that last more than a page.
More about it....check out this URL..http://www.ohloh.net/p/twl

PS I think you may know about this software already but i wanted tomention it in this post anyways.... :Very Happy:

----------


## Exodist

The OP of this thread did try to describe how to mod a theme, but he left out lots a valuable information.

You can find the best information here http://live.gnome.org/GnomeArt/Tutorials

----------


## Minsky

Hi, I'm new to altering themes and I hope that someone will be able to help me. I'm using Karmic with ATI drivers, Compiz installed and Extra Effects enabled. Is there a way to alter the transparency of the 3 main menu backgrounds (Applications,Places,System), whilst they're opened? I know that you can change the transparency of the whole lot with the Opacity settings in Compiz, and that I can alter the background colour in the gtkrc file, but I just want to alter the background transparency of the menus whilst leaving the text intact. What I'm after is for the menus, when displayed, to merge with the wallpaper with only an outline and the menu items text displayed. Am I right in thinking that a colour's alpha setting alters its transparency level and if so, where would I apply the setting in the gtkrc file to get the effect that I'm after?

----------


## Minsky

Can anyone help me out with this?

----------


## crimesaucer

> Can anyone help me out with this?


The only thing I can say is check out the RGBA murrine thermes that Cimi makes and hope for these themes one day: 

http://www.cimitan.com/blog/wp-conte...ine-170208.png
http://www.cimitan.com/blog/wp-content/murrine_rgba.png
http://www.cimitan.com/blog/wp-conte...ine_rgba-2.jpg

Blog posts about RGBA: 

http://www.cimitan.com/blog/2008/11/...rine-projects/

http://www.cimitan.com/blog/2007/12/...urrine-engine/

----------


## crimesaucer

> The OP of this thread did try to describe how to mod a theme, but he left out lots a valuable information.
> 
> You can find the best information here http://live.gnome.org/GnomeArt/Tutorials



Hello, I was the creator of this thread.... I made it way back in March 2007 after messing around with some xfce4 themes. 



This thread is as old as dirt and mostly for the "xfce4 gtk engine" (which basically nobody uses). I'm always surprised when I see people digging up this ancient thread.



You can see my current murrine themes here (and some clearlooks): http://crimesaucer.deviantart.com/gallery/
(the old xfce4 themes from this thread are on page 5 and 6)



There wasn't much information available when I wrote this back in early 2007, especially about the xfce4 gtk engines. 



There were no easy GUI apps included with gnome for changing the colors of gtk2 themes..... Beryl was around version 1.0 and considered "bleeding edge" back then..... hell, running "the widget factory" and modifying gtkrcs through trial and error was about the only thing that I found I could do. 



..... and the Gnome Tutorials that you and other people have linked are all good to read about gtk widgets, but none of them had an easy explanation that a beginner (such as myself) could follow to change a few colors and widget styles.



I am in no way a developer or a Linux guru, and in fact this post is a bit of an embarrassment now. It was basically me learning a few things and then sharing it with other beginners.



Hopefully someone will create a more current thread for everybody to discuss gtk2 themes in, I haven't even been in the Ubuntu Forums much since they closed the "Other OS" section (I haven't used xubuntu since 7.04).



So good luck to everyone, and hopefully this thread will be closed.

----------


## Minsky

Thanks Crimesaucer, I'll check out the links!

----------


## vie et mort

Anyone know how to change the color of this gtkrc's titlebar / frame? Not sure what exactly its called but its the bar all the way at the top of any open window, right above the menu-bar and it says the name of whatever you have open.



> # Author: perfectska04 (Victor C.)
> # Theme:  Shiki-Colors for Murrine 0.9.3+.
> # Description: Shiki-Colors is 100% free and open source.
> 
> # NOTE: Uncommenting means to delete the "#" at the beginning of a line. Commenting means to add a "#" at the beginning of a line. The "#" tells the theme wether to ignore the specified line or not.
> 
> # These are the defined colors for the theme, you can change them in GNOME's appearance preferences.
> gtk_color_scheme = "fg_color:#101010\nbg_color:#D8D8D8\nbase_color:#f  ff\ntext_color:#1A1A1A\nselected_bg_color:#97bf60\  nselected_fg_color:#fff\ntooltip_bg_color:#F5F5B5\  ntooltip_fg_color:#000\nframe_color:#333333\ninact  ive_frame_color:#333333"
> 
> ...


I like messing around with these things but I could never figure out how to change the color of the very top bar. Any help would be greatly appreciated!

----------


## crimesaucer

> Anyone know how to change the color of this gtkrc's titlebar / frame? Not sure what exactly its called but its the bar all the way at the top of any open window, right above the menu-bar and it says the name of whatever you have open.
> I like messing around with these things but I could never figure out how to change the color of the very top bar. Any help would be greatly appreciated!


Did you try changing these:



```
bg[SELECTED]
bg[INSENSITIVE]
```

This worked for my xfwm4 color using murrine (active window and inactive window).

Your murrine theme is written differently than the ones that I use, and I'm not sure if you use xfwm4 or metacity or something else so my answer might not work.

----------


## greco

Here's another one...

I'm running Elegant-Brit and I love it. The only thing is that I would like to have the dark gray border around the windows as opposed to the default white. I tried searching the intraweb to find which settings I need to change in the gtkrc to get the border color I want but I am SOL.

Does anyone know the attributes I need to add to the gtkrc file to change the border color of windows (gnome-terminal, firefox, etc..)

Thanks in advance.

----------


## bander013

As I was able to find out, bg[INSENSITIVE] is a color of RB menu, Main menu and url-guess-popup variants in Firefox

My problem is I can't change only color for 'url-guess-popup' background

I don't actually know what 'url-guess-popup' real name. If you start type some firefox url in address bar, it will roll down with variants, that's it. And I desperately need to change it bg color.

Please, give me a hand X)

----------


## AzureCerulean

Look at The Widget Laboratory, a Gtk theme viewer/editor.


http://blog.mahboy.com/archives/174

it's not so much an editor but a viewer loader, that lets you instantly see changes you have made to your thme.

I have searched everywhere and this is the closest thing I can find at this time.

----------


## lion833

:Surprised:  :Surprised:  :Surprised: 

It's perfect tutorial, I have to learn it, thanks very much！

----------


## acidrums4

I have a question... How do I change the text color of cell items in a treeview, but only the cell items (without changing text[NORMAL] for the theme defaults?

Sorry for my bad-level english!

----------


## at_pradeep

nice thread!...

I am experimenting with pixmap engine. 

How can i archive following things:

1. Alternate row color for GtkMenuItems.
2. Set bold font for GtkEntry or whole of the application?
3. Set Background image to GtkTextView Widget.

I tried some test but every thing seems to fail.
can some one please explain this to me.


Thanks,
PP.

----------


## dannymichel

With your help, i edited Rezlooks-Soft-Gray

----------


## dannymichel

Noob question; i'm trying to have menu bar items 'etched-in'. can anyone help me with that?

----------


## crimesaucer

> Here's another one...
> 
> I'm running Elegant-Brit and I love it. The only thing is that I would like to have the dark gray border around the windows as opposed to the default white. I tried searching the intraweb to find which settings I need to change in the gtkrc to get the border color I want but I am SOL.
> 
> Does anyone know the attributes I need to add to the gtkrc file to change the border color of windows (gnome-terminal, firefox, etc..)
> 
> Thanks in advance.


Are you talking about the window borders with that 2 pixel white outline?... if you are then let me know which window manager you're using (xfwm4, metacity, emerald.. etc.)

If you use xfwm4 with xfce4 then you would need to edit the xpm files (very easy)... I'm not sure how to do it with metacity (could maybe figure it out?), and with and emerald theme it should be easy to fix.

----------


## lancerocke

> Are you talking about the window borders with that 2 pixel white outline?... if you are then let me know which window manager you're using (xfwm4, metacity, emerald.. etc.)
> 
> If you use xfwm4 with xfce4 then you would need to edit the xpm files (very easy)... I'm not sure how to do it with metacity (could maybe figure it out?), and with and emerald theme it should be easy to fix.


no, i don't mean windows border's but that would be nice to know too, for metacity and emerald. more importantly, i want to know how to have a white outline under the text, and not all around the text, making it looked 'etched it' 

and see where it says 'option' here?
it's only under the top text, not all around it

----------


## crimesaucer

> It's perfect tutorial, I have to learn it, thanks very much！


Thank you, the info is pretty old, and sort of incomplete... when I wrote this I was learning to theme gtkrc files through trial and error.

But like I said, I stopped writing themes for the xfce4 engine and pretty much just use the murrine engine cause it looks so nice and is very easy to figure out and customize.

Having recently switched to Gnome (less maintenance than the combo of xmonad and xfce4 that I had been using for the last few years), so this is one of my newer murrine looks:









> I have a question... How do I change the text color of cell items in a treeview, but only the cell items (without changing text[NORMAL] for the theme defaults?
> 
> Sorry for my bad-level english!



Sorry, I'm not sure.

----------


## crimesaucer

> no, i don't mean windows border's but that would be nice to know too, for metacity and emerald. more importantly, i want to know how to have a white outline under the text, and not all around the text, making it looked 'etched it' 
> 
> and see where it says 'option' here?
> it's only under the top text, not all around it


I'm not sure about the text... I see what you're saying... the only etched in/out shadows I know how to do is for toolbars and menubars by using:



```
GtkMenuBar::shadow_type           = out
GtkMenuItem::selected_shadow_type = none
GtkToolbar::shadow_type           = out
```

Sorry I can't help.

----------


## crimesaucer

> Noob question; i'm trying to have menu bar items 'etched-in'. can anyone help me with that?


Sorry, like the comments above I'm not sure how to do that. The only etched-in/out/none that I know of is these:



```
GtkMenuBar::shadow_type           = out
GtkMenuItem::selected_shadow_type = in
GtkToolbar::shadow_type           = none
```

----------


## lancerocke

> Thank you, the info is pretty old, and sort of incomplete... when I wrote this I was learning to theme gtkrc files through trial and error.
> 
> But like I said, I stopped writing themes for the xfce4 engine and pretty much just use the murrine engine cause it looks so nice and is very easy to figure out and customize.
> 
> Having recently switched to Gnome (less maintenance than the combo of xmonad and xfce4 that I had been using for the last few years), so this is one of my newer murrine looks:
> 
> 
> 
> 
> ...


what font is that? 8px?8.somethingpx? lucida? segoi?




> I'm not sure about the text... I see what you're saying... the only etched in/out shadows I know how to do is for toolbars and menubars by using:
> 
> 
> 
> ```
> GtkMenuBar::shadow_type           = out
> GtkMenuItem::selected_shadow_type = none
> GtkToolbar::shadow_type           = out
> ```
> ...


ok, np. i'll try to ask somewhere/one else.

----------


## crimesaucer

> what font is that? 8px?8.somethingpx? lucida? segoi?


the font is Lucida Grande:size=8 (from an Apple fonts package that I found a few years back), and the conky font is "LucidaConsole:size=7" from the same package.

----------


## lancerocke

> the font is Lucida Grande:size=8 (from an Apple fonts package that I found a few years back), and the conky font is "LucidaConsole:size=7" from the same package.


cool. is 8px the default mac size, do you think?

----------


## crimesaucer

> cool. is 8px the default mac size, do you think?


I'm not sure, I've never used a mac before.

----------


## PhotonicGuy

Nice topic! I'll try it myself

----------


## lancerocke

is there a way to control font line spacing in gtk themes?

----------


## mitra_jit2005

y isn't this post made a sticky yet ??? i ws searching for this, for a year nw...wl post my themes within few dayzzz..

----------


## Crazedpsyc

I realize this is rather old, but before I start a new thread I want to check: Do you know how to let the gnome appearance editor change the colors? I tried using   base[PRELIGHT]    = "*"
but that just made everything gray and ugly.
also: how can I specify the color for the text in the gnome menu? I got it to change, but it took all the button text with it

----------


## crimesaucer

> I realize this is rather old, but before I start a new thread I want to check: Do you know how to let the gnome appearance editor change the colors? I tried using   base[PRELIGHT]    = "*"
> but that just made everything gray and ugly.
> also: how can I specify the color for the text in the gnome menu? I got it to change, but it took all the button text with it


Use a "gtk_color_scheme =" line at the very top of your gtkrc (look below). The gnome-appearance-editor will be able to edit the colors of your theme (be sure to use the "\n" like is shown below):

This is an example from the popular "murrine glow orange" (not one of mine)


```
# This can be overriden (via an xsetting) with eg. the gnome-appearance-properties.
gtk_color_scheme = "fg_color:#222222\nbg_color:#dedede\nbase_color:#f5f5f5\ntext_color:#292929\nselected_bg_color:#db6b2a\nselected_fg_color:#ffffff\ntooltip_bg_color:#efe6c3\ntooltip_fg_color:#333333"
```

The "gtk_color_scheme =" line is used throughout the gtkrc like this:



```
        fg[NORMAL]        = @fg_color
	fg[PRELIGHT]      = @fg_color
	fg[SELECTED]      = @selected_fg_color
	fg[INSENSITIVE]   = darker (@bg_color)
	fg[ACTIVE]        = @fg_color

	bg[NORMAL]		=  @bg_color
	bg[ACTIVE]		=  shade (1.02, @bg_color)
	bg[PRELIGHT]		=  shade (1.05, @bg_color)
	bg[SELECTED]		=  @selected_bg_color
	bg[INSENSITIVE]		=  shade (1.03,@bg_color)

	base[NORMAL]      = @base_color
	base[PRELIGHT]    = @base_color
	base[SELECTED]    = @selected_bg_color
	base[INSENSITIVE] = @bg_color
	base[ACTIVE]      = shade (0.9, @selected_bg_color)

	text[NORMAL]      = @text_color
	text[PRELIGHT]    = @text_color
	text[SELECTED]    = @selected_fg_color
	text[INSENSITIVE] = darker (@bg_color)
	text[ACTIVE]      = @selected_fg_color
```



Make sure you use these correct names of:

fg_color
bg_color
base_color
text_color
selected_bg_color
selected_fg_color
tooltip_bg_color
tooltip_fg_color


..... otherwise it won't work.



I don't use the correct names in my themes (so the "gnome color edit" doesn't work with my themes), since I like to use descriptive names in my gtkrc files: 

This is part of my gtkrc that shows my "gtk_color_scheme =" and the way I use it in the color part of the "style "default" :



```
gtk_color_scheme = "black_text:#000\ndark_menubar:#1D1D1F\ntext_editor_bg:#D0BCFD\nmenu_roll_over:#212124\ntoolbar_color:#e0e0e0\nbuttons:#e1e1e0\nstriped_progress_bar:#66458F\ninactive_tab:#C8BCE0\nopen_tab_bg:#D4C7ED\nwhite_text:#FFFFFF\ntext_neon_purple:#BCA2F9\nurl_outline:#AE75F6\ntext_insensitive:#5C507A\nbox_bg_trash:#BCA2F9"


fg[NORMAL]        = @black_text   # option menu, button font, open tab
fg[PRELIGHT]      = @black_text # font color of menurollover and rollover for radio/check boxes as well as button,Optionbutton,andtogglebutton prelights.
fg[SELECTED]      = @box_bg_trash # Gtkcombo font on dropdown selection - NOT GTK COMBO BOX!   
fg[ACTIVE]        = @black_text # pre-toggle font color, and active pre-toggle font for check/radio boxes, also for un-clicked regular tabs.
fg[INSENSITIVE]   = @text_insensitive # little arrows on scrolls

bg[NORMAL]        = shade (1.00, @toolbar_color) ## "#E2E2E2"
bg[PRELIGHT]      = shade (1.00, @box_bg_trash) ## background of text toggle mouse-over
bg[SELECTED]      = shade (1.00, @striped_progress_bar)      # menu selected roll over, and xfwm4 color 
bg[INSENSITIVE]   = @toolbar_color     # background scroll arrows
bg[ACTIVE]        = shade (1.00, @inactive_tab) # this (strangely) controls inactive tab BGs

base[NORMAL]      = @text_editor_bg     ## "#FFFFFF"
base[PRELIGHT]    = shade (1.00, @toolbar_color)     ## "#878887"
base[ACTIVE]      = shade (1.00, @menu_roll_over)     ## thunar detailed view - off window
base[SELECTED]    = shade (1.00, @menu_roll_over)     ## thunar detailed view - on window
base[INSENSITIVE] = @toolbar_color     ## "#878887"

text[NORMAL]      = @black_text     # font color for combo box (lame setting)
text[PRELIGHT]    = @black_text     # changes the check mark in radio boxes 
text[ACTIVE]      = @text_neon_purple     ## "#000001"
text[SELECTED]    = @white_text      ## "#FFFFFF"
text[INSENSITIVE] = darker (@toolbar_color)     ## "#4b4440"
```

----------


## kyle.huff

> I have a question... How do I change the text color of cell items in a treeview, but only the cell items (without changing text[NORMAL] for the theme defaults?
> 
> Sorry for my bad-level english!


You would do something like this in your gtkrc file:

style "CellView"
{
  text[NORMAL]		= "#ffffff"
}

class "GtkCellView" style "CellView"

widget_class "*CellView*"   style "CellView"
class "*CellView*"          style "CellView"

Hope that helps

----------


## Crazedpsyc

Thanks guys! It did help a lot! But look at this:



> gtk_color_scheme = "fg_color:#FF8576\nbg_color:#ffffff\nbase_color:#1  f1f1f\nselected_bg_color:#4f4e57\nselected_fg_colo  r:#ffffff"
> style "dark-alloy-default"
> {
>     GtkWidget::focus_padding = 0
> 
>     GtkFrame::shadow_type = GTK_SHADOW_OUT
>     GtkScrolledWindow::shadow_type = GTK_SHADOW_OUT
>     GtkMenuBar::shadow_type = GTK_SHADOW_OUT
>     GtkToolbar::shadow_type = GTK_SHADOW_OUT
> ...


it makes everything grey and black (the default gnome) and the colors still won't change. I used almost the exact same thing (different colors) for another theme, and it works great.
EDIT: yeah I missed the @, oops, now it works, but still don't know this:
also, where do I put (and what do I call) the thingies with the @s and stuff for "Tooltips:"

----------

