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

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

# TODO: find out what does does exactly
# This uses the Adwaita engine for something, I'm not sure for what
# However disabling it glitches out some separators in Libreoffice
class "GtkWindow" style "toplevel_hack"
