#################################################### 
# GTK MENU (Menu)
#
# Copyright 2004,2005 Nokia Oyj
#
# The Menu is themed here. This file only themes
# the menu frames. The menu items and their
# variations are themed in separate *menuitem 
# rc files.
#
# There is possibility to have 3 different menu
# frame graphics depending on the situtation :
#  - Application menu. This may have sharp upper
#    corners to show that
#
#
# In osso menus look a bit different depending on 
# how they were activated. We need three different
# styles for GtkMenu widget
# o One with no osso specific theming (failsafe)
# o One with rectangular upper corners
# o One with round corners
#
# TODO: 
# Styles are not using right images yet!
#################################################### 

style "osso-menu" {

   GtkMenu::horizontal_padding = 18
   GtkMenu::vertical_padding = 18

   GtkMenu::hildonlike = 1
   GtkMenu::double_arrows = 1
   
   engine "sapwood" {
      image {
	 function = BOX
	 state = NORMAL
	 file = "../images/qgn_plat_application_menu_lower_level_frame.png"
	 border = { 20, 20, 20, 20 }
	 stretch = TRUE
      }
    image
      {
        function        = ARROW
	state           = ACTIVE
	arrow_direction = UP
	overlay_file    = "../images/qgn_plat_menu_scroll_up_arrow_pressed.png"
	overlay_stretch = FALSE
      }
    image
      {
        function        = ARROW
	state           = INSENSITIVE
	arrow_direction = UP
	overlay_file    = "../images/qgn_plat_menu_scroll_up_arrow_disabled.png"
	overlay_stretch = FALSE
      }
    image
      {
        function        = ARROW
	arrow_direction = UP
	overlay_file    = "../images/qgn_plat_menu_scroll_up_arrow_normal.png"
	overlay_stretch = FALSE
      }
    image
      {
        function        = ARROW
	state           = ACTIVE
	arrow_direction = DOWN
	overlay_file    = "../images/qgn_plat_menu_scroll_down_arrow_pressed.png"
	overlay_stretch = FALSE
      }
    image
      {
        function        = ARROW
	state           = INSENSITIVE
	arrow_direction = DOWN
	overlay_file    = "../images/qgn_plat_menu_scroll_down_arrow_disabled.png"
	overlay_stretch = FALSE
      }
    image
      {
        function        = ARROW
	arrow_direction = DOWN
	overlay_file    = "../images/qgn_plat_menu_scroll_down_arrow_normal.png"
	overlay_stretch = FALSE
      }
   }
}

style "osso-menu-with-corners" {

   GtkMenu::horizontal_padding = 18
   GtkMenu::vertical_padding = 18

   engine "sapwood" {
      image {
	  function = BOX
	  state = NORMAL
	  file = "../images/qgn_plat_application_menu_1st_level_frame.png"
	  border = { 20, 20, 20, 20 }
	  stretch = TRUE
      }
   }
}

style "osso-menu-without-corners" {

   GtkMenu::horizontal_padding = 18
   GtkMenu::vertical_padding = 18

   engine "sapwood" {
      image {
	 function = BOX
	 state = NORMAL
	 file = "../images/qgn_plat_application_menu_lower_level_frame.png"
	 border = { 20, 20, 20, 20 }
	 stretch = TRUE
      }
   }
}

style "osso-menu-from-navigator" {

   GtkMenu::horizontal_padding = 18
   GtkMenu::vertical_padding = 18

   engine "sapwood" {
      image {
	 function = BOX
	 state = NORMAL
	 file = "../images/qgn_plat_task_navigation_menu_frame.png"
	 border = { 20, 20, 20, 20 }
	 stretch = TRUE
      }
   }
}

class "GtkMenu" style "osso-menu"
widget "*.menu_with_corners" style "osso-menu-with-corners"
widget "*.menu_without_corners" style "osso-menu-without-corners"
widget "*.menu_force_with_corners" style "osso-menu-with-corners"
widget "*.menu_force_without_corners" style "osso-menu-without-corners"
widget "*.menu_without_corners_first_level" style "osso-menu-without-corners"
widget "*.menu_combobox" style "osso-menu-without-corners"
widget "*.menu_from_navigator" style "osso-menu-from-navigator"
