# Scutarius GTK2 theme for the graphical installer.
#
# A RECOLOUR of rootskel-gtk 13.0.4devuan1's Clearlooks gtkrc
# (usr/share/themes/Clearlooks/gtk-2.0/gtkrc, 175 lines). Everything that is
# not a colour is upstream's, byte for byte: the widget metrics, the style
# inheritance, the class and widget_class bindings, and the engine block. Only
# the colour literals changed.
#
# WHY A RECOLOUR RATHER THAN A NEW THEME. cdebconf-gtk is GTK **2**, and the
# only engine in the installer's initrd is clearlooks. A theme that dropped
# `engine "clearlooks"` would fall back to the GTK2 default drawing, which
# looks nothing like the rest of this distribution's chrome. Keeping upstream's
# structure also means a future rootskel-gtk that reworks Clearlooks produces a
# readable diff against upstream/Clearlooks-gtkrc.rootskel-gtk-13.0.4devuan1
# instead of an unmergeable rewrite. Same reasoning as the reopen-console fork.
#
# The upstream style NAMES are kept ("clearlooks-default", not
# "scutarius-default") for that same reason: the diff is the colours and
# nothing else. The THEME is named Scutarius -- that is the directory it is
# installed into and the name etc/gtk-2.0/gtkrc asks for.
#
# PALETTE (branding/scutarius/MANIFEST.md, plus the two derived tones the
# desktop GTK3/4 theme already uses, profiles/branding/desktop/gtk-colormap.txt)
#
#   charcoal       #1f2226   window ground
#   deep charcoal  #15171a   sunken field ground, and ink on bronze
#   tile           #2e3237   raised surface: buttons, menus, hover
#   tile2          #363a40   raised surface, lighter: pressed and active chrome
#   bone           #ece8df   primary ink
#   slate          #a9a397   disabled and muted ink
#   bronze         #c9a266   accent: the selection
#   bronze dark    #8c6a3a   accent, dimmer: selection without focus
#
# The accent assignments are the desktop theme's, not new ones: GNOME's blue
# accent maps to bronze #c9a266 and its pressed/dark variant to #8c6a3a in
# gtk-colormap.txt, so the installer and the installed system agree.
#
# ONE RULE DID THE WORK: in GTK2, base[X] is a field's ground and text[X] is
# the ink drawn on it; bg[X] is a widget's ground and fg[X] the ink on that.
# Every pair here was chosen together, which is why the same upstream literal
# does not always map to the same colour -- upstream's #ffffff is the ink on a
# dark red selection in one place and a white entry ground in another, and
# inverting the theme sends those two opposite ways.
#
# NOT CHANGED: usr/share/themes/dark/gtk-2.0/gtkrc, the high-contrast
# accessibility theme. theme=dark must keep working exactly as upstream ships
# it (see scutarius-install-gtk-theme).

style "clearlooks-default"
{
	GtkButton	::default_border	= { 0, 0, 0, 0 }
	GtkRange	::trough_border		= 0
	GtkPaned	::handle_size		= 6
	GtkRange	::slider_width		= 15
	GtkRange	::stepper_size		= 15

	GtkScrollbar	::min_slider_length	= 30
	GtkCheckButton	::indicator_size	= 14
	GtkMenuBar	::internal-padding	= 0
	GtkTreeView	::expander_size		= 14
	GtkExpander	::expander_size		= 16
	GtkScale	::slider-length		= 27

	GtkButton	::child-displacement-x = 1
	GtkButton	::child-displacement-y = 1

	WnckTasklist	::fade-overlay-rect = 0

	xthickness = 1
	ythickness = 1

	fg[NORMAL]		= "#ece8df" # bone
	fg[PRELIGHT]		= "#ece8df" # bone
	fg[SELECTED]		= "#15171a" # deep charcoal: ink on the bronze selection
	fg[ACTIVE]		= "#ece8df" # bone
	fg[INSENSITIVE]		= "#a9a397" # slate
	bg[NORMAL]		= "#1f2226" # charcoal
	bg[PRELIGHT]		= "#2e3237" # tile

	bg[SELECTED]		= "#c9a266" # bronze
	bg[INSENSITIVE]		= "#15171a" # deep charcoal
	bg[ACTIVE]		= "#363a40" # tile2

	base[NORMAL]		= "#15171a" # deep charcoal: fields sink below the window
	base[PRELIGHT]		= "#2e3237" # tile: a hovered field lifts, it does not glow
	base[ACTIVE]		= "#8c6a3a" # bronze dark: selected, not focused
	base[SELECTED]		= "#c9a266" # bronze
	base[INSENSITIVE]	= "#1f2226" # charcoal

	text[NORMAL]		= "#ece8df" # bone
	text[PRELIGHT]		= "#ece8df" # bone, on the tile ground above
	text[ACTIVE]		= "#ece8df" # bone, on bronze dark
	text[SELECTED]		= "#15171a" # deep charcoal, on bronze
	text[INSENSITIVE]	= "#a9a397" # slate

	engine "clearlooks"
	{
	menubarstyle		= 2	# 0 = flat, 1 = sunken, 2 = flat gradient
	animation		= FALSE
	}
}

style "clearlooks-wide" = "clearlooks-default"
{
	xthickness = 2
	ythickness = 2
}

style "clearlooks-wider" = "clearlooks-default"
{
	xthickness = 3
	ythickness = 3
}

style "clearlooks-button" = "clearlooks-wider"
{
	bg[NORMAL]	= "#2e3237" # tile
	bg[INSENSITIVE]	= "#1f2226" # charcoal: a dead button sinks into the window
	bg[PRELIGHT]	= "#363a40" # tile2
}

style "clearlooks-notebook" = "clearlooks-wide"
{
	bg[NORMAL]	= "#15171a" # deep charcoal
	bg[INSENSITIVE] = "#15171a" # deep charcoal
}

style "clearlooks-tasklist" = "clearlooks-default"
{
	xthickness = 5
	ythickness = 3
}

style "clearlooks-menu" = "clearlooks-default"
{
	xthickness = 2
	ythickness = 1
	bg[NORMAL] = "#2e3237" # tile
}

style "clearlooks-menubar-item" = "clearlooks-button"
{
	fg[PRELIGHT] = "#ece8df" # bone
}

style "clearlooks-menu-item" = "clearlooks-default"
{
	xthickness	= 2
	ythickness	= 3
	fg[PRELIGHT]	= "#15171a" # deep charcoal: the hovered item's ground is bronze
	text[PRELIGHT]	= "#15171a" # deep charcoal, same reason
}

style "clearlooks-tree" = "clearlooks-default"
{
	xthickness = 2
	ythickness = 2
}

style "clearlooks-frame-title" = "clearlooks-default"
{
	fg[NORMAL] = "#a9a397" # slate: a group's title is secondary text
}

style "clearlooks-tooltips" = "clearlooks-default"
{
	xthickness = 4
	ythickness = 4
	bg[NORMAL] = "#363a40" # tile2, not upstream's pale yellow
}

style "clearlooks-progressbar" = "clearlooks-wide"
{
	xthickness	= 1
	ythickness	= 1
	fg[PRELIGHT]	= "#15171a" # deep charcoal: the bar's fill is bronze
}

style "clearlooks-combo" = "clearlooks-button"
{
}

# Dead in this theme, as it is upstream: the GtkMenuBar class binding below is
# commented out, and this style's parent ("blackrock-default") does not exist
# in this file either. Recoloured anyway so that no Debian/Devuan tone survives
# anywhere in the file, and left in place so the diff against upstream stays
# colour-only.
style "clearlooks-menubar" = "blackrock-default"
{
	bg[NORMAL]	= "#2e3237" # tile
}

# widget styles
class "GtkWidget"	style "clearlooks-default"
class "GtkButton"	style "clearlooks-button"
class "GtkScale"	style "clearlooks-button"
class "GtkCombo"	style "clearlooks-button"
class "GtkRange"	style "clearlooks-wide"
class "GtkFrame"	style "clearlooks-wide"
class "GtkMenu"		style "clearlooks-menu"
class "GtkEntry"	style "clearlooks-wider"
class "GtkMenuItem"	style "clearlooks-menu-item"
class "GtkNotebook"	style "clearlooks-notebook"
class "GtkProgressBar"	style "clearlooks-progressbar"

#class "GtkMenuBar"	style "clearlooks-menubar"

widget_class "*MenuItem.*"			style "clearlooks-menu-item"
#widget_class "*.GtkMenuBar.*MenuItem.*"	style "clearlooks-menubar-item"

# combobox stuff
widget_class "*.GtkComboBox.GtkButton"		style "clearlooks-combo"
widget_class "*.GtkCombo.GtkButton"		style "clearlooks-combo"
# tooltips stuff
widget_class "*.tooltips.*.GtkToggleButton"	style "clearlooks-tasklist"
widget "gtk-tooltips"				style "clearlooks-tooltips"

# treeview stuff
widget_class "*.GtkTreeView.GtkButton"		style "clearlooks-tree"
widget_class "*.GtkCTree.GtkButton"		style "clearlooks-tree"
widget_class "*.GtkList.GtkButton"		style "clearlooks-tree"
widget_class "*.GtkCList.GtkButton"		style "clearlooks-tree"
widget_class "*.GtkFrame.GtkLabel"		style "clearlooks-frame-title"

# notebook stuff
widget_class "*.GtkNotebook.*.GtkEventBox"	style "clearlooks-notebook"
widget_class "*.GtkNotebook.*.GtkViewport"	style "clearlooks-notebook"
