# GtkSettings =================================================================

# Default color scheme
gtk-color-scheme = "fg_color:#2E3436"             # The base for the foreground colors
gtk-color-scheme = "bg_color:#EDEDED"             # Color to generate the background colors from
gtk-color-scheme = "text_color:#000000"           # The text color in input widgets
gtk-color-scheme = "base_color:#FFFFFF"           # The base color
gtk-color-scheme = "selected_fg_color:#FFFFFF"    # Color of selected text
gtk-color-scheme = "selected_bg_color:#4A90D9"    # Color for the background of selected text
gtk-color-scheme = "tooltip_fg_color:#FFFFFF"     # Text color for text in tooltips
gtk-color-scheme = "tooltip_bg_color:#343434"     # Background color of tooltips
gtk-color-scheme = "insensitive_bg_color:#F4F4F4" # Insensitive background color

# Properties
gtk-button-images               = 0   # Default value: FALSE (GTK+ 3)
gtk-menu-images                 = 1   # Default value: TRUE  (GTK+ 2)
gtk-primary-button-warps-slider = 1   # Default value: TRUE  (GTK+ 3)
gtk-cursor-blink-timeout        = 10  # Default value: 10    (GTK+ 3)
gtk-auto-mnemonics              = 1   # Default value: TRUE  (GTK+ 3)
gtk-timeout-initial             = 500 # Default value: 500   (GTK+ 3)
gtk-timeout-repeat              = 50  # Default value: 50    (GTK+ 3)
gtk-show-input-method-menu      = 0   # Default value: FALSE (GTK+ 3)
gtk-show-unicode-menu           = 0   # Default value: FALSE (GTK+ 3)

# Default Widgets Style =======================================================
style "default" {
    xthickness = 1
    ythickness = 1

    # Style Properties --------------------------------------------------------
    GtkWidget::tooltip-alpha     = 235
    GtkWidget::tooltip-radius    = 3
    GtkWidget::new-tooltip-style = 1

    GtkMenuBar::window-dragging  = 1
    GtkMenuBar::internal-padding = 0 # Default value: 0 (GTK+ 3)
    GtkMenuBar::shadow-type      = GTK_SHADOW_NONE

    GtkToolbar::window-dragging  = 1
    GtkToolbar::internal-padding = 4
    GtkToolbar::shadow-type      = GTK_SHADOW_NONE

    GtkToolButton::icon-spacing = 4

    GtkSeparatorMenuItem::horizontal-padding = 3
    GtkSeparatorMenuItem::wide-separators    = 1
    GtkSeparatorMenuItem::separator-height   = 1

    GtkButton::child-displacement-y   = 0
    GtkButton::default-border         = { 0, 0, 0, 0 }
    GtkButton::default-outside-border = { 0, 0, 0, 0 }

    GtkEntry::state-hint = 1

    GtkScrollbar::has-backward-stepper = 0
    GtkScrollbar::has-forward-stepper  = 0
    GtkScrollbar::min-slider-length    = 42

    GtkRange::activate-slider = 1  # Adwaita 3
    GtkRange::slider-width    = 13 # Adwaita 3
    GtkRange::stepper-size    = 0  # Adwaita 3
    GtkRange::trough-border   = 0  # Adwaita 3

    GtkScrolledWindow::scrollbar-spacing       = 0
    GtkScrolledWindow::scrollbars-within-bevel = 1

    GtkVScale::slider-length = 16
    GtkVScale::slider-width  = 16

    GtkHScale::slider-length = 16
    GtkHScale::slider-width  = 16

    GtkStatusbar::shadow-type = GTK_SHADOW_NONE # Adwaita 3

    GtkSpinButton::shadow_type = GTK_SHADOW_NONE

    GtkMenu::horizontal-padding = 0
    GtkMenu::vertical-padding   = 0

    GtkCheckButton::indicator-size = 16 # Default value: 16 (GTK+ 3)

    GtkOptionMenu::indicator-spacing = { 8, 8, 0, 0 }

    GtkTreeView::row_ending_details   = 0
    GtkTreeView::expander-size        = 11
    GtkTreeView::vertical-separator   = 4
    GtkTreeView::horizontal-separator = 4
    GtkTreeView::allow-rules          = 1

    GtkExpander::expander-size = 11

    GtkArrow::arrow-scaling = 1 # Adwaita 3

    # Colors ------------------------------------------------------------------
    fg[NORMAL]        = @text_color
    fg[PRELIGHT]      = @fg_color
    fg[ACTIVE]        = @fg_color
    fg[INSENSITIVE]   = darker (@bg_color)
    fg[SELECTED]      = @selected_fg_color

    bg[NORMAL]        = @bg_color
    bg[PRELIGHT]      = shade (1.02, @bg_color)
    bg[ACTIVE]        = shade (0.9, @bg_color)
    bg[INSENSITIVE]   = @bg_color
    bg[SELECTED]      = @selected_bg_color

    text[NORMAL]      = @text_color
    text[PRELIGHT]    = @text_color
    text[ACTIVE]      = @selected_fg_color
    text[INSENSITIVE] = darker (@bg_color)
    text[SELECTED]    = @selected_fg_color

    base[NORMAL]      = @base_color
    base[PRELIGHT]    = shade (0.95, @bg_color)
    base[ACTIVE]      = shade (0.9, @selected_bg_color)
    base[INSENSITIVE] = @bg_color
    base[SELECTED]    = @selected_bg_color

    ###############################################################
    # For succinctness, all reasonable pixmap options remain here #
    ###############################################################
    engine "pixmap" {

        # Checkbox Checked ----------------------------------------------------
        image {
            function        = CHECK
            recolorable     = TRUE
            state           = NORMAL
            shadow          = IN
            overlay_file    = "Check-Radio/checkbox-checked.png"
            overlay_stretch = FALSE
        }
        image {
            function        = CHECK
            recolorable     = TRUE
            state           = PRELIGHT
            shadow          = IN
            overlay_file    = "Check-Radio/checkbox-checked-prelight.png"
            overlay_stretch = FALSE
        }
        image {
            function        = CHECK
            recolorable     = TRUE
            state           = ACTIVE
            shadow          = IN
            overlay_file    = "Check-Radio/checkbox-checked-active.png"
            overlay_stretch = FALSE
        }
        image {
            function        = CHECK
            recolorable     = TRUE
            state           = INSENSITIVE
            shadow          = IN
            overlay_file    = "Check-Radio/checkbox-checked-insensitive.png"
            overlay_stretch = FALSE
        }
        image {
            function        = CHECK
            recolorable     = TRUE
            state           = SELECTED
            shadow          = IN
            overlay_file    = "Check-Radio/checkbox-checked-selected.png"
            overlay_stretch = FALSE
        }

        # Checkbox Unchecked --------------------------------------------------
        image {
            function        = CHECK
            recolorable     = TRUE
            state           = NORMAL
            shadow          = OUT
            overlay_file    = "Check-Radio/checkbox-unchecked.png"
            overlay_stretch = FALSE
        }
        image {
            function        = CHECK
            recolorable     = TRUE
            state           = PRELIGHT
            shadow          = OUT
            overlay_file    = "Check-Radio/checkbox-unchecked-prelight.png"
            overlay_stretch = FALSE
        }
        image {
            function        = CHECK
            recolorable     = TRUE
            state           = ACTIVE
            shadow          = OUT
            overlay_file    = "Check-Radio/checkbox-unchecked-active.png"
            overlay_stretch = FALSE
        }
        image {
            function        = CHECK
            recolorable     = TRUE
            state           = INSENSITIVE
            shadow          = OUT
            overlay_file    = "Check-Radio/checkbox-unchecked-insensitive.png"
            overlay_stretch = FALSE
        }
        image {
            function        = CHECK
            recolorable     = TRUE
            state           = SELECTED
            shadow          = OUT
            overlay_file    = "Check-Radio/checkbox-unchecked-selected.png"
            overlay_stretch = FALSE
        }

        # Radio Checked -------------------------------------------------------
        image {
            function        = OPTION
            state           = NORMAL
            shadow          = IN
            overlay_file    = "Check-Radio/radio-checked.png"
            overlay_stretch = FALSE
        }
        image {
            function        = OPTION
            state           = PRELIGHT
            shadow          = IN
            overlay_file    = "Check-Radio/radio-checked-prelight.png"
            overlay_stretch = FALSE
        }
        image {
            function        = OPTION
            state           = ACTIVE
            shadow          = IN
            overlay_file    = "Check-Radio/radio-checked-active.png"
            overlay_stretch = FALSE
        }
        image {
            function        = OPTION
            state           = INSENSITIVE
            shadow          = IN
            overlay_file    = "Check-Radio/radio-checked-insensitive.png"
            overlay_stretch = FALSE
        }
        image {
            function        = OPTION
            state           = SELECTED
            shadow          = IN
            overlay_file    = "Check-Radio/radio-checked-selected.png"
            overlay_stretch = FALSE
        }

        # Radio Unchecked -----------------------------------------------------
        image {
            function        = OPTION
            state           = NORMAL
            shadow          = OUT
            overlay_file    = "Check-Radio/radio-unchecked.png"
            overlay_stretch = FALSE
        }
        image {
            function        = OPTION
            state           = PRELIGHT
            shadow          = OUT
            overlay_file    = "Check-Radio/radio-unchecked-prelight.png"
            overlay_stretch = FALSE
        }
        image {
            function        = OPTION
            state           = ACTIVE
            shadow          = OUT
            overlay_file    = "Check-Radio/radio-unchecked-active.png"
            overlay_stretch = FALSE
        }
        image {
            function        = OPTION
            state           = INSENSITIVE
            shadow          = OUT
            overlay_file    = "Check-Radio/radio-unchecked-insensitive.png"
            overlay_stretch = FALSE
        }
        image {
            function        = OPTION
            state           = SELECTED
            shadow          = OUT
            overlay_file    = "Check-Radio/radio-unchecked-selected.png"
            overlay_stretch = FALSE
        }

        # Arrow Up ------------------------------------------------------------
        image {
            function        = ARROW
            state           = NORMAL
            overlay_file    = "Arrows/arrow-up.png"
            overlay_border  = { 0, 0, 0, 0 }
            overlay_stretch = FALSE
            arrow_direction = UP
        }
        image {
            function        = ARROW
            state           = PRELIGHT
            overlay_file    = "Arrows/arrow-up.png"
            overlay_border  = { 0, 0, 0, 0 }
            overlay_stretch = FALSE
            arrow_direction = UP
        }
        image {
            function        = ARROW
            state           = ACTIVE
            overlay_file    = "Arrows/arrow-up.png"
            overlay_border  = { 0, 0, 0, 0 }
            overlay_stretch = FALSE
            arrow_direction = UP
        }
        image {
            function        = ARROW
            state           = INSENSITIVE
            overlay_file    = "Arrows/arrow-up-insensitive.png"
            overlay_border  = { 0, 0, 0, 0 }
            overlay_stretch = FALSE
            arrow_direction = UP
        }

        # Arrow Down ----------------------------------------------------------
        image {
            function        = ARROW
            state           = NORMAL
            overlay_file    = "Arrows/arrow-down.png"
            overlay_border  = { 0, 0, 0, 0 }
            overlay_stretch = FALSE
            arrow_direction = DOWN
        }
        image {
            function        = ARROW
            state           = PRELIGHT
            overlay_file    = "Arrows/arrow-down.png"
            overlay_border  = { 0, 0, 0, 0 }
            overlay_stretch = FALSE
            arrow_direction = DOWN
        }
        image {
            function        = ARROW
            state           = ACTIVE
            overlay_file    = "Arrows/arrow-down.png"
            overlay_border  = { 0, 0, 0, 0 }
            overlay_stretch = FALSE
            arrow_direction = DOWN
        }
        image {
            function        = ARROW
            state           = INSENSITIVE
            overlay_file    = "Arrows/arrow-down-insensitive.png"
            overlay_border  = { 0, 0, 0, 0 }
            overlay_stretch = FALSE
            arrow_direction = DOWN
        }

        # Arrow Left ----------------------------------------------------------
        image {
            function        = ARROW
            state           = NORMAL
            overlay_file    = "Arrows/arrow-left.png"
            overlay_border  = { 0, 0, 0, 0 }
            overlay_stretch = FALSE
            arrow_direction = LEFT
        }
        image {
            function        = ARROW
            state           = PRELIGHT
            overlay_file    = "Arrows/arrow-left.png"
            overlay_border  = { 0, 0, 0, 0 }
            overlay_stretch = FALSE
            arrow_direction = LEFT
        }
        image {
            function        = ARROW
            state           = ACTIVE
            overlay_file    = "Arrows/arrow-left.png"
            overlay_border  = { 0, 0, 0, 0 }
            overlay_stretch = FALSE
            arrow_direction = LEFT
        }
        image {
            function        = ARROW
            state           = INSENSITIVE
            overlay_file    = "Arrows/arrow-left-insensitive.png"
            overlay_border  = { 0, 0, 0, 0 }
            overlay_stretch = FALSE
            arrow_direction = LEFT
        }

        # Arrow Right ---------------------------------------------------------
        image {
            function        = ARROW
            state           = NORMAL
            overlay_file    = "Arrows/arrow-right.png"
            overlay_border  = { 0, 0, 0, 0 }
            overlay_stretch = FALSE
            arrow_direction = RIGHT
        }
        image {
            function        = ARROW
            state           = PRELIGHT
            overlay_file    = "Arrows/arrow-right.png"
            overlay_border  = { 0, 0, 0, 0 }
            overlay_stretch = FALSE
            arrow_direction = RIGHT
        }
        image {
            function        = ARROW
            state           = ACTIVE
            overlay_file    = "Arrows/arrow-right.png"
            overlay_border  = { 0, 0, 0, 0 }
            overlay_stretch = FALSE
            arrow_direction = RIGHT
        }
        image {
            function        = ARROW
            state           = INSENSITIVE
            overlay_file    = "Arrows/arrow-right-insensitive.png"
            overlay_border  = { 0, 0, 0, 0 }
            overlay_stretch = FALSE
            arrow_direction = RIGHT
        }

        # Option Menu Arrows --------------------------------------------------
        image {
            function        = TAB
            state           = NORMAL
            overlay_file    = "Arrows/arrow-down.png"
            overlay_border  = { 0, 0, 0, 0 }
            overlay_stretch = FALSE
        }
        image {
            function        = TAB
            state           = PRELIGHT
            overlay_file    = "Arrows/arrow-down.png"
            overlay_border  = { 0, 0, 0, 0 }
            overlay_stretch = FALSE
        }
        image {
            function        = TAB
            state           = ACTIVE
            overlay_file    = "Arrows/arrow-down.png"
            overlay_border  = { 0, 0, 0, 0 }
            overlay_stretch = FALSE
        }
        image {
            function        = TAB
            state           = INSENSITIVE
            overlay_file    = "Arrows/arrow-down-insensitive.png"
            overlay_border  = { 0, 0, 0, 0 }
            overlay_stretch = FALSE
        }

        # Lines ---------------------------------------------------------------
        image {
            function = HLINE
            file     = "Lines/line-horizontal.png"
            border   = { 0, 0, 0, 0 }
            stretch  = TRUE
        }
        image {
            function = VLINE
            file     = "Lines/line-vertical.png"
            border   = { 0, 0, 0, 0 }
            stretch  = TRUE
        }

        # Handles -------------------------------------------------------------
        image {
            function        = HANDLE
            overlay_file    = "Handles/handle-horizontal.png"
            overlay_stretch = FALSE
            orientation     = HORIZONTAL
        }
        image {
            function        = HANDLE
            overlay_file    = "Handles/handle-vertical.png"
            overlay_stretch = FALSE
            orientation     = VERTICAL
        }

        # Expanders -----------------------------------------------------------
        image {
            function       = EXPANDER
            expander_style = COLLAPSED
            file           = "Expanders/collapsed.png"
        }
        image {
            function       = EXPANDER
            expander_style = EXPANDED
            file           = "Expanders/expanded.png"
        }

        image {
            function       = EXPANDER
            expander_style = SEMI_COLLAPSED
            file           = "Expanders/collapsed.png"
        }
        image {
            function       = EXPANDER
            expander_style = SEMI_EXPANDED
            file           = "Expanders/expanded.png"
        }

        # Resize Grip ---------------------------------------------------------
        image {
            function        = RESIZE_GRIP
            state           = NORMAL
            detail          = "statusbar"
            overlay_file    = "Others/null.png"
            overlay_border  = { 0, 0, 0, 0 }
            overlay_stretch = FALSE
        }

        # Shadows ( this area needs help :P ) ---------------------------------
        image {
            function = SHADOW_GAP
            file     = "Others/null.png"
            border   = { 4, 4, 4, 4 }
            stretch  = TRUE
        }
    }
}

# Scrollbar ===================================================================
style "scrollbar" {
    engine "pixmap" {

        # Trough --------------------------------------------------------------
        image {
            function    = BOX
            detail      = "trough"
            file        = "Scrollbars/trough-scrollbar-horizontal.png"
            border      = { 19, 19, 4, 4 }
            stretch     = TRUE
            orientation = HORIZONTAL
        }
        image {
            function    = BOX
            detail      = "trough"
            file        = "Scrollbars/trough-scrollbar-vertical.png"
            border      = { 4, 4, 19, 19 }
            stretch     = TRUE
            orientation = VERTICAL
        }

        # Slider Horizontal ---------------------------------------------------
        image {
            function    = SLIDER
            state       = NORMAL
            file        = "Scrollbars/slider-horizontal.png"
            border      = { 7, 7, 5, 5 }
            stretch     = TRUE
            orientation = HORIZONTAL
        }
        image {
            function    = SLIDER
            state       = PRELIGHT
            file        = "Scrollbars/slider-horizontal-prelight.png"
            border      = { 7, 7, 5, 5 }
            stretch     = TRUE
            orientation = HORIZONTAL
        }
        image {
            function    = SLIDER
            state       = ACTIVE
            file        = "Scrollbars/slider-horizontal-active.png"
            border      = { 7, 7, 5, 5 }
            stretch     = TRUE
            orientation = HORIZONTAL
        }
        image {
            function    = SLIDER
            state       = INSENSITIVE
            file        = "Scrollbars/slider-horizontal-insensitive.png"
            border      = { 7, 7, 5, 5 }
            stretch     = TRUE
            orientation = HORIZONTAL
        }

        # Slider Vertical -----------------------------------------------------
        image {
            function    = SLIDER
            state       = NORMAL
            file        = "Scrollbars/slider-vertical.png"
            border      = { 5, 5, 7, 7 }
            stretch     = TRUE
            orientation = VERTICAL
        }
        image {
            function    = SLIDER
            state       = PRELIGHT
            file        = "Scrollbars/slider-vertical-prelight.png"
            border      = { 5, 5, 7, 7 }
            stretch     = TRUE
            orientation = VERTICAL
        }
        image {
            function    = SLIDER
            state       = ACTIVE
            file        = "Scrollbars/slider-vertical-active.png"
            border      = { 5, 5, 7, 7 }
            stretch     = TRUE
            orientation = VERTICAL
        }
        image {
            function    = SLIDER
            state       = INSENSITIVE
            file        = "Scrollbars/slider-vertical-insensitive.png"
            border      = { 5, 5, 7, 7 }
            stretch     = TRUE
            orientation = VERTICAL
        }
    }
}

# MenuBar =====================================================================
style "menubar" {
    xthickness = 0
    ythickness = 0

    # Colors
    fg[SELECTED] = @text_color
    bg[PRELIGHT] = "#FFF"

    engine "pixmap" {

        # Menubar Button
        image {
            function    = BOX
            recolorable = TRUE
            state       = PRELIGHT
            file        = "MenuBar/menubar-button.png"
            border      = { 4, 4, 4, 4 }
            stretch     = TRUE
        }
    }
}

# MenuBar Item ================================================================
style "menubar_item" {
    xthickness = 4
    ythickness = 4

    # Colors
    fg[PRELIGHT] = "#2a76c6"
    bg[PRELIGHT] = @selected_fg_color
}

# Menu ========================================================================
style "menu" {
    xthickness = 0
    ythickness = 0

    # Style Properties
    GtkMenuItem::arrow-scaling = 0.4

    # Colors
    bg[NORMAL]      = shade (1.08, @bg_color)
    bg[INSENSITIVE] = @base_color
    bg[PRELIGHT]    = @base_color

    # For menus that use horizontal lines rather than gtkseparator
    engine "pixmap" {

        # Menu Line
        image {
            function = HLINE
            file     = "Lines/menu-line.png"
            border   = { 0, 0, 0, 0 }
            stretch  = TRUE
        }
    }
}

# Menu Framed =================================================================
style "menu_framed_box" {
    engine "adwaita" {
    }
}

# MenuItem ====================================================================
style "menu_item" {
    xthickness = 2
    ythickness = 3

    # Colors
    #
    # HACK: Gtk doesn't actually read this value
    # while rendering the menu items, but Libreoffice
    # does; setting this value equal to the one in
    # fg[PRELIGHT] ensures a code path in the LO theming code
    # that falls back to a dark text color for menu item text
    # highlight. The price to pay is black text on menus as well,
    # but at least it's readable.
    # See https://bugs.freedesktop.org/show_bug.cgi?id=38038
    fg[PRELIGHT]   = @selected_fg_color
    bg[PRELIGHT]   = @selected_bg_color
    bg[SELECTED]   = @selected_fg_color
    text[PRELIGHT] = @selected_fg_color

    engine "pixmap" {

        # Menu Checkbox Checked -----------------------------------------------
        image {
            function        = CHECK
            recolorable     = TRUE
            state           = NORMAL
            shadow          = IN
            overlay_file    = "Check-Radio/menu-checkbox-checked.png"
            overlay_stretch = FALSE
        }
        image {
            function        = CHECK
            recolorable     = TRUE
            state           = PRELIGHT
            shadow          = IN
            overlay_file    = "Check-Radio/menu-checkbox-checked-prelight.png"
            overlay_stretch = FALSE
        }
        image {
            function        = CHECK
            recolorable     = TRUE
            state           = ACTIVE
            shadow          = IN
            overlay_file    = "Check-Radio/menu-checkbox-checked.png"
            overlay_stretch = FALSE
        }
        image {
            function        = CHECK
            recolorable     = TRUE
            state           = INSENSITIVE
            shadow          = IN
            overlay_file    = "Check-Radio/menu-checkbox-checked.png"
            overlay_stretch = FALSE
        }

        # Menu Checkbox Unchecked ---------------------------------------------
        image {
            function        = CHECK
            recolorable     = TRUE
            state           = NORMAL
            shadow          = OUT
            overlay_file    = "Check-Radio/menu-checkbox-unchecked.png"
            overlay_stretch = FALSE
        }
        image {
            function        = CHECK
            recolorable     = TRUE
            state           = PRELIGHT
            shadow          = OUT
            overlay_file    = "Check-Radio/menu-checkbox-unchecked-prelight.png"
            overlay_stretch = FALSE
        }
        image {
            function        = CHECK
            recolorable     = TRUE
            state           = ACTIVE
            shadow          = OUT
            overlay_file    = "Check-Radio/menu-checkbox-unchecked.png"
            overlay_stretch = FALSE
        }
        image {
            function        = CHECK
            recolorable     = TRUE
            state           = INSENSITIVE
            shadow          = OUT
            overlay_file    = "Check-Radio/menu-checkbox-unchecked.png"
            overlay_stretch = FALSE
        }

        # Menu Radio Checked --------------------------------------------------
        image {
            function        = OPTION
            state           = NORMAL
            shadow          = IN
            overlay_file    = "Check-Radio/menu-radio-checked.png"
            overlay_stretch = FALSE
        }
        image {
            function        = OPTION
            state           = PRELIGHT
            shadow          = IN
            overlay_file    = "Check-Radio/menu-radio-checked-prelight.png"
            overlay_stretch = FALSE
        }
        image {
            function        = OPTION
            state           = ACTIVE
            shadow          = IN
            overlay_file    = "Check-Radio/menu-radio-checked.png"
            overlay_stretch = FALSE
        }
        image {
            function        = OPTION
            state           = INSENSITIVE
            shadow          = IN
            overlay_file    = "Check-Radio/menu-radio-checked.png"
            overlay_stretch = FALSE
        }

        # Menu Radio Unchecked ------------------------------------------------
        image {
            function        = OPTION
            state           = NORMAL
            shadow          = OUT
            overlay_file    = "Check-Radio/menu-radio-unchecked.png"
            overlay_stretch = FALSE
        }
        image {
            function        = OPTION
            state           = PRELIGHT
            shadow          = OUT
            overlay_file    = "Check-Radio/menu-radio-unchecked-prelight.png"
            overlay_stretch = FALSE
        }
        image {
            function        = OPTION
            state           = ACTIVE
            shadow          = OUT
            overlay_file    = "Check-Radio/menu-radio-unchecked.png"
            overlay_stretch = FALSE
        }
        image {
            function        = OPTION
            state           = INSENSITIVE
            shadow          = OUT
            overlay_file    = "Check-Radio/menu-radio-unchecked.png"
            overlay_stretch = FALSE
        }

        # This fixes boxy Qt menu items ---------------------------------------
        image {
            function = SHADOW
            file     = "Others/null.png"
            border   = { 4, 4, 4, 4 }
            stretch  = TRUE
        }

        # Menu Arrow ----------------------------------------------------------
        image {
            function        = ARROW
            state           = NORMAL
            overlay_file    = "Arrows/menu-arrow.png"
            overlay_border  = { 0, 0, 0, 0 }
            overlay_stretch = FALSE
            arrow_direction = RIGHT
        }
        image {
            function        = ARROW
            state           = PRELIGHT
            overlay_file    = "Arrows/menu-arrow-prelight.png"
            overlay_border  = { 0, 0, 0, 0 }
            overlay_stretch = FALSE
            arrow_direction = RIGHT
        }
    }
}

# Button ======================================================================
style "button" {
    xthickness = 3
    ythickness = 3

    engine "pixmap" {

        # Button
        image {
            function = BOX
            state    = NORMAL
            file     = "Buttons/button.png"
            border   = { 4, 4, 4, 4 }
            stretch  = TRUE
        }
        image {
            function = BOX
            state    = PRELIGHT
            file     = "Buttons/button-prelight.png"
            border   = { 4, 4, 4, 4 }
            stretch  = TRUE
        }
        image {
            function = BOX
            state    = ACTIVE
            file     = "Buttons/button-active.png"
            border   = { 4, 4, 4, 4 }
            stretch  = TRUE
        }
        image {
            function = BOX
            state    = INSENSITIVE
            file     = "Buttons/button-insensitive.png"
            border   = { 4, 4, 4, 4 }
            stretch  = TRUE
        }
    }
}

# Button Nohilight ============================================================
style "button_nohilight" {
    xthickness = 3
    ythickness = 4

    engine "pixmap" {

        # Button
        image {
            function = BOX
            state    = NORMAL
            file     = "Buttons/button.png"
            border   = { 4, 4, 4, 4 }
            stretch  = TRUE
        }
        image {
            function = BOX
            state    = PRELIGHT
            file     = "Buttons/button-prelight.png"
            border   = { 4, 4, 4, 4 }
            stretch  = TRUE
        }
        image {
            function = BOX
            state    = ACTIVE
            file     = "Buttons/button-active.png"
            border   = { 4, 4, 4, 4 }
            stretch  = TRUE
        }
        image {
            function = BOX
            state    = INSENSITIVE
            file     = "Buttons/button-insensitive.png"
            border   = { 4, 4, 4, 4 }
            stretch  = TRUE
        }
    }
}

# Button Separator ============================================================
style "button_separator" {
    xthickness = 0
    ythickness = 0

    # Style Properties
    GtkWidget::wide-separators = 1
}

# CheckButton =================================================================
style "checkbutton" {

    # Colors
    fg[PRELIGHT] = @text_color
    fg[ACTIVE]   = @text_color
    bg[PRELIGHT] = @bg_color
    bg[ACTIVE]   = @bg_color
}

# Entry =======================================================================
style "entry" {
    xthickness = 3
    ythickness = 4

    # Colors
    base[NORMAL]      = @base_color
    base[INSENSITIVE] = @insensitive_bg_color

    engine "pixmap" {

        # Entry ---------------------------------------------------------------
        image {
            function = SHADOW
            detail   = "entry"
            state    = NORMAL
            shadow   = IN
            file     = "Entry/entry-border.png"
            border   = { 4, 4, 4, 4 }
            stretch  = TRUE
        }
        image {
            function = SHADOW
            detail   = "entry"
            state    = ACTIVE
            file     = "Entry/entry-border-active.png"
            border   = { 4, 4, 4, 4 }
            stretch  = TRUE
        }
        image {
            function = SHADOW
            detail   = "entry"
            state    = INSENSITIVE
            shadow   = IN
            file     = "Entry/entry-border-insensitive.png"
            border   = { 4, 4, 4, 4 }
            stretch  = TRUE
        }

        # Entry Background ----------------------------------------------------
        image {
            function = FLAT_BOX
            detail   = "entry_bg"
            state    = NORMAL
            file     = "Entry/entry-background.png"
            border   = { 0, 0, 0, 0 }
            stretch  = TRUE
        }
        image {
            function = FLAT_BOX
            detail   = "entry_bg"
            state    = ACTIVE
            file     = "Entry/entry-background.png"
            border   = { 0, 0, 0, 0 }
            stretch  = TRUE
        }
    }
}

# ComboBox ====================================================================
style "combobox" {
    xthickness = 0
    ythickness = 0
}

# ComboBox Button =============================================================
style "combobox_button" {
    xthickness = 2
    ythickness = 2
}

# ComboBoxEntry ===============================================================
style "combobox_entry" {
    xthickness = 2
    ythickness = 4

    engine "pixmap" {

        # Combo Entry - LTR version -------------------------------------------
        image {
            function  = SHADOW
            detail    = "entry"
            state     = NORMAL
            shadow    = IN
            file      = "Entry/combo-entry-border.png"
            border    = { 4, 4, 4, 4 }
            stretch   = TRUE
            direction = LTR
        }
        image {
            function  = SHADOW
            detail    = "entry"
            state     = ACTIVE
            file      = "Entry/combo-entry-border-active.png"
            border    = { 4, 4, 5, 4 }
            stretch   = TRUE
            direction = LTR
        }
        image {
            function  = SHADOW
            detail    = "entry"
            state     = INSENSITIVE
            shadow    = IN
            file      = "Entry/combo-entry-border-insensitive.png"
            border    = { 4, 4, 5, 4 }
            stretch   = TRUE
            direction = LTR
        }

        # Combo Entry - RTL version -------------------------------------------
        image {
            function  = SHADOW
            detail    = "entry"
            state     = NORMAL
            shadow    = IN
            file      = "Entry/combo-entry-border-rtl.png"
            border    = { 4, 4, 5, 4 }
            stretch   = TRUE
            direction = RTL
        }
        image {
            function  = SHADOW
            detail    = "entry"
            state     = ACTIVE
            file      = "Entry/combo-entry-border-active-rtl.png"
            border    = { 4, 4, 5, 4 }
            stretch   = TRUE
            direction = RTL
        }
        image {
            function  = SHADOW
            detail    = "entry"
            state     = INSENSITIVE
            shadow    = IN
            file      = "Entry/combo-entry-border-insensitive-rtl.png"
            border    = { 4, 4, 5, 4 }
            stretch   = TRUE
            direction = RTL
        }
    }
}

# ComboBoxEntry Button ========================================================
style "combobox_entry_button" {

    # Colors
    fg[ACTIVE] = @text_color

    engine "pixmap" {

        # Combo Entry Button - LTR version ------------------------------------
        image {
            function  = BOX
            state     = NORMAL
            file      = "Entry/combo-entry-button.png"
            border    = { 4, 4, 5, 4 }
            stretch   = TRUE
            direction = LTR
        }
        image {
            function  = BOX
            state     = PRELIGHT
            file      = "Entry/combo-entry-button-prelight.png"
            border    = { 4, 4, 5, 4 }
            stretch   = TRUE
            direction = LTR
        }
        image {
            function  = BOX
            state     = ACTIVE
            file      = "Entry/combo-entry-button-active.png"
            border    = { 4, 4, 5, 4 }
            stretch   = TRUE
            direction = LTR
        }
        image {
            function  = BOX
            state     = INSENSITIVE
            file      = "Entry/combo-entry-button-insensitive.png"
            border    = { 4, 4, 5, 4 }
            stretch   = TRUE
            direction = LTR
        }

        # Combo Entry Button - RTL version ------------------------------------
        image {
            function  = BOX
            state     = NORMAL
            file      = "Entry/combo-entry-button-rtl.png"
            border    = { 4, 4, 5, 4 }
            stretch   = TRUE
            direction = RTL
        }
        image {
            function  = BOX
            state     = PRELIGHT
            file      = "Entry/combo-entry-button-prelight-rtl.png"
            border    = { 4, 4, 5, 4 }
            stretch   = TRUE
            direction = RTL
        }
        image {
            function  = BOX
            state     = ACTIVE
            file      = "Entry/combo-entry-button-active-rtl.png"
            border    = { 4, 4, 5, 4 }
            stretch   = TRUE
            direction = RTL
        }
        image {
            function  = BOX
            state     = INSENSITIVE
            file      = "Entry/combo-entry-button-insensitive-rtl.png"
            border    = { 4, 4, 5, 4 }
            stretch   = TRUE
            direction = RTL
        }
    }
}

# SpinButton ==================================================================
style "spinbutton" {
    xthickness = 4
    ythickness = 4

    # Colors
    bg[NORMAL] = @bg_color

    engine "pixmap" {
        image {
            function = ARROW
        }

        # Spin Button Up - LTR version ----------------------------------------
        image {
            function        = BOX
            state           = NORMAL
            detail          = "spinbutton_up"
            file            = "Spin/spin-button-up.png"
            border          = { 1, 4, 5, 0 }
            stretch         = TRUE
            overlay_file    = "Arrows/small-arrow-up.png"
            overlay_stretch = FALSE
            direction       = LTR
        }
        image {
            function        = BOX
            state           = PRELIGHT
            detail          = "spinbutton_up"
            file            = "Spin/spin-button-up-prelight.png"
            border          = { 1, 4, 5, 0 }
            stretch         = TRUE
            overlay_file    = "Arrows/small-arrow-up.png"
            overlay_stretch = FALSE
            direction       = LTR
        }
        image {
            function        = BOX
            state           = ACTIVE
            detail          = "spinbutton_up"
            file            = "Spin/spin-button-up-active.png"
            border          = { 1, 4, 5, 0 }
            stretch         = TRUE
            overlay_file    = "Arrows/small-arrow-up.png"
            overlay_stretch = FALSE
            direction       = LTR
        }
        image {
            function        = BOX
            state           = INSENSITIVE
            detail          = "spinbutton_up"
            file            = "Spin/spin-button-up-insensitive.png"
            border          = { 1, 4, 5, 0 }
            stretch         = TRUE
            overlay_file    = "Arrows/small-arrow-up-insensitive.png"
            overlay_stretch = FALSE
            direction       = LTR
        }

        # Spin Button Up - RTL version ----------------------------------------
        image {
            function        = BOX
            state           = NORMAL
            detail          = "spinbutton_up"
            file            = "Spin/spin-button-up-rtl.png"
            border          = { 4, 1, 5, 0 }
            stretch         = TRUE
            overlay_file    = "Arrows/small-arrow-up.png"
            overlay_stretch = FALSE
            direction       = RTL
        }
        image {
            function        = BOX
            state           = PRELIGHT
            detail          = "spinbutton_up"
            file            = "Spin/spin-button-up-prelight-rtl.png"
            border          = { 4, 1, 5, 0 }
            stretch         = TRUE
            overlay_file    = "Arrows/small-arrow-up.png"
            overlay_stretch = FALSE
            direction       = RTL
        }
        image {
            function        = BOX
            state           = ACTIVE
            detail          = "spinbutton_up"
            file            = "Spin/spin-button-up-active-rtl.png"
            border          = { 4, 1, 5, 0 }
            stretch         = TRUE
            overlay_file    = "Arrows/small-arrow-up.png"
            overlay_stretch = FALSE
            direction       = RTL
        }
        image {
            function        = BOX
            state           = INSENSITIVE
            detail          = "spinbutton_up"
            file            = "Spin/spin-button-up-insensitive-rtl.png"
            border          = { 4, 1, 5, 0 }
            stretch         = TRUE
            overlay_file    = "Arrows/small-arrow-up-insensitive.png"
            overlay_stretch = FALSE
            direction       = RTL
        }

        # Spin Button Down - LTR version --------------------------------------
        image {
            function        = BOX
            state           = NORMAL
            detail          = "spinbutton_down"
            file            = "Spin/spin-button-down.png"
            border          = { 1, 4, 1, 4 }
            stretch         = TRUE
            overlay_file    = "Arrows/small-arrow-down.png"
            overlay_stretch = FALSE
            direction       = LTR
        }
        image {
            function        = BOX
            state           = PRELIGHT
            detail          = "spinbutton_down"
            file            = "Spin/spin-button-down-prelight.png"
            border          = { 1, 4, 1, 4 }
            stretch         = TRUE
            overlay_file    = "Arrows/small-arrow-down.png"
            overlay_stretch = FALSE
            direction       = LTR
        }
        image {
            function        = BOX
            state           = ACTIVE
            detail          = "spinbutton_down"
            file            = "Spin/spin-button-down-active.png"
            border          = { 1, 4, 1, 4 }
            stretch         = TRUE
            overlay_file    = "Arrows/small-arrow-down.png"
            overlay_stretch = FALSE
            direction       = LTR
        }
        image {
            function        = BOX
            state           = INSENSITIVE
            detail          = "spinbutton_down"
            file            = "Spin/spin-button-down-insensitive.png"
            border          = { 1, 4, 1, 4 }
            stretch         = TRUE
            overlay_file    = "Arrows/small-arrow-down-insensitive.png"
            overlay_stretch = FALSE
            direction       = LTR
        }

        # Spin Button Down - RTL version --------------------------------------
        image {
            function        = BOX
            state           = NORMAL
            detail          = "spinbutton_down"
            file            = "Spin/spin-button-down-rtl.png"
            border          = { 4, 1, 1, 4 }
            stretch         = TRUE
            overlay_file    = "Arrows/small-arrow-down.png"
            overlay_stretch = FALSE
            direction       = RTL
        }
        image {
            function        = BOX
            state           = PRELIGHT
            detail          = "spinbutton_down"
            file            = "Spin/spin-button-down-prelight-rtl.png"
            border          = { 4, 1, 1, 4 }
            stretch         = TRUE
            overlay_file    = "Arrows/small-arrow-down.png"
            overlay_stretch = FALSE
            direction       = RTL
        }
        image {
            function        = BOX
            state           = ACTIVE
            detail          = "spinbutton_down"
            file            = "Spin/spin-button-down-active-rtl.png"
            border          = { 4, 1, 1, 4 }
            stretch         = TRUE
            overlay_file    = "Arrows/small-arrow-down.png"
            overlay_stretch = FALSE
            direction       = RTL
        }
        image {
            function        = BOX
            state           = INSENSITIVE
            detail          = "spinbutton_down"
            file            = "Spin/spin-button-down-insensitive-rtl.png"
            border          = { 4, 1, 1, 4 }
            stretch         = TRUE
            overlay_file    = "Arrows/small-arrow-down-insensitive.png"
            overlay_stretch = FALSE
            direction       = RTL
        }
    }
}

# Notebook ====================================================================
style "notebook" {
    xthickness = 3
    ythickness = 3

    engine "pixmap" {

        # Tab -----------------------------------------------------------------
        image {
            function = EXTENSION
            state    = ACTIVE
            file     = "Tabs/tab-top.png"
            border   = { 3, 3, 5, 3 }
            stretch  = TRUE
            gap_side = BOTTOM
        }
        image {
            function = EXTENSION
            state    = ACTIVE
            file     = "Tabs/tab-bottom.png"
            border   = { 3, 3, 3, 5 }
            stretch  = TRUE
            gap_side = TOP
        }
        image {
            function = EXTENSION
            state    = ACTIVE
            file     = "Tabs/tab-left.png"
            border   = { 5, 3, 3, 3 }
            stretch  = TRUE
            gap_side = RIGHT
        }
        image {
            function = EXTENSION
            state    = ACTIVE
            file     = "Tabs/tab-right.png"
            border   = { 3, 5, 3, 3 }
            stretch  = TRUE
            gap_side = LEFT
        }

        # Tab Active ----------------------------------------------------------
        image {
            function = EXTENSION
            file     = "Tabs/tab-top-active.png"
            border   = { 3, 3, 3, 3 }
            stretch  = TRUE
            gap_side = BOTTOM
        }
        image {
            function = EXTENSION
            file     = "Tabs/tab-bottom-active.png"
            border   = { 3, 3, 3, 3 }
            stretch  = TRUE
            gap_side = TOP
        }
        image {
            function = EXTENSION
            file     = "Tabs/tab-left-active.png"
            border   = { 3, 3, 3, 3 }
            stretch  = TRUE
            gap_side = RIGHT
        }
        image {
            function = EXTENSION
            file     = "Tabs/tab-right-active.png"
            border   = { 3, 3, 3, 3 }
            stretch  = TRUE
            gap_side = LEFT
        }

        # How to draw boxes with a gap on one side (ie the page of a notebook)
        image {
            function   = BOX_GAP
            file       = "Tabs/notebook.png"
            border     = { 4, 4, 4, 4 }
            stretch    = TRUE
            gap_file   = "Tabs/notebook-gap-horizontal.png"
            gap_border = { 1, 1, 0, 0 }
            gap_side   = TOP
        }
        image {
            function   = BOX_GAP
            file       = "Tabs/notebook.png"
            border     = { 4, 4, 4, 4 }
            stretch    = TRUE
            gap_file   = "Tabs/notebook-gap-horizontal.png"
            gap_border = { 1, 1, 0, 0 }
            gap_side   = BOTTOM
        }
        image {
            function   = BOX_GAP
            file       = "Tabs/notebook.png"
            border     = { 4, 4, 4, 4 }
            stretch    = TRUE
            gap_file   = "Tabs/notebook-gap-vertical.png"
            gap_border = { 0, 0, 1, 1 }
            gap_side   = LEFT
        }
        image {
            function   = BOX_GAP
            file       = "Tabs/notebook.png"
            border     = { 4, 4, 4, 4 }
            stretch    = TRUE
            gap_file   = "Tabs/notebook-gap-vertical.png"
            gap_border = { 0, 0, 1, 1 }
            gap_side   = RIGHT
        }

        # How to draw the box of a notebook when it isn't attached to a tab
        image {
            function = BOX
            file     = "Tabs/notebook.png"
            border   = { 4, 4, 4, 4 }
            stretch  = TRUE
        }
    }
}

# Notebook Viewport ===========================================================
style "notebook_viewport" {

    # Colors
    bg[NORMAL] = @base_color
}

# Notebook Entry ==============================================================
style "notebook_entry" {
    xthickness = 3
    ythickness = 4

    # Colors
    base[NORMAL]      = @base_color
    base[INSENSITIVE] = @insensitive_bg_color

    engine "pixmap" {

        # Entry ---------------------------------------------------------------
        image {
            function = SHADOW
            detail   = "entry"
            state    = NORMAL
            shadow   = IN
            file     = "Entry/entry-border.png"
            border   = { 4, 4, 4, 4 }
            stretch  = TRUE
        }
        image {
            function = SHADOW
            detail   = "entry"
            state    = ACTIVE
            file     = "Entry/entry-border-active.png"
            border   = { 4, 4, 4, 4 }
            stretch  = TRUE
        }
        image {
            function = SHADOW
            detail   = "entry"
            state    = INSENSITIVE
            shadow   = IN
            file     = "Entry/entry-border-insensitive.png"
            border   = { 4, 4, 4, 4 }
            stretch  = TRUE
        }

        # Entry Background ----------------------------------------------------
        image {
            function = FLAT_BOX
            detail   = "entry_bg"
            state    = NORMAL
            file     = "Entry/entry-background.png"
            border   = { 0, 0, 0, 0 }
            stretch  = TRUE
        }
        image {
            function = FLAT_BOX
            detail   = "entry_bg"
            state    = ACTIVE
            file     = "Entry/entry-background.png"
            border   = { 0, 0, 0, 0 }
            stretch  = TRUE
        }
    }
}

# Notebook Tab Label ==========================================================
style "notebook_tab_label" {

    # Colors
    fg[ACTIVE] = @text_color
}

# Handlebox ===================================================================
style "handlebox" {
    engine "pixmap" {
        image {
            function = BOX
            file     = "Others/null.png"
            border   = { 4, 4, 4, 4 }
            stretch  = TRUE
            detail   = "handlebox_bin"
            shadow   = IN
        }
        image {
            function = BOX
            file     = "Others/null.png"
            border   = { 4, 4, 4, 4 }
            stretch  = TRUE
            detail   = "handlebox_bin"
            shadow   = OUT
        }
    }
}

# Range =======================================================================
style "range" {
    engine "pixmap" {

        # Trough --------------------------------------------------------------
        image {
            function    = BOX
            detail      = "trough"
            file        = "Range/trough-horizontal.png"
            border      = { 4, 4, 0, 0 }
            stretch     = TRUE
            orientation = HORIZONTAL
        }
        image {
            function    = BOX
            detail      = "trough"
            file        = "Range/trough-vertical.png"
            border      = { 0, 0, 4, 4 }
            stretch     = TRUE
            orientation = VERTICAL
        }

        # Slider Horizontal ---------------------------------------------------
        image {
            function        = SLIDER
            state           = NORMAL
            file            = "Others/null.png"
            border          = { 0, 0, 0, 0 }
            stretch         = TRUE
            overlay_file    = "Range/slider-horizontal.png"
            overlay_stretch = FALSE
            orientation     = HORIZONTAL
        }
        image {
            function        = SLIDER
            state           = PRELIGHT
            file            = "Others/null.png"
            border          = { 0, 0, 0, 0 }
            stretch         = TRUE
            overlay_file    = "Range/slider-horizontal-prelight.png"
            overlay_stretch = FALSE
            orientation     = HORIZONTAL
        }
        image {
            function        = SLIDER
            state           = ACTIVE
            file            = "Others/null.png"
            border          = { 0, 0, 0, 0 }
            stretch         = TRUE
            overlay_file    = "Range/slider-horizontal-active.png"
            overlay_stretch = FALSE
            orientation     = HORIZONTAL
        }
        image {
            function        = SLIDER
            state           = INSENSITIVE
            file            = "Others/null.png"
            border          = { 0, 0, 0, 0 }
            stretch         = TRUE
            overlay_file    = "Range/slider-horizontal-insensitive.png"
            overlay_stretch = FALSE
            orientation     = HORIZONTAL
        }

        # Slider Vertical -----------------------------------------------------
        image {
            function        = SLIDER
            state           = NORMAL
            file            = "Others/null.png"
            border          = { 0, 0, 0, 0 }
            stretch         = TRUE
            overlay_file    = "Range/slider-vertical.png"
            overlay_stretch = FALSE
            orientation     = VERTICAL
        }
        image {
            function        = SLIDER
            state           = PRELIGHT
            file            = "Others/null.png"
            border          = { 0, 0, 0, 0 }
            stretch         = TRUE
            overlay_file    = "Range/slider-vertical-prelight.png"
            overlay_stretch = FALSE
            orientation     = VERTICAL
        }
        image {
            function        = SLIDER
            state           = ACTIVE
            file            = "Others/null.png"
            border          = { 0, 0, 0, 0 }
            stretch         = TRUE
            overlay_file    = "Range/slider-vertical-active.png"
            overlay_stretch = FALSE
            orientation     = VERTICAL
        }
        image {
            function        = SLIDER
            state           = INSENSITIVE
            file            = "Others/null.png"
            border          = { 0, 0, 0, 0 }
            stretch         = TRUE
            overlay_file    = "Range/slider-vertical-insensitive.png"
            overlay_stretch = FALSE
            orientation     = VERTICAL
        }

        # Function below removes ugly boxes -----------------------------------
        image {
            function = BOX
            file     = "Others/null.png"
            border   = { 3, 3, 3, 3 }
            stretch  = TRUE
        }
    }
}

# ProgressBar =================================================================
style "progressbar" {
    xthickness = 1
    ythickness = 1

    engine "pixmap" {

        # Horizontal ----------------------------------------------------------
        image {
            function   = BOX
            detail      = "trough"
            file        = "ProgressBar/trough-progressbar-horizontal.png"
            stretch     = TRUE
            border      = { 4, 4, 4, 4 }
            orientation = HORIZONTAL
        }
        image {
            function    = BOX
            detail      = "bar"
            file        = "ProgressBar/progressbar-horizontal.png"
            stretch     = TRUE
            border      = { 3, 3, 3, 3 }
            orientation = HORIZONTAL
        }

        # Vertical ------------------------------------------------------------
        image {
            function    = BOX
            detail      = "trough"
            file        = "ProgressBar/trough-progressbar-vertical.png"
            stretch     = TRUE
            border      = { 4, 4, 4, 4 }
            orientation = VERTICAL
        }
        image {
            function    = BOX
            detail      = "bar"
            file        = "ProgressBar/progressbar-vertical.png"
            stretch     = TRUE
            border      = { 3, 3, 3, 3 }
            orientation = VERTICAL
        }
    }
}

# SeparatorMenuItem ===========================================================
style "separator_menu_item" {
    engine "pixmap" {
        image {
            function = BOX
            file     = "Lines/menu-line.png"
            border   = { 0, 0, 1, 0 }
            stretch  = TRUE
        }
    }
}

# TreeView Header =============================================================
style "treeview_header" {
    ythickness = 1

    # Colors
    fg[NORMAL]   = shade(0.55, @bg_color)
    fg[PRELIGHT] = shade(0.80, @text_color)

    font_name = "Bold"

    engine "pixmap" {

        # Tree Header
        image {
            function = BOX
            file     = "Tree/tree-header.png"
            border   = { 1, 1, 1, 1 }
            stretch  = TRUE
        }
    }
}

# ScrolledWindow ==============================================================
style "scrolled_window" {
    xthickness = 1
    ythickness = 1

    engine "pixmap" {
        image {
            function = SHADOW
            file     = "Frame/frame.png"
            border   = { 1, 1, 1, 1 }
            stretch  = TRUE
        }
    }
}

# Frame =======================================================================
style "frame" {
    xthickness = 1
    ythickness = 1

    engine "pixmap" {

        # Frame (Shadow in) ---------------------------------------------------
        image {
            function = SHADOW
            file     = "Frame/frame.png"
            border   = { 1, 1, 1, 1 }
            stretch  = TRUE
            shadow   = IN
        }
        image {
            function         = SHADOW_GAP
            file             = "Frame/frame.png"
            border           = { 1, 1, 1, 1 }
            stretch          = TRUE
            gap_start_file   = "Frame/frame-gap-start.png"
            gap_start_border = { 1, 0, 0, 0 }
            gap_end_file     = "Frame/frame-gap-end.png"
            gap_end_border   = { 0, 1, 0, 0 }
            shadow           = IN
        }

        # Frame (Shadow out) --------------------------------------------------
        image {
            function = SHADOW
            file     = "Frame/frame.png"
            border   = { 1, 1, 1, 1 }
            stretch  = TRUE
            shadow   = OUT
        }
        image {
            function         = SHADOW_GAP
            file             = "Frame/frame.png"
            border           = { 1, 1, 1, 1 }
            stretch          = TRUE
            gap_start_file   = "Frame/frame-gap-start.png"
            gap_start_border = { 1, 0, 0, 0 }
            gap_end_file     = "Frame/frame-gap-end.png"
            gap_end_border   = { 0, 1, 0, 0 }
            shadow           = OUT
        }

        # Frame (Shadow etched in) --------------------------------------------
        image {
            function = SHADOW
            file     = "Frame/frame.png"
            border   = { 1, 1, 1, 1 }
            stretch  = TRUE
            shadow   = ETCHED_IN
        }
        image {
            function         = SHADOW_GAP
            file             = "Frame/frame.png"
            border           = { 1, 1, 1, 1 }
            stretch          = TRUE
            gap_start_file   = "Frame/frame-gap-start.png"
            gap_start_border = { 1, 0, 0, 0 }
            gap_end_file     = "Frame/frame-gap-end.png"
            gap_end_border   = { 0, 1, 0, 0 }
            shadow           = ETCHED_IN
        }

        # Frame (Shadow etched out) --------------------------------------------
        image {
            function = SHADOW
            file     = "Frame/frame.png"
            border   = { 1, 1, 1, 1 }
            stretch  = TRUE
            shadow   = ETCHED_OUT
        }
        image {
            function         = SHADOW_GAP
            file             = "Frame/frame.png"
            border           = { 1, 1, 1, 1 }
            stretch          = TRUE
            gap_start_file   = "Frame/frame-gap-start.png"
            gap_start_border = { 1, 0, 0, 0 }
            gap_end_file     = "Frame/frame-gap-end.png"
            gap_end_border   = { 0, 1, 0, 0 }
            shadow           = ETCHED_OUT
        }
    }
}

# Toolbar =====================================================================
style "toolbar" {
    engine "pixmap" {
        image {
            function = SHADOW
        }
    }
}

# Toolbar Inline ==============================================================
style "inline_toolbar" {

    # Style Properties
    GtkToolbar::button-relief = GTK_RELIEF_NORMAL

    engine "pixmap" {
        image {
            function = BOX
            file     = "Toolbar/inline-toolbar.png"
            stretch  = TRUE
        }
    }
}

# Tooltips ====================================================================
style "tooltips" {
    xthickness = 8
    ythickness = 4

    # Colors
    fg[NORMAL]   = @tooltip_fg_color
    bg[NORMAL]   = @tooltip_bg_color
    bg[SELECTED] = @tooltip_bg_color
}

# LibreOffice Window ==========================================================
style "toplevel_hack" {
    engine "adwaita" {
    }
}

# LibreOffice Entry ===========================================================
style "libreoffice_entry" {
    engine "pixmap" {

        # Entry ---------------------------------------------------------------
        image {
            function = SHADOW
            detail   = "entry"
            state    = NORMAL
            shadow   = IN
            file     = "Entry/entry-border.png"
            border   = { 4, 4, 4, 4 }
            stretch  = TRUE
        }
        image {
            function = SHADOW
            detail   = "entry"
            state    = ACTIVE
            file     = "Entry/entry-border-active.png"
            border   = { 4, 4, 4, 4 }
            stretch  = TRUE
        }

        # Entry Background ----------------------------------------------------
        image {
            function        = FLAT_BOX
            detail          = "entry_bg"
            state           = NORMAL
            overlay_file    = "Entry/entry-background.png"
            overlay_border  = { 0, 0, 0, 0 }
            overlay_stretch = TRUE
        }
        image {
            function        = FLAT_BOX
            detail          = "entry_bg"
            state           = ACTIVE
            overlay_file    = "Entry/entry-background.png"
            overlay_border  = { 0, 0, 0, 0 }
            overlay_stretch = TRUE
        }
    }
}

# LibreOffice Spin Entry ======================================================
style "libreoffice_spinbutton_entry" {
    engine "pixmap" {

        # Combo Entry ---------------------------------------------------------
        image {
            function = SHADOW
            detail   = "entry"
            state    = NORMAL
            shadow   = IN
            file     = "Entry/libreoffice-combo-entry-border.png"
            border   = { 4, 4, 4, 4 }
            stretch  = TRUE
        }
        image {
            function = SHADOW
            detail   = "entry"
            state    = ACTIVE
            file     = "Entry/libreoffice-combo-entry-border-active.png"
            border   = { 4, 4, 4, 4 }
            stretch  = TRUE
        }

        # Combo Entry Background ----------------------------------------------
        image {
            function        = FLAT_BOX
            detail          = "entry_bg"
            state           = NORMAL
            overlay_file    = "Entry/entry-background.png"
            overlay_border  = { 0, 0, 0, 0 }
            overlay_stretch = TRUE
        }
        image {
            function        = FLAT_BOX
            detail          = "entry_bg"
            state           = ACTIVE
            overlay_file    = "Entry/entry-background.png"
            overlay_border  = { 0, 0, 0, 0 }
            overlay_stretch = TRUE
        }
    }
}

# GIMP Spin Scale =============================================================
style "gimp_spin_scale" {

    # Colors
    bg[NORMAL] = @base_color

    engine "pixmap" {

        #  Entry --------------------------------------------------------------
        image {
            function = SHADOW
            detail   = "entry"
            state    = NORMAL
            shadow   = IN
            file     = "GimpSpinScale/gimp-entry-border.png"
            border   = { 4, 4, 4, 4 }
            stretch  = TRUE
        }
        image {
            function = SHADOW
            detail   = "entry"
            state    = ACTIVE
            file     = "GimpSpinScale/gimp-entry-border.png"
            border   = { 4, 4, 4, 4 }
            stretch  = TRUE
        }
        image {
            function = SHADOW
            detail   = "entry"
            state    = INSENSITIVE
            file     = "GimpSpinScale/gimp-entry-border.png"
            border   = { 4, 4, 4, 4 }
            stretch  = TRUE
        }

        # Entry Background ----------------------------------------------------
        image {
            function        = FLAT_BOX
            detail          = "entry_bg"
            state           = NORMAL
            overlay_file    = "GimpSpinScale/gimp-entry-background.png"
            overlay_border  = { 0, 0, 0, 0 }
            overlay_stretch = TRUE
        }
        image {
            function        = FLAT_BOX
            detail          = "entry_bg"
            state           = ACTIVE
            overlay_file    = "GimpSpinScale/gimp-entry-background.png"
            overlay_border  = { 0, 0, 0, 0 }
            overlay_stretch = TRUE
        }
        image {
            function        = FLAT_BOX
            detail          = "entry_bg"
            state           = INSENSITIVE
            overlay_file    = "GimpSpinScale/gimp-entry-background.png"
            overlay_border  = { 0, 0, 0, 0 }
            overlay_stretch = TRUE
        }

        # Spin Button Up ------------------------------------------------------
        image {
            function        = BOX
            state           = NORMAL
            detail          = "spinbutton_up"
            file            = "GimpSpinScale/gimp-spin-button-up.png"
            border          = { 1, 3, 5, 0 }
            stretch         = TRUE
            overlay_file    = "Arrows/small-arrow-up.png"
            overlay_stretch = FALSE
        }
        image {
            function        = BOX
            state           = PRELIGHT
            detail          = "spinbutton_up"
            file            = "GimpSpinScale/gimp-spin-button-up.png"
            border          = { 1, 3, 5, 0 }
            stretch         = TRUE
            overlay_file    = "Arrows/small-arrow-up.png"
            overlay_stretch = FALSE
        }
        image {
            function        = BOX
            state           = ACTIVE
            detail          = "spinbutton_up"
            file            = "GimpSpinScale/gimp-spin-button-up.png"
            border          = { 1, 3, 5, 0 }
            stretch         = TRUE
            overlay_file    = "Arrows/small-arrow-up.png"
            overlay_stretch = FALSE
        }
        image {
            function        = BOX
            state           = INSENSITIVE
            detail          = "spinbutton_up"
            file            = "GimpSpinScale/gimp-spin-button-up.png"
            border          = { 1, 3, 5, 0 }
            stretch         = TRUE
            overlay_file    = "Arrows/small-arrow-up-insensitive.png"
            overlay_stretch = FALSE
        }

        # Spin Button Down ----------------------------------------------------
        image {
            function        = BOX
            state           = NORMAL
            detail          = "spinbutton_down"
            file            = "GimpSpinScale/gimp-spin-button-down.png"
            border          = { 1, 3, 1, 4 }
            stretch         = TRUE
            overlay_file    = "Arrows/small-arrow-down.png"
            overlay_stretch = FALSE
        }
        image {
            function        = BOX
            state           = PRELIGHT
            detail          = "spinbutton_down"
            file            = "GimpSpinScale/gimp-spin-button-down.png"
            border          = { 1, 3, 1, 4 }
            stretch         = TRUE
            overlay_file    = "Arrows/small-arrow-down.png"
            overlay_stretch = FALSE
        }
        image {
            function        = BOX
            state           = ACTIVE
            detail          = "spinbutton_down"
            file            = "GimpSpinScale/gimp-spin-button-down.png"
            border          = { 1, 3, 1, 4 }
            stretch         = TRUE
            overlay_file    = "Arrows/small-arrow-down.png"
            overlay_stretch = FALSE
        }
        image {
            function        = BOX
            state           = INSENSITIVE
            detail          = "spinbutton_down"
            file            = "GimpSpinScale/gimp-spin-button-down.png"
            border          = { 1, 3, 1, 4 }
            stretch         = TRUE
            overlay_file    = "Arrows/small-arrow-down-insensitive.png"
            overlay_stretch = FALSE
        }
    }
}

# GIMP Toolbox Frame ==========================================================
style "gimp_toolbox_frame" {
    engine "pixmap" {
        image {
            function = SHADOW
        }
    }
}

# Eclipse/SWT Tooltips ========================================================
style "eclipse-tooltips" {
    xthickness = 8
    ythickness = 4

    # Colors
    fg[NORMAL]   = @text_color
    bg[NORMAL]   = shade(1.05, @bg_color)
    bg[SELECTED] = shade(1.05, @bg_color)
}

# Eclipse/SWT Toolbar =========================================================
style "null" {
    engine "pixmap" {
        image {
            function = BOX
            file     = "Others/null.png"
            stretch  = TRUE
        }
    }
}

# Chrome Frame ================================================================
style "chrome-gtk-frame" {

    # Style Properties
    ChromeGtkFrame::frame-color                     = @bg_color
    ChromeGtkFrame::inactive-frame-color            = @bg_color
    ChromeGtkFrame::frame-gradient-size             = 16
    ChromeGtkFrame::frame-gradient-color            = shade(1.07, @bg_color)
    ChromeGtkFrame::incognito-frame-color           = shade(0.85, @bg_color)
    ChromeGtkFrame::incognito-inactive-frame-color  = @bg_color
    ChromeGtkFrame::incognito-frame-gradient-color  = @bg_color
    ChromeGtkFrame::scrollbar-trough-color          = shade(0.912, @bg_color)
    ChromeGtkFrame::scrollbar-slider-prelight-color = shade(1.04, @bg_color)
    ChromeGtkFrame::scrollbar-slider-normal-color   = @bg_color
}

# Chrome MenuItem =============================================================
style "chrome_menu_item" {

    # Colors
    bg[SELECTED] = @selected_bg_color
}

# Chrome Entry ================================================================
style "chrome_entry" {
    engine "pixmap" {

        # Entry ---------------------------------------------------------------
        image {
            function = SHADOW
            detail   = "entry"
            state    = NORMAL
            shadow   = IN
            file     = "Entry/entry-border.png"
            border   = { 4, 4, 4, 4 }
            stretch  = TRUE
        }
        image {
            function = SHADOW
            detail   = "entry"
            state    = ACTIVE
            file     = "Entry/entry-border-active.png"
            border   = { 4, 4, 4, 4 }
            stretch  = TRUE
        }

        #  Entry Background ---------------------------------------------------
        image {
            function = FLAT_BOX
            detail   = "entry_bg"
            state    = NORMAL
            file     = "Entry/entry-background.png"
            stretch  = TRUE
            border   = { 0, 0, 0, 0 }
        }
        image {
            function = FLAT_BOX
            detail   = "entry_bg"
            state    = ACTIVE
            file     = "Entry/entry-background.png"
            stretch  = TRUE
            border   = { 0, 0, 0, 0 }
        }
    }
}

###############################################################################
# The following part of the gtkrc applies the different styles to the widgets #
###############################################################################

class "GtkWidget"            style "default"
class "GtkScrollbar"         style "scrollbar"
class "GtkButton"            style "button"
class "GtkEntry"             style "entry"
class "GtkOldEditable"       style "entry"
class "GtkSpinButton"        style "spinbutton"
class "GtkNotebook"          style "notebook"
class "GtkRange"             style "range"
class "GtkProgressBar"       style "progressbar"
class "GtkSeparatorMenuItem" style "separator_menu_item"
class "GtkScrolledWindow"    style "scrolled_window"
class "GtkFrame"             style "frame"
class "GtkToolbar"           style "toolbar"

widget_class "*<GtkMenuBar>*"                                    style "menubar"
widget_class "*<GtkMenu>*"                                       style "menu"
widget_class "*<GtkMenu>*"                                       style "menu_framed_box"
widget_class "*<GtkMenuItem>*"                                   style "menu_item"
widget_class "*<GtkMenuBar>.<GtkMenuItem>*"                      style "menubar_item"
widget_class "*<GtkCheckButton>*"                                style "checkbutton"
widget_class "*<GtkComboBox>"                                    style "combobox"
widget_class "*<GtkComboBox>*<GtkButton>"                        style "combobox_button"
widget_class "*<GtkButton>*<GtkSeparator>"                       style "button_separator"
widget_class "*HandleBox"                                        style "handlebox"
widget_class "*<GtkTreeView>*<GtkButton>*"                       style "treeview_header"
widget_class "*<GtkFileChooserDefault>*<GtkToolbar>"             style "inline_toolbar"
widget_class "*<GtkFileChooserDefault>*<GtkToolbar>*<GtkButton>" style "button_nohilight"
widget_class "*<GtkComboBoxEntry>*<GtkEntry>"                    style "combobox_entry"
widget_class "*<GtkComboBoxEntry>*<GtkButton>"                   style "combobox_entry_button"
widget_class "*<GtkInfoBar>*<GtkButton>"                         style "button_nohilight"
widget_class "*<GtkNotebook>*<GtkScrolledWindow>*<GtkViewport>"  style "notebook_viewport"

# Entries in notebooks draw with notebook's base color, but not if there's
# something else in the middle that draws gray again
widget_class "*<GtkNotebook>*<GtkEntry>"               style "notebook_entry"
widget_class "*<GtkNotebook>*<GtkEventBox>*<GtkEntry>" style "entry"

#widget_class "*<GtkNotebook>*<GtkComboBoxEntry>*<GtkEntry>" style "notebook_combobox_entry"
widget_class "*<GtkNotebook>*<GtkEventBox>*<GtkComboBoxEntry>*<GtkEntry>" style "combobox_entry"

# We also need to avoid changing fg color for the inactive notebook tab labels
widget_class "*<GtkNotebook>.<GtkLabel>" style "notebook_tab_label"

# GTK tooltips
widget "gtk-tooltip*" style "tooltips"

##########################################################################
# Following are special cases and workarounds for issues in applications #
##########################################################################

# Xchat special cases ---------------------------------------------------------
widget "*xchat-inputbox" style "entry"

# GIMP/Inkscape ---------------------------------------------------------------
# Disable gradients completely for GimpSpinScale
class "GimpSpinScale" style "gimp_spin_scale"

# Remove borders from "Wilbert frame" in Gimp
widget_class "*<GimpToolbox>*<GtkFrame>" style "gimp_toolbox_frame"

# Chrome/Chromium -------------------------------------------------------------
class "ChromeGtkFrame"                               style "chrome-gtk-frame"

widget_class "*Chrom*Button*"                        style "button"
widget_class "*<GtkCustomMenu>*<GtkCustomMenuItem>*" style "chrome_menu_item"

# We use this weird selector to target an offscreen entry as created
# by Chrome/Chromium to derive the style for its toolbar
widget_class "<GtkEntry>" style "chrome_entry"

# Eclipse/SWT -----------------------------------------------------------------
widget "gtk-tooltips*"     style "eclipse-tooltips"
widget "*swt-toolbar-flat" style "null"

# LibreOffice -----------------------------------------------------------------
class "GtkWindow"                            style "toplevel_hack"

widget "*libreoffice-toplevel*GtkEntry"      style "libreoffice_entry"
widget "*libreoffice-toplevel*GtkSpinButton" style "libreoffice_spinbutton_entry"
