####################################################  
# GTK COMBO BOX (ComboBox and ComboBoxEntry)
#
# Copyright 2004, 2005, 2006 Nokia Oyj
#
# This file has the themeing of comboboxes.
#
# The combobox 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.
#
#################################################### 

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::minimum-width = 150
  GtkComboBox::autodimmed_button = 1
  GtkComboBox::appears-as-list = 1

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

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

style "osso-combobox-button" {
  GtkToggleButton::hildonlike = 1
    engine "sapwood" {

        image {
            function = FOCUS
        }
        image {
            function = BOX
            file = "../images/qgn_plat_combobox_button_disabled.png"
            state = INSENSITIVE
            border = { 0, 0, 0, 0 }
            stretch = TRUE
        }
        image {
            function = BOX
            file = "../images/qgn_plat_combobox_button_pressed.png"
            state = ACTIVE
            border = { 0, 0, 0, 0 }
            stretch = TRUE
        }
        image {
            function = BOX
            file = "../images/qgn_plat_combobox_button_normal.png"
            border = { 0, 0, 0, 0 }
            stretch = TRUE
        }
        image {
            function = TAB
        }
    }
}
widget_class "*.GtkComboBox.GtkToggleButton" style "osso-combobox-button"


style "osso-combobox-frame" {

   # GtkFrame::hildonlike = 1
   ythickness = 1

    engine "sapwood" {

        image {
            function = FOCUS
        }
        image {
            function = BOX
            file = "../images/qgn_plat_combobox_frame_disabled.png"
            state = INSENSITIVE
            border = { 2, 2, 0, 0 }
            stretch = TRUE
        }
        image {
            function = BOX
            file = "../images/qgn_plat_combobox_frame_normal.png"
            border = { 2, 2, 0, 0 }
            stretch = TRUE
        }
    }
}
widget_class "*.GtkComboBox.GtkFrame" style "osso-combobox-frame"


###################################################
#
# 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 = 4
  GtkEntry::vertical-border = 0
  GtkEntry::show-last-char = 1

  GtkEntry::icon_width = 0
}
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 "*.GtkComboBox.GtkToggleButton.GtkArrow" style "osso-combobox-entry-arrow"
widget_class "*.GtkComboBoxEntry.GtkToggleButton.GtkArrow" style "osso-combobox-entry-arrow"


style "osso-combobox-entry-entry" {

  engine "sapwood"
    {
      image
        {
	  function = BOX
	  state    = INSENSITIVE
  	  file = "../images/qgn_plat_listbox_border_with_icon_disabled.png"
	  border   = { 2, 2, 0, 0 }
	  stretch  = TRUE
	}
      image
        {
	  function = BOX
  	  file = "../images/qgn_plat_listbox_border_with_icon_normal.png"
	  border   = { 2, 2, 0, 0 }
	  stretch  = TRUE
	}
    }
}

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

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

	engine "sapwood" {
		image {
			function = FOCUS
			file = "../images/qgn_plat_listbox_arrow_down_pressed.png"
			state = ACTIVE
			border = { 0, 0, 0, 0 }
			stretch = TRUE
		}
		image {
			function = FOCUS
			file = "../images/qgn_plat_listbox_arrow_down_normal.png"
			border = { 0, 0, 0, 0 }
			stretch = TRUE
		}
		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" {

	engine "sapwood" {
		image {
			function = FOCUS
			file = "../images/qgn_plat_listbox_arrow_up_pressed.png"
			state = ACTIVE
			border = { 0, 0, 0, 0 }
			stretch = TRUE
		}
		image {
			function = FOCUS
			file = "../images/qgn_plat_listbox_arrow_up_normal.png"
			border = { 0, 0, 0, 0 }
			stretch = TRUE
		}
		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, 0 }
			stretch = TRUE
		}
		image {
			function = TAB
		}
	}

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