# GTK+ 2.0 Theme: Dark Custom
# Simplified for maximum Qt5 compatibility

gtk-color-scheme = "bg_color:#0E1213"
gtk-color-scheme = "fg_color:#E4E4E4"
gtk-color-scheme = "base_color:#22272A"
gtk-color-scheme = "text_color:#E4E4E4"
gtk-color-scheme = "selected_bg_color:#75AD31"
gtk-color-scheme = "selected_fg_color:#0E1213"
gtk-color-scheme = "tooltip_bg_color:#22272A"
gtk-color-scheme = "tooltip_fg_color:#75AD31"
gtk-color-scheme = "disabled_bg_color:#0E1213"
gtk-color-scheme = "disabled_fg_color:#888888"
gtk-color-scheme = "button_bg_color:#22272A"
gtk-color-scheme = "button_fg_color:#E4E4E4"
gtk-color-scheme = "button_checked_bg_color:#75AD31"
gtk-color-scheme = "button_checked_fg_color:#0E1213"

style "default" {
  xthickness = 1
  ythickness = 1

  GtkButton::child-displacement-x = 1
  GtkButton::child-displacement-y = 1
  GtkButton::default-border = { 0, 0, 0, 0 }
  GtkEntry::honors-transparent-bg-hint = 1

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

  fg[NORMAL]        = @fg_color
  fg[PRELIGHT]      = @fg_color
  fg[SELECTED]      = @selected_fg_color
  fg[INSENSITIVE]   = @disabled_fg_color
  fg[ACTIVE]        = @fg_color

  text[NORMAL]      = @text_color
  text[PRELIGHT]    = @text_color
  text[SELECTED]    = @selected_fg_color
  text[INSENSITIVE] = @disabled_fg_color
  text[ACTIVE]      = @text_color

  base[NORMAL]      = @base_color
  base[PRELIGHT]    = @base_color
  base[SELECTED]    = @selected_bg_color
  base[INSENSITIVE] = @disabled_bg_color
  base[ACTIVE]      = @base_color

  engine "clearlooks" {
    radius = 3.0
    style = GUMMY
    hint = "use-hints"
  }
}

style "entry" {
  xthickness = 3
  ythickness = 3

  base[NORMAL]      = @base_color
  base[ACTIVE]      = @base_color
  base[INSENSITIVE] = @base_color

  # Typed text
  text[NORMAL]      = @text_color
  
  # Placeholder/Hint text logic
  # We use PRELIGHT and ACTIVE here because Qt's search bars often toggle 
  # these states for 'search' icons and hint text.
  text[PRELIGHT]    = shade (0.8, @text_color)
  text[ACTIVE]      = shade (0.8, @text_color)
  text[INSENSITIVE] = "#999999" # Brightened this from #888888

  # Highlighting
  bg[SELECTED]      = @selected_bg_color
  text[SELECTED]    = @selected_fg_color

  # Some Qt engines look for this specific property for placeholders
  GtkEntry::text-handle-height = 0
  GtkEntry::cursor-color = @text_color
}

style "button" {
  xthickness = 3
  ythickness = 3
  bg[NORMAL]   = @button_bg_color
  fg[NORMAL]   = @button_fg_color
  bg[PRELIGHT] = shade (1.06, @button_bg_color)
  bg[ACTIVE]   = @button_checked_bg_color
}

# (Add your other styles like 'wide', 'scrollbar', etc. back here if needed)

###############################################################################
# WIDGET ASSIGNMENTS
###############################################################################

class "GtkWidget" style "default"
class "GtkEntry" style "entry"
widget_class "*<GtkEntry>*" style "entry"
widget_class "*<GtkButton>" style "button"

# Workarounds (Keep these simple)
widget_class "*<GtkListItem>*" style "entry" 
widget_class "*<GtkCList>" style "entry"