# This file is part of sdk-default-theme-config
# 
# Copyright (C) 2005 Nokia Corporation.
# 
# Contact: Ferenc Szekely <ferenc.szekely@nokia.com> 
# 
# This work is licensed under the Creative Commons
# Attribution-NonCommercial-ShareAlike 2.0 License.
# To view a copy of this license,
# visit http://creativecommons.org/licenses/by-nc-sa/2.0/
# or send a letter to Creative Commons,
# 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA.


# Theming for both GtkTreeView and GtkListView.
include "themespecificgtk"
                                                                                                                                     

style "osso-listview" = "osso-logical-colors"
{

  text[ACTIVE] = "DefaultTextColor"

  GtkTreeView::odd_row_color = "DefaultBackgrdColor"
  GtkTreeView::even_row_color = "DefaultBackgrdColor"
  GtkTreeView::expander-size = 0
  GtkTreeView::expander-indent = 8
  GtkTreeView::horizontal-separator = 6
  GtkTreeView::vertical-separator = 2	  
  GtkTreeView::hildonlike = 1
  GtkTreeView::passive_focus = 1

  engine "sapwood"
  {
    image
      {
        function        = CHECK
        state           = INSENSITIVE
        shadow          = IN
        detail          = "cellcheck"
        overlay_file    = "../images/qgn_plat_check_box_selected_disabled.png"
        overlay_border  = { 0, 0, 0, 0 }
        overlay_stretch = FALSE
      }
    image
      {
        function        = CHECK
        state           = SELECTED
        shadow          = IN
        detail          = "cellcheck"
        overlay_file    = "../images/qgn_plat_check_box_selected_focused.png"
        overlay_border  = { 0, 0, 0, 0 }
        overlay_stretch = FALSE
      }  
    image
      {
        function        = CHECK
        state           = ACTIVE
        shadow          = IN
        detail          = "cellcheck"
        overlay_file    = "../images/qgn_plat_check_box_selected_focused.png"
        overlay_border  = { 0, 0, 0, 0 }
        overlay_stretch = FALSE
      }  
    image
      {
        function        = CHECK
        state           = PRELIGHT
        shadow          = IN
        detail          = "cellcheck"
        overlay_file    = "../images/qgn_plat_check_box_selected_normal.png"
        overlay_border  = { 0, 0, 0, 0 }
        overlay_stretch = FALSE
      }  
    image
      {
        function        = CHECK
        state           = NORMAL
        shadow          = IN
        detail          = "cellcheck"
        overlay_file    = "../images/qgn_plat_check_box_selected_normal.png"
        overlay_border  = { 0, 0, 0, 0 }
        overlay_stretch = FALSE
      }  
    image
      {
        function        = CHECK
        state           = INSENSITIVE
        shadow          = OUT
        detail          = "cellcheck"
        overlay_file    = "../images/qgn_plat_check_box_empty_disabled.png"
        overlay_border  = { 0, 0, 0, 0 }
        overlay_stretch = FALSE
      }
    image
      {
        function        = CHECK
        state           = SELECTED
        shadow          = OUT
        detail          = "cellcheck"
        overlay_file    = "../images/qgn_plat_check_box_empty_focused.png"
        overlay_border  = { 0, 0, 0, 0 }
        overlay_stretch = FALSE
      }  
    image
      {
        function        = CHECK
        state           = ACTIVE
        shadow          = OUT
        detail          = "cellcheck"
        overlay_file    = "../images/qgn_plat_check_box_empty_focused.png"
        overlay_border  = { 0, 0, 0, 0 }
        overlay_stretch = FALSE
      }  
    image
      {
        function        = CHECK
        state           = PRELIGHT
        shadow          = OUT
        detail          = "cellcheck"
        overlay_file    = "../images/qgn_plat_check_box_empty_normal.png"
        overlay_border  = { 0, 0, 0, 0 }
        overlay_stretch = FALSE
      }  
    image
      {
        function        = CHECK
        state           = NORMAL
        shadow          = OUT
        detail          = "cellcheck"
        overlay_file    = "../images/qgn_plat_check_box_empty_normal.png"
        overlay_border  = { 0, 0, 0, 0 }
        overlay_stretch = FALSE
      }  
    image
      {
        function        = CHECK
        state           = NORMAL
        detail          = "cellcheck"
        overlay_file    = "../images/qgn_plat_check_box_empty_normal.png"
        overlay_border  = { 0, 0, 0, 0 }
        overlay_stretch = FALSE
      }
    image
      {
        function        = CHECK
        state           = PRELIGHT
        detail          = "cellcheck"
        overlay_file    = "../images/qgn_plat_check_box_empty_normal.png"
        overlay_border  = { 0, 0, 0, 0 }
        overlay_stretch = FALSE
      }
    image
      {
        function        = CHECK
        state           = ACTIVE
        detail          = "cellcheck"
        overlay_file    = "../images/qgn_plat_check_box_selected_normal.png"
        overlay_border  = { 0, 0, 0, 0 }
        overlay_stretch = FALSE
      }
    image
      {
        function        = CHECK
        state           = SELECTED
        detail          = "cellcheck"
        overlay_file    = "../images/qgn_plat_check_box_selected_normal.png"
        overlay_border  = { 0, 0, 0, 0 }
        overlay_stretch = FALSE
      }
    image
      {
        function        = CHECK
        state           = INSENSITIVE
        detail          = "cellcheck"
        overlay_file    = "../images/qgn_plat_check_box_empty_normal.png"
        overlay_border  = { 0, 0, 0, 0 }
        overlay_stretch = FALSE
      }
    image
    {
      function = FLAT_BOX
      state    = SELECTED
      detail = "left"
      file = "../images/qgn_plat_focus_left_selection.png"
      border = { 2, 0, 2, 2 }
      stretch = TRUE
    }
    image
    {
      function = FLAT_BOX
      state    = SELECTED
      detail = "middle"
      file = "../images/qgn_plat_focus_middle_selection.png"
      border = { 0, 0, 2, 2 }
      stretch = TRUE
    }
    image
    {
      function = FLAT_BOX
      state    = SELECTED
      detail = "right"
      file = "../images/qgn_plat_focus_right_selection.png"
      border = { 0, 2, 2, 2 }
      stretch = TRUE
    }
    image
    {
      function = FLAT_BOX
      state    = SELECTED
      detail = "full"
      file = "../images/qgn_plat_focus_selection.png"
      border = { 2, 2, 2, 2 }
      stretch = TRUE
    }
    image
    {
      function = FOCUS
      detail = "left"
      file = "../images/qgn_plat_focus_left_active.png"
      border = { 2, 0, 2, 2 }
      stretch = TRUE
    }
    image
    {
      function = FOCUS
      detail = "middle"
      file = "../images/qgn_plat_focus_middle_active.png"
      border = { 0, 0, 2, 2 }
      stretch = TRUE
    }
    image
    {
      function = FOCUS
      detail = "right"
      file = "../images/qgn_plat_focus_right_active.png"
      border = { 0, 2, 2, 2 }
      stretch = TRUE
    }
    image
    {
      function = FOCUS
      detail = "full"
      file = "../images/qgn_plat_focus_active.png"
      border = { 2, 2, 2, 2 }
      stretch = TRUE
    }
    image
    {
      function = FOCUS
      detail = "treeview-drop-indicator-left"
      file = "../images/qgn_plat_focus_left_active.png"
      border = { 2, 0, 2, 2 }
      stretch = TRUE
    }
    image
    {
      function = FOCUS
      detail = "treeview-drop-indicator-middle"
      file = "../images/qgn_plat_focus_middle_active.png"
      border = { 0, 0, 2, 2 }
      stretch = TRUE
    }
    image
    {
      function = FOCUS
      detail = "treeview-drop-indicator-right"
      file = "../images/qgn_plat_focus_right_active.png"
      border = { 0, 2, 2, 2 }
      stretch = TRUE
    }
    image
    {
      function = FOCUS
      detail = "treeview-drop-indicator"
      file = "../images/qgn_plat_focus_active.png"
      border = { 2, 2, 2, 2 }
      stretch = TRUE
    }
  }
}

class "GtkTreeView" style "osso-listview"
class "GtkListView" style "osso-listview"

style "osso-no-checkbox-mode"
{
  GtkTreeView::hildonlike = 1
  GtkTreeView::passive_focus = 1
  engine "sapwood"
  {
    image
      {
        function        = CHECK
        state           = SELECTED
	shadow          = IN
        detail          = "cellcheck"
        overlay_file    = "../images/qgn_plat_check_box_selected_normal.png"
        overlay_border  = { 0, 0, 0, 0 }
        overlay_stretch = FALSE
      }
    image
      {
        function        = CHECK
        state           = SELECTED
	shadow          = OUT
        detail          = "cellcheck"
        overlay_file    = "../images/qgn_plat_check_box_empty_normal.png"
        overlay_border  = { 0, 0, 0, 0 }
        overlay_stretch = FALSE
      }
  }
}
widget "*no_checkbox_mode*" style "osso-no-checkbox-mode"

class "GtkTreeView" style "osso-SystemFont"
class "GtkListView" style "osso-SystemFont"
widget_class "*.GtkTreeView*" style "osso-SystemFont"
widget_class "*.GtkListView*" style "osso-SystemFont"

# for drawing listbox headers correctly
# (i.e. button looks like header text + horizontal separator)
style "osso-listboxheader"
{
  GtkButton::listboxheader = 1
  GtkButton::separator-height = 4
  engine "sapwood"
    {
      image
        {
          function        = HLINE
          file            = "../images/qgn_plat_separator_horizontal.png"
          border          = { 12, 12, 0, 2 }
          stretch         = TRUE
        }
    }
}
widget_class "*.GtkTreeView.GtkButton" style "osso-listboxheader"

################################
# Passive focus to GtkTreeView
################################

style "osso-focus"
{
	engine "sapwood"
	{
		image
		{
			function = FOCUS
                        detail = "left"
			file = "../images/qgn_plat_focus_left_passive.png"
			border = { 2, 0, 2, 2 }
			stretch = TRUE
		}		
		image
		{
			function = FOCUS
                        detail = "middle"
			file = "../images/qgn_plat_focus_middle_passive.png"
			border = { 0, 0, 2, 2 }
			stretch = TRUE
		}		
		image
		{
			function = FOCUS
                        detail = "right"
			file = "../images/qgn_plat_focus_right_passive.png"
			border = { 0, 2, 2, 2 }
			stretch = TRUE
		}		
		image
		{
			function = FOCUS
                        detail = "full"
			file = "../images/qgn_plat_focus_passive.png"
			border = { 2, 2, 2, 2 }
			stretch = TRUE
		}		
	}
}
widget "hildon-focus" style "osso-focus"
