# vim:set ft=gtkrc ts=2 sw=2 sts=2 ai et:

style "toplevel_hack" {
  engine "adwaita" {}
}

# TODO: This could really look nicer
style "gimp_spin_scale" {

  # Spin background
  bg[NORMAL] = @base_color

  engine "pixmap" {

    image {
      function        = BOX
      state           = NORMAL
      detail          = "spinbutton_up"
      overlay_file    = "assets/spin-up.png"
      overlay_stretch = FALSE
    }

    image {
      function        = BOX
      state           = PRELIGHT
      detail          = "spinbutton_up"
      overlay_file    = "assets/spin-up.png"
      overlay_stretch = FALSE
    }

    image {
      function        = BOX
      state           = ACTIVE
      detail          = "spinbutton_up"
      overlay_file    = "assets/spin-up.png"
      overlay_stretch = FALSE
    }

    image {
      function        = BOX
      state           = INSENSITIVE
      detail          = "spinbutton_up"
      overlay_file    = "assets/spin-up-insensitive.png"
      overlay_stretch = FALSE
    }

    image {
      function        = BOX
      state           = NORMAL
      detail          = "spinbutton_down"
      overlay_file    = "assets/spin-down.png"
      overlay_stretch = FALSE
    }

    image {
      function        = BOX
      state           = PRELIGHT
      detail          = "spinbutton_down"
      overlay_file    = "assets/spin-down.png"
      overlay_stretch = FALSE
    }

    image {
      function        = BOX
      state           = ACTIVE
      detail          = "spinbutton_down"
      overlay_file    = "assets/spin-down.png"
      overlay_stretch = FALSE
    }

    image {
      function        = BOX
      state           = INSENSITIVE
      detail          = "spinbutton_down"
      overlay_file    = "assets/spin-down-insensitive.png"
      overlay_stretch = FALSE
    }

 }

}

style "chrome_gtk_frame" {

  ChromeGtkFrame::frame-color          = shade (1.05, @bg_color)
  ChromeGtkFrame::frame-gradient-color = shade (1.05, @bg_color)
  ChromeGtkFrame::inactive-frame-color = @bg_color

  ChromeGtkFrame::incognito-frame-color          = "#cbd2d9"
  ChromeGtkFrame::incognito-frame-gradient-color = "#cbd2d9"
  ChromeGtkFrame::incognito-inactive-frame-color = mix (0.5, @bg_color, "#cbd2d9")

}

style "chrome_entry" {
  base[NORMAL]      = @base_color
  base[INSENSITIVE] = @base_color
}

style "vim_notebook" {
  bg[NORMAL] = @base_color
  bg[ACTIVE] = @insensitive_bg_color
}

# Vim puts an eventbox between the tab and the label and colours it,
# we need to handle that
widget "vim-main-window*GtkNotebook.GtkEventBox" style "vim_notebook"

# (he)xchat input box
class "SexySpellEntry" style:highest "normal_entry"

# Disable spin button assets for GimpSpinScale
class "GimpSpinScale" style "gimp_spin_scale"

# Chromium lets us define some colours and settings for better integration
class "ChromeGtkFrame" style "chrome_gtk_frame"
# Chromium uses base as the fill colour of its own entries
# This would be fine but Gtk+ uses it to fill the surrounding space, so its set to bg
# That results in Chromium using it for the fill, so we need to handle that
widget_class "*Chrom*<GtkEntry>" style "chrome_entry"

# Hack to be able to match widgets in LibreOffice
class "GtkWindow" style "toplevel_hack"
