# 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.


####################################################  
# GTK COMBO BOX (ChoiceList & ComboBox)
#
# This file has the themeing of comboboxes.
#
# The choicelist version of combobox which only
# allows selection, not edition is named GtkComboBox
# and is actually just one big GtkButton that has text
# inside it. Therefore one image per state is enough
# for it.
#
# The combobox version that allows editing of the text
# is named GtkComboBoxEntry and consists of two parts:
# A GtkButton and GtkEntry. These have to be themed
# separately.
#
# Additionally, when a combobox is in a toolbar,
# it will use different graphics that show the arrow
# pointing upwards.
#
#################################################### 

####################################################
#
# Styles common for all ComboBox types
#
####################################################

style "osso-combobox-base" {

  GtkWidget::focus-line-width = 0
  GtkWidget::focus-padding = 0
  GtkWidget::focus-line-pattern = "\0\0\0\0\0\0\0\0"
  GtkComboBox::hildonlike = 1
  GtkComboBox::arrow-width = 26
  GtkComboBox::arrow-height = 30
  GtkComboBox::autodimmed_button = 1

}
widget "GtkComboBox" style "osso-combobox-base"

style "osso-combobox-base-button" {
  
  xthickness = 1
  ythickness = 1

  GtkToggleButton::hildonlike = 1
  GtkButton::minimum_width = 26
  GtkWidget::focus-line-width = 0
  GtkWidget::focus-padding = 0
  GtkWidget::focus-line-pattern = "\0\0\0\0\0\0\0\0"

}
widget "GtkComboBox.GtkToggleButton" style "osso-combobox-base-button" 
widget "GtkComboBoxEntry.GtkToggleButton" style "osso-combobox-base-button" 

class "*GtkComboBox" style "osso-SystemFont"
class "GtkComboBoxEntry" style "osso-SystemFont"
widget_class "*GtkComboBox.*" style "osso-SystemFont"

###################################################
#
# Styles for non-entry ComboBox
#
###################################################

style "osso-combobox-down" {

  ythickness = 1
	engine "sapwood" {

#		image {
#			function = FOCUS
#			file = "../images/qgn_plat_listbox_arrow_with_border_down_pressed.png"
#			state = ACTIVE
#			border = { 2, 34, 0, 0 }
#			stretch = TRUE
#		}
#		image {
#			function = FOCUS
#			file = "../images/qgn_plat_listbox_arrow_with_border_down_normal.png"
#			border = { 2, 34, 0, 0 }
#			stretch = TRUE
#		}
#		image {
#			function = BOX
#			file = "../images/qgn_plat_listbox_arrow_with_border_down_disabled.png"
#			state = INSENSITIVE
#			border = { 2, 34, 0, 0 }
#			stretch = TRUE
#		}
#		image {
#			function = BOX
#			file = "../images/qgn_plat_listbox_arrow_with_border_down_pressed.png"
#			state = ACTIVE
#			border = { 2, 34, 0, 0 }
#			stretch = TRUE
#		}
#		image {
#			function = BOX
#			file = "../images/qgn_plat_listbox_arrow_with_border_down_normal.png"
#			border = { 2, 34, 0, 0 }
#			stretch = TRUE
#		}
		image {
			function = TAB
		}
	}
}
widget "*.GtkComboBox.GtkToggleButton" style "osso-combobox-down"

# Different themeing to combobox when it's in a toolbar. In this case the
# arrow points upwards.
style "osso-combobox-up" {

  ythickness = 1
	engine "sapwood" {

#		image {
#			function = FOCUS
#			file = "../images/qgn_plat_listbox_arrow_with_border_up_pressed.png"
#			state = ACTIVE
#			border = { 2, 34, 0, 0 }
#			stretch = TRUE
#		}
#		image {
#			function = FOCUS
#			file = "../images/qgn_plat_listbox_arrow_with_border_up_normal.png"
#			border = { 2, 34, 0, 0 }
#			stretch = TRUE
#		}
#		image {
#			function = BOX
#			file = "../images/qgn_plat_listbox_arrow_with_border_up_disabled.png"
#			state = INSENSITIVE
#			border = { 2, 34, 0, 0 }
#			stretch = TRUE
#		}
#		image {
#			function = BOX
#			file = "../images/qgn_plat_listbox_arrow_with_border_up_pressed.png"
#			state = ACTIVE
#			border = { 2, 34, 0, 0 }
#			stretch = TRUE
#		}
#		image {
#			function = BOX
#			file = "../images/qgn_plat_listbox_arrow_with_border_up_normal.png"
#			border = { 2, 34, 0, 0 }
#			stretch = TRUE
#		}
		image {
			function = TAB
		}
	}

}
widget "*.GtkToolItem.*GtkComboBox.GtkToggleButton" style "osso-combobox-up"
widget "*.GtkToolItem.*GtkComboBoxEntry.GtkToggleButton" style "osso-combobox-up"

###################################################
#
# Styles for ComboBoxEntry
#
###################################################

# We have a base style for combobox-entry too, because we
# might have a different looking search combobox.

style "osso-combobox-entry-base" {

  GtkEntry::hildonlike = 1
  GtkEntry::horizontal-border = 6
  GtkEntry::vertical-border = 0
  GtkEntry::show-last-char = 1

}
widget_class "*.GtkComboBoxEntry.*GtkEntry" style "osso-combobox-entry-base"

# We don't need gtk+ to draw it's arrow. The button drawing is enough for us.

style "osso-combobox-entry-arrow"
{
	engine "sapwood" {
		image {
			function = ARROW
		}
	}
}
widget_class "*.GtkComboBoxEntry.*.GtkArrow" style "osso-combobox-entry-arrow"

# The keyboard suffix is used for normal, ediable combobox

style "osso-combobox-entry-border-keyboard" {

  # Icon width, how many pixels the text start is moved to the
  # right in entry 
  GtkEntry::icon_width = 31
  
  engine "sapwood" {
    image {
      function = BOX
      state = INSENSITIVE
      file = "../images/qgn_plat_listbox_border_with_icon_disabled.png"
      border = { 33, 2, 0, 0 }
      stretch = TRUE
    }
    image {
      function = BOX
      file = "../images/qgn_plat_listbox_border_with_icon_normal.png"
      border = { 33, 2, 0, 0 }
      stretch = TRUE
    }
  }      
}
widget_class "*.GtkComboBoxEntry.*GtkEntry" style "osso-combobox-entry-border-keyboard"

# The find suffix is used for ediable combobox in find toolbar
style "osso-combobox-entry-border-find" {

  # Icon width, how many pixels the text start is moved to the
  # right in entry 
  GtkEntry::icon_width = 31

  engine "sapwood" {
    image {
      function = BOX
      state = INSENSITIVE
      file = "../images/qgn_plat_listbox_border_with_icon_find_disabled.png"
      border = { 33, 2, 0, 0 }
      stretch = TRUE
    }
    image {
      function = BOX
      file = "../images/qgn_plat_listbox_border_with_icon_find_normal.png"
      border = { 33, 2, 0, 0 }
      stretch = TRUE
    }
  }      
}
widget_class "*.HildonFindToolbar.*.GtkComboBoxEntry.*GtkEntry" style "osso-combobox-entry-border-find"

style "osso-combobox-entry-button-down" {

  xthickness = 1
  GtkButton::minimum_width = 26
  
	engine "sapwood" {

		image {
			function = BOX
			file = "../images/qgn_plat_listbox_arrow_down_disabled.png"
			state = INSENSITIVE
			border = { 0, 0, 0, 0 }
			stretch = TRUE
		}
		image {
			function = BOX
			file = "../images/qgn_plat_listbox_arrow_down_pressed.png"
			state = ACTIVE
			border = { 0, 0, 0, 0 }
			stretch = TRUE
		}
		image {
			function = BOX
			file = "../images/qgn_plat_listbox_arrow_down_normal.png"
			border = { 0, 0, 0, 0 }
			stretch = TRUE
		}
		image {
			function = TAB
		}
	}
}
widget_class "*.GtkComboBoxEntry.GtkToggleButton" style "osso-combobox-entry-button-down"

# Different themeing to combobox when it's in a toolbar. In this case the
# arrow points upwards.
style "osso-combobox-entry-button-up" {

  xthickness = 1
  GtkButton::minimum_width = 26
	engine "sapwood" {

		image {
			function = BOX
			file = "../images/qgn_plat_listbox_arrow_up_disabled.png"
			state = INSENSITIVE
			border = { 0, 0, 0, 0 }
			stretch = TRUE
		}
		image {
			function = BOX
			file = "../images/qgn_plat_listbox_arrow_up_pressed.png"
			state = ACTIVE
			border = { 0, 0, 0, 0 }
			stretch = TRUE
		}
		image {
			function = BOX
			file = "../images/qgn_plat_listbox_arrow_up_normal.png"
			border = { 0, 0, 0, 2 }
			stretch = TRUE
		}
		image {
			function = TAB
		}
	}

}
widget "*.GtkToolbar.GtkComboBoxEntry.GtkToggleButton" style "osso-combobox-entry-button-up"
