# Absolutely Tango by pakos ja@pakos.biz | http://pakos.biz
# based on absolute gtk and Tango palette
# Set GtkSettings color scheme property.
# This can be overriden (via an xsetting) with eg. the gnome-appearance-properties.

gtk_color_scheme = "fg_color:#333333\nbg_color:#eeeee3\ntext_color:#333333\nbase_color:#ffffff\nselected_fg_color:#ffffff\nselected_bg_color:#a40000\ntooltip_fg_color:#333333\ntooltip_bg_color:#eeeee3"


gtk-icon-sizes = "panel-menu=16,16:panel=16,16:gtk-button=16,16:gtk-large-toolbar=16,16:gtk-small-toolbar=16,16"

gtk-button-images = 0
gtk-auto-mnemonics = 1
gtk-menu-popup-delay = 50
gtk-toolbar-style = 0


style "murrine-default" {
  ########
  # Style Properties
  ########
######################
  #GtkWidget         ::new-tooltip-style     = 1
  GtkButton         ::child-displacement-x  = 1
  GtkButton         ::child-displacement-y  = 1
  GtkButton         ::default-border        = { 0, 0, 0, 0 }
  GtkCheckButton    ::indicator-size        = 14

  GtkPaned          ::handle-size           = 6

  GtkRange          ::trough-border         = 0
  GtkRange          ::slider-width          = 13
  GtkRange          ::stepper-size          = 13
  GtkRange          ::stepper-spacing       = 1
  GtkRange          ::activate-slider       = 1
  GtkRange          ::arrow-displacement-x  = 1
  GtkRange          ::arrow-displacement-y  = 1
  GtkRange          ::arrow-scaling         = 0.7

  GtkScale          ::slider-length         = 25
  GtkScale          ::trough-side-details   = 0
  GtkScrollbar      ::min-slider-length     = 30
  GtkScrolledWindow ::scrollbar-spacing     = 3

  GtkMenuBar        ::internal-padding      = 2
  GtkExpander       ::expander-size         = 16
  GtkToolbar        ::internal-padding      = 1
  GtkTreeView       ::expander-size         = 14
  GtkTreeView       ::vertical-separator    = 0

  GtkMenu           ::horizontal-padding    = 0
  GtkMenu           ::vertical-padding      = 0

  GtkNotebook       ::tab-overlap           = -1

  # The following line hints to gecko (and possibly other appliations)
  # that the entry should be drawn transparently on the canvas.
  # Without this, gecko will fill in the background of the entry.
  GtkEntry::honors-transparent-bg-hint      = 1
  GtkEntry::state-hint                      = 0

  GtkEntry::progress-border                 = { 2, 2, 2, 2 }

  # GtkProgressBar::min-horizontal-bar-height = 5
  # GtkProgressBar::min-vertical-bar-width    = 5

  # Glow the tasklist by changing the color, instead of overlaying it
  # with a rectangle
  # WnckTasklist    ::fade-overlay-rect    = 0

  # Flat menubars and toolbar
  GtkMenuBar::shadow_type = GTK_SHADOW_NONE
  GtkToolbar::shadow_type = GTK_SHADOW_NONE
  GtkStatusbar::shadow_type = GTK_SHADOW_NONE

  xthickness = 1
  ythickness = 1

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

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

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

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

  engine "murrine" {
    animation           = TRUE
    arrowstyle          = 0      # Not filled arrows   
    colorize_scrollbar  = FALSE
    comboboxstyle       = 0      # not colored combobox below the arrow
    contrast            = 0.8    # 0.8 for less contrast, more than 1.0 for more
                                 # contrast on borders
    expanderstyle       = 2      # buttons with plus and minus
    focusstyle          = 3      # colored rectangle touching the borders
    glazestyle          = 0      # 0 = flat highlight, 1 = curved highlight,
                                 # 2 = concave style, 3 = top curved highlight,
                                 # 4 = beryl highlight
    gradient_shades     = { 1.01, 1.0, 1.0, 0.99 }
    handlestyle         = 0      # three simple lines
    highlight_shade     = 1.0    # set highlight amount for buttons or widgets
    lightborder_shade   = 1.2    # sets lightborder amount for buttons or widgets
    lightborderstyle    = 0      # 0 = lightborder on top side, 1 = lightborder
                                 # on all sides
    listviewheaderstyle = 0      # 0 = flat, 1 = glassy, 2 = raised
    listviewstyle       = 1      # 0 = nothing, 1 = dotted
    menubaritemstyle    = 1      # 0 = menuitem look, 1 = button look
    menubarstyle        = 0      # 0 = flat, 1 = glassy, 2 = gradient, 3 = striped
    menuitemstyle       = 0      # 0 = flat, 1 = glassy, 2 = striped
    menustyle           = 0      # 0 = no vertical menu stripe, 1 = display
                                 # vertical menu stripe
    progressbarstyle    = 0      # 0 = flat, 1 = stripped, 2 = blocks
    reliefstyle         = 0      # 0 = flat, 1 = inset, 2 = shadow
    rgba                = FALSE  # FALSE = disabled, TRUE = enabled
    roundness           = 0      # 0 = squared, 1 = old default, more will
                                 # increase roundness
    scrollbarstyle      = 2      # 0 = nothing, 1 = circles, 2 = handles,
                                 # 3 = diagonal stripes, 4 = diagonal stripes
                                 # and handles, 5 = horizontal stripes,
                                 # 6 = horizontal stripes and handles
    separatorstyle      = 1      # smooth separator
    sliderstyle         = 0      # 0 = nothing added, 1 = handles
    stepperstyle        = 1      # 0 = standard, 1 = integrated stepper handles,
                                 # 2 = unknown
    toolbarstyle        = 0      # 0 = flat, 1 = glassy, 2 = gradient
	}
}

style "murrine-nogap" {
  xthickness   = 0
  ythickness   = 0
}

style "murrine-wide" {
  xthickness   = 2
  ythickness   = 2
}

style "murrine-wider" {
  xthickness   = 3
  ythickness   = 3
}

style "murrine-button" {
  xthickness   = 3
  ythickness   = 3
  bg[NORMAL]   = shade (1.05, @bg_color)
  bg[ACTIVE]   = shade (0.95, @bg_color)
}

style "murrine-entry" {
  xthickness   = 3
  ythickness   = 3

  bg[SELECTED] = mix (0.4, @selected_bg_color, @base_color)
  fg[SELECTED] = @text_color

  engine "murrine" {
    border_shades = { 1.0, 1.0 }
    contrast      = .7
  }
}

style "murrine-notebook-bg" = "murrine-wider" {
  bg[NORMAL]   = shade (1.05, @bg_color)
  bg[ACTIVE]   = shade (0.95, @bg_color)
}

style "murrine-notebook" = "murrine-notebook-bg" {
}

style "murrine-tasklist" {
  xthickness   = 5
  ythickness   = 3
}

style "murrine-panel" {
}

style "murrine-menu" {
  xthickness   = 2
  ythickness   = 2
  fg[PRELIGHT] = @selected_fg_color
}

style "murrine-menu-item" {
  xthickness   = 3
  ythickness   = 3
  # bg[PRELIGHT] = @selected_bg_color # for menu's headers
}

style "murrine-separator-menu-item" {
  GtkSeparatorMenuItem::horizontal-padding = 0
  # We are setting the desired height by using wide-separators
  # There is no other way to get the odd height ...
  GtkWidget::wide-separators  = 1
  GtkWidget::separator-width  = 1
  GtkWidget::separator-height = 5
  xthickness   = 1
  ythickness   = 0
}

style "murrine-treeview" {
}

# Based on the default style so that the colors from the button
# style are overriden again.
style "murrine-treeview-header" = "murrine-button" {
  xthickness   = 2
  ythickness   = 1
}

style "murrine-frame-title" {
  fg[NORMAL]   = lighter (@fg_color)
}

style "murrine-tooltips" {
  xthickness   = 4
  ythickness   = 4

  bg[NORMAL]   = @tooltip_bg_color
  fg[NORMAL]   = @tooltip_fg_color
}

style "murrine-progressbar" {
  xthickness   = 2
  ythickness   = 2

  fg[PRELIGHT] = @selected_fg_color

  engine "murrine" {
    trough_border_shades = { .98, 1.1 }
  }
}

style "murrine-statusbar" {
  xthickness   = 2
  ythickness   = 2
}

style "murrine-comboboxentry" {
  # NOTE:
  # If you set the appears-as-list option on comboboxes in the theme
  # you should set this hint on the combobox instead.
}

style "murrine-spinbutton" {
}

style "murrine-scale" {
  GtkRange::slider-width  = 12
  GtkScale::slider-length = 12

  engine "murrine" {
    trough_border_shades = { .98, 1.1 }
  }
}

style "murrine-hscale" {
}

style "murrine-vscale" {
}

style "murrine-scrollbar" = "murrine-button" {
  GtkRange::trough-under-steppers = 0
  bg[NORMAL]   = shade (0.95, @bg_color)
}

style "murrine-menubar" {
  xthickness   = 2
  ythickness   = 2
}

style "murrine-low" {
  engine "murrine" {
    contrast   = 0.85
  }
}

style "murrine-nautilus-location" {
  bg[NORMAL]   = mix(0.60, shade (1.05,@bg_color), @selected_bg_color)
}

style "murrine-nautilus-sidebar" {
  GtkTreeView::odd_row_color    = @bg_color
  GtkTreeView::even_row_color   = @bg_color

  GtkPaned::handle_size         = 1
  GtkWidget::wide_separator     = 1
  GtkWidget::separator_width    = 1
  GtkWidget::separator_height   = 0
  GtkWidget::focus_line_width   = 0
  GtkWidget::draw_border        = { 0, 0, 0, 0 }

  # these make the padding from left window edge a little more sane
  GtkTreeView::vertical_separator   = 4
  GtkTreeView::horizontal_separator = 15
  GtkTreeView::indent-expanders     = 1 # 1 means TRUE
  GtkTreeView::expander-size        = 12
  GtkExpander::expander_spacing     = 16
  GtkButton::image_spacing          = 4
  xthickness                        = 8
  ythickness                        = 0
}

style "pixmap-nautilus-handle" {
  GtkPaned::handle-size = 1

  engine "pixmap" {
    image { # for the thin gray line separating the sidepane and viewpane
      function    = HANDLE
      recolorable = TRUE
      file        = "transparent_dot.png"
      stretch     = TRUE
      border      = { 0, 0, 0, 0 }
    }
  }
}

style "murrine-evo-new-button" {
  engine "murrine" {
    toolbarstyle = 1
  }
}

style "murrine-gedit-sidetoolbar" {
  GtkToolbar::shadow_type = GTK_SHADOW_NONE
}

#########################################
# Matches
#########################################

# Murrine default style is applied to every widget
class "GtkWidget"     style "murrine-default"

# Increase the x/ythickness in some widgets
class "GtkToolbar"    style "murrine-default"
class "GtkRange"      style "murrine-wide"
class "GtkFrame"      style "murrine-wide"
class "GtkSeparator"  style "murrine-wide"

class "GtkEntry"      style "murrine-entry"
class "GtkSpinButton" style "murrine-spinbutton"
class "GtkScale"      style "murrine-scale"
class "GtkVScale"     style "murrine-vscale"
class "GtkHScale"     style "murrine-hscale"
class "GtkScrollbar"  style "murrine-scrollbar"
class "GtkVScrollbar" style "murrine-scrollbar"
class "GtkHScrollbar" style "murrine-scrollbar"

# General matching following, the order is choosen so that the right styles
# override each other eg. progressbar needs to be more important then the
# menu match.

#Panel
widget "*PanelWidget*"      style "murrine-panel"
widget "*PanelApplet*"      style "murrine-panel"
widget "*fast-user-switch*" style "murrine-panel" # Workaround for
                                                  # Fast User Switch applet
class  "PanelApp*"          style "murrine-panel"
class  "PanelToplevel*"     style "murrine-panel"

# This is not perfect, it could be done better
# (That is modify *every* widget in the notebook, and change those back that
# we really don't want changed)
widget_class "*<GtkNotebook>*<GtkEventBox>"    style "murrine-notebook-bg"
widget_class "*<GtkNotebook>*<GtkDrawingArea>" style "murrine-notebook-bg"
widget_class "*<GtkNotebook>*<GtkLayout>"      style "murrine-notebook-bg"

widget_class "*<GtkButton>"                    style "murrine-button"
widget_class "*<GtkNotebook>"                  style "murrine-notebook"
widget_class "*<GtkStatusbar>*"                style : highest "murrine-statusbar"

widget_class "*<GtkComboBoxEntry>*"            style "murrine-comboboxentry"
widget_class "*<GtkCombo>*"                    style "murrine-comboboxentry"

widget_class "*<GtkMenu>*"                     style "murrine-menu"
widget_class "*<GtkMenuItem>*"                 style "murrine-menu-item"
widget_class "*<GtkMenuBar>*"                  style "murrine-menubar"
widget_class "*<GtkSeparatorMenuItem>*"        style "murrine-separator-menu-item"

widget_class "*.<GtkFrame>.<GtkLabel>"         style "murrine-frame-title"
widget_class "*.<GtkTreeView>*"                style "murrine-treeview"

widget_class "*<GtkProgressBar>"               style "murrine-progressbar"


# Treeview header
widget_class "*.<GtkTreeView>.<GtkButton>"     style "murrine-treeview-header"
widget_class "*.<GtkCTree>.<GtkButton>"        style "murrine-treeview-header"
widget_class "*.<GtkList>.<GtkButton>"         style "murrine-treeview-header"
widget_class "*.<GtkCList>.<GtkButton>"        style "murrine-treeview-header"

# Workarounds for Evolution
widget_class "*.ETable.ECanvas"                style "murrine-treeview-header"
widget_class "*.ETree.ECanvas"                 style "murrine-treeview-header"
widget_class "EShellWindow.GtkVBox.BonoboDock.BonoboDockBand.BonoboDockItem*" style "murrine-evo-new-button"

# Nautilus Places
widget_class "*Nautilus*Places*Sidebar*"       style "murrine-nautilus-sidebar"
widget_class "*Nautilus*Side*.GtkWidget"       style "murrine-nautilus-sidebar"
widget       "*Nautilus*Splitter"              style "pixmap-nautilus-handle"

# Toolbar appearance for Gedit sidepane
widget_class "*Gedit*Pane*"                    style "murrine-gedit-sidetoolbar"

# The window of the tooltip is called "gtk-tooltip"
################################
# FIXME:
# This will not work if one embeds eg. a button into the tooltip.
# As far as I can tell right now we will need to rework the theme
# quite a bit to get this working correctly.
# (It will involve setting different priorities, etc.)
################################
widget "gtk-tooltip*" style "murrine-tooltips"

###################################################
# Special cases and work arounds
###################################################

# Special case the nautilus-extra-view-widget
# ToDo: A more generic approach for all applications that have a widget like this.
widget "*.nautilus-extra-view-widget" style : highest "murrine-nautilus-location"

# Work around for http://bugzilla.gnome.org/show_bug.cgi?id=382646
# Note that the work around assumes that the combobox is _not_ in
# appears-as-list mode.
# Similar hack also in the menuitem style.
# This style does not affect GtkComboBoxEntry, it does have an effect
# on comboboxes in appears-as-list mode though.
style "murrine-text-is-fg-color-workaround" {
  text[NORMAL]      = @fg_color
  text[PRELIGHT]    = @fg_color
  text[SELECTED]    = @selected_fg_color
  text[ACTIVE]      = @fg_color
  text[INSENSITIVE] = darker (@bg_color)
}
widget_class "*.<GtkComboBox>.<GtkCellView>" style "murrine-text-is-fg-color-workaround"

style "murrine-menuitem-text-is-fg-color-workaround" {
  text[NORMAL]      = @fg_color
  text[PRELIGHT]    = @selected_fg_color
  text[SELECTED]    = @selected_fg_color
  text[ACTIVE]      = @fg_color
  text[INSENSITIVE] = darker (@bg_color)
}
widget "*.gtk-combobox-popup-menu.*" style "murrine-menuitem-text-is-fg-color-workaround"

# Work around the usage of GtkLabel inside GtkListItems to display text.
# This breaks because the label is shown on a background that is based on the
# base color set.
style "murrine-fg-is-text-color-workaround" {
  fg[NORMAL]        = @text_color
  fg[PRELIGHT]      = @text_color
  fg[ACTIVE]        = @selected_fg_color
  fg[SELECTED]      = @selected_fg_color
  fg[INSENSITIVE]   = darker (@bg_color)
}
widget_class "*<GtkListItem>*" style "murrine-fg-is-text-color-workaround"
# The same problem also exists for GtkCList and GtkCTree
# Only match GtkCList and not the parent widgets, because that would also
# change the headers.
widget_class "*<GtkCList>"     style "murrine-fg-is-text-color-workaround"
