Page 15 of 15 FirstFirst ... 5131415
Results 141 to 143 of 143

Thread: A Beginner "How To" for gtkrc themes.

  1. #141
    Join Date
    Jan 2006
    Beans
    1,352

    Re: A Beginner "How To" for gtkrc themes.

    Quote Originally Posted by Crazedpsyc View Post
    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)
    Code:
    # 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:

    Code:
            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" :

    Code:
    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"
    Last edited by crimesaucer; June 2nd, 2010 at 05:01 AM.

  2. #142
    Join Date
    Jun 2010
    Beans
    1

    Re: A Beginner "How To" for gtkrc themes.

    Quote Originally Posted by acidrums4 View Post
    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

  3. #143
    Join Date
    Mar 2010
    Location
    /var/local
    Beans
    401
    Distro
    Ubuntu Development Release

    Re: A Beginner "How To" for gtkrc themes.

    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

    GtkTreeView:dd_row_color = "#424242"
    GtkTreeView::even_row_color = "#000000"

    bg_pixmap[NORMAL] = "default_seamless.png"

    xthickness = 2
    ythickness = 2

    fg[NORMAL] = @fg_color
    fg[PRELIGHT] = "#d8d8d8"
    fg[ACTIVE] = "#d8d8d8"
    fg[SELECTED] = @selected_fg_color
    fg[INSENSITIVE] = "#404040"

    bg[NORMAL] = @bg_color
    bg[PRELIGHT] = "#A08350"
    bg[ACTIVE] = "#4f4e57"
    bg[SELECTED] = @selected_bg_color
    bg[INSENSITIVE] = "#27282f"

    text[NORMAL] = "#FF8576"
    text[PRELIGHT] = "#ffffff"
    text[ACTIVE] = "#ffffff"
    text[SELECTED] = "#ffffff"
    text[INSENSITIVE] = "#264372"

    base[NORMAL] = base_color
    base[PRELIGHT] = "#5073A0"
    base[ACTIVE] = "#4f4e57"
    base[SELECTED] = "#4f4e57"
    base[INSENSITIVE] = "#27282f"
    ...
    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:"

Page 15 of 15 FirstFirst ... 5131415

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •