Blame tests/testgtkrc

Packit 98cdb6
# pixmap_path "<dir 1>:<dir 2>:<dir 3>:..."
Packit 98cdb6
#
Packit 98cdb6
# include "rc-file"
Packit 98cdb6
#
Packit 98cdb6
# style <name> [= <name>]
Packit 98cdb6
# {
Packit 98cdb6
#   <option>
Packit 98cdb6
# }
Packit 98cdb6
#
Packit 98cdb6
# widget <widget_set> style <style_name>
Packit 98cdb6
# widget_class <widget_class_set> style <style_name>
Packit 98cdb6
Packit 98cdb6
# testgtkrc2 sets all the buttons in the main window to blue by default
Packit 98cdb6
include "testgtkrc2"
Packit 98cdb6
Packit 98cdb6
double-click_timeout = 42
Packit 98cdb6
bell-duration = 39
Packit 98cdb6
bell_duration = 40
Packit 98cdb6
Packit 98cdb6
# gtk-cursor-blink-time = 200
Packit 98cdb6
# gtk-menu-bar-accel = F10
Packit 98cdb6
Packit 98cdb6
style "global-style-properties"
Packit 98cdb6
{
Packit 98cdb6
#  xthickness = 20
Packit 98cdb6
  GtkButton::child_displacement_x = 1
Packit 98cdb6
  GtkButton::child_displacement_y = 1
Packit 98cdb6
#  GtkWidget::cursor_color = "#ff0000"
Packit 98cdb6
  GtkToolbar::space_size = 10
Packit 98cdb6
  GtkToolbar::space_style = line
Packit 98cdb6
  GtkToolbar::button_relief = none
Packit 98cdb6
  GtkButtonBox::child_min_width = 0
Packit 98cdb6
  GtkButtonBox::child_min_height = 0
Packit 98cdb6
  GtkArrow::arrow-scaling = 1.0
Packit 98cdb6
  GtkEntry::invisible-char = 10046
Packit 98cdb6
}
Packit 98cdb6
Packit 98cdb6
class "GtkWidget" style "global-style-properties"
Packit 98cdb6
Packit 98cdb6
style "defaultfont"
Packit 98cdb6
{
Packit 98cdb6
  font_name = "Sans 12"
Packit 98cdb6
Packit 98cdb6
  Gtest::foo = 47
Packit 98cdb6
  Gtest::bar = 47
Packit 98cdb6
#  GtkScrollbar::spacing = 33
Packit 98cdb6
#  GtkButton::color = { 3, 2,45, 6, 6, 4, 23 }
Packit 98cdb6
}
Packit 98cdb6
Packit 98cdb6
style "myicons"
Packit 98cdb6
{
Packit 98cdb6
  stock["gtk-dialog-warning"] = 
Packit 98cdb6
    { 
Packit 98cdb6
      { "3DRings.xpm", *, *, *} 
Packit 98cdb6
    }
Packit 98cdb6
}
Packit 98cdb6
Packit 98cdb6
class "GtkImage" style "myicons"
Packit 98cdb6
Packit 98cdb6
# common default
Packit 98cdb6
class "GtkWidget" style "defaultfont"
Packit 98cdb6
Packit 98cdb6
style "window"
Packit 98cdb6
{
Packit 98cdb6
# bg_pixmap[NORMAL] = "marble.xpm"
Packit 98cdb6
}
Packit 98cdb6
Packit 98cdb6
style "scale"
Packit 98cdb6
{
Packit 98cdb6
  fg[NORMAL] = { 1.0, 0, 0 }
Packit 98cdb6
  bg_pixmap[NORMAL] = "<parent>"
Packit 98cdb6
}
Packit 98cdb6
Packit 98cdb6
style "button" = "default"
Packit 98cdb6
{
Packit 98cdb6
#  fg[PRELIGHT] = { 1.0, 1.0, 1.0 }
Packit 98cdb6
#  bg[PRELIGHT] = { 0, 0, 0.75 }
Packit 98cdb6
#  bg[PRELIGHT] = { 0.75, 0, 0x00 }
Packit 98cdb6
}
Packit 98cdb6
Packit 98cdb6
style "label" = "default"
Packit 98cdb6
{
Packit 98cdb6
 base[PRELIGHT] = "gray"
Packit 98cdb6
 base[ACTIVE] = mix (0.9, "gray", "purple")
Packit 98cdb6
}
Packit 98cdb6
Packit 98cdb6
class "GtkLabel" style "label"
Packit 98cdb6
Packit 98cdb6
style "toggle_button" = "button"
Packit 98cdb6
{
Packit 98cdb6
  fg[NORMAL] = { 1.0, 0, 0 }
Packit 98cdb6
  fg[ACTIVE] = { 1.0, 0, 0 }
Packit 98cdb6
#  bg_pixmap[ACTIVE] = "check-y.xpm"
Packit 98cdb6
#  bg_pixmap[NORMAL] = "check-n.xpm"
Packit 98cdb6
}
Packit 98cdb6
Packit 98cdb6
style "text"
Packit 98cdb6
{
Packit 98cdb6
  bg_pixmap[NORMAL] = "marble.xpm"
Packit 98cdb6
  text[NORMAL] = { 1.0, 1.0, 1.0 }
Packit 98cdb6
  fg[NORMAL] = { 1.0, 1.0, 1.0 }
Packit 98cdb6
  base[NORMAL] = { 0.0, 0.0, 0.0 }
Packit 98cdb6
}
Packit 98cdb6
Packit 98cdb6
style "slider"
Packit 98cdb6
{
Packit 98cdb6
  fg[NORMAL] = { 1.0, 1.0, 1.0 }
Packit 98cdb6
  bg[NORMAL] = { 0.0, 0.0, 1.0 }
Packit 98cdb6
  bg[ACTIVE] = { 0.0 ,0.0, 0.5 }
Packit 98cdb6
  bg[PRELIGHT] = { 0.75 ,0.75, 1.0 }
Packit 98cdb6
}
Packit 98cdb6
Packit 98cdb6
style "ruler"
Packit 98cdb6
{
Packit 98cdb6
  font_name = 'Sans 8'
Packit 98cdb6
}
Packit 98cdb6
Packit 98cdb6
style "curve"
Packit 98cdb6
{
Packit 98cdb6
  fg[NORMAL] = { 58000, 0, 0 }                  # red
Packit 98cdb6
}
Packit 98cdb6
Packit 98cdb6
style "red-bar-parent"
Packit 98cdb6
{
Packit 98cdb6
  color["my-red"] = "red"
Packit 98cdb6
  color["my-other-red"] = { 0.95, .55, 0.55 }
Packit 98cdb6
}
Packit 98cdb6
Packit 98cdb6
style "red-bar" = "red-bar-parent"
Packit 98cdb6
{
Packit 98cdb6
  color["my-light-red"] = lighter (lighter (@my-red))
Packit 98cdb6
Packit 98cdb6
  bg[PRELIGHT] = @my-light-red
Packit 98cdb6
}
Packit 98cdb6
Packit 98cdb6
# override testgtk2, introduce the green color in the button list
Packit 98cdb6
style 'button_list' = 'button'
Packit 98cdb6
{
Packit 98cdb6
  font_name = "Monospace 10"
Packit 98cdb6
  bg[PRELIGHT] = { 0, 0.75, 0x00 }
Packit 98cdb6
}
Packit 98cdb6
widget "main window.*GtkScrolledWindow.*GtkButton*" style "button_list"
Packit 98cdb6
Packit 98cdb6
style "checkbutton" {
Packit 98cdb6
#  GtkCheckButton::indicator-size = 27
Packit 98cdb6
}
Packit 98cdb6
Packit 98cdb6
class "GtkCheckButton" style "checkbutton"
Packit 98cdb6
Packit 98cdb6
Packit 98cdb6
class "GtkScrollbar" style "red-bar"
Packit 98cdb6
Packit 98cdb6
widget_class "GtkWindow" style "window"
Packit 98cdb6
widget_class "GtkDialog" style "window"
Packit 98cdb6
widget_class "GtkFileSelection" style "window"
Packit 98cdb6
widget_class "*Gtk*Scale" style "scale"
Packit 98cdb6
widget_class "*GtkCheckButton*" style "toggle_button"
Packit 98cdb6
widget_class "*GtkRadioButton*" style "toggle_button"
Packit 98cdb6
widget_class "*GtkButton*" style "button"
Packit 98cdb6
widget_class "*Ruler" style "ruler"
Packit 98cdb6
widget_class "*GtkText" style "text"
Packit 98cdb6
widget "*GtkCurve" style "curve"
Packit 98cdb6
Packit 98cdb6
binding "test1"
Packit 98cdb6
{
Packit 98cdb6
  bind "<ctrl>1" {
Packit 98cdb6
    "debug-msg" ("jup!")
Packit 98cdb6
  }
Packit 98cdb6
}
Packit 98cdb6
Packit 98cdb6
binding "test2"
Packit 98cdb6
{
Packit 98cdb6
  bind "<ctrl>1" {
Packit 98cdb6
    "debug-msg" ("hallo and")
Packit 98cdb6
    "debug-msg" ("huhu")
Packit 98cdb6
  }
Packit 98cdb6
}
Packit 98cdb6
Packit 98cdb6
# possible priorities are (in ascending order):
Packit 98cdb6
# lowest
Packit 98cdb6
# gtk         (used by gtk for internal class bindings)
Packit 98cdb6
# application (for hard coded bindings on application basis)
Packit 98cdb6
# rc          (used implicitel by rc files)
Packit 98cdb6
# highest
Packit 98cdb6
class "GtkCList" binding  "test1"           # implicit : rc
Packit 98cdb6
#class "GtkWindow" binding : highest "test2" # override "rc" priority
Packit 98cdb6
Packit 98cdb6
binding "clist-test"
Packit 98cdb6
{
Packit 98cdb6
  bind "j" {
Packit 98cdb6
    "scroll-vertical" (step-backward, 0.0)
Packit 98cdb6
  }
Packit 98cdb6
  bind "k" {
Packit 98cdb6
    "scroll-vertical" (step-forward, 0.0)
Packit 98cdb6
  }
Packit 98cdb6
}
Packit 98cdb6
Packit 98cdb6
class "GtkCList" binding "clist-test"
Packit 98cdb6
Packit 98cdb6
style "testthickness" {
Packit 98cdb6
  xthickness = 15
Packit 98cdb6
  ythickness = 15
Packit 98cdb6
}
Packit 98cdb6
Packit 98cdb6
#class "GtkFrame" style "testthickness"
Packit 98cdb6
Packit 98cdb6
# Test ordering of RC file priorities
Packit 98cdb6
Packit 98cdb6
style "testgtk-red-style" {
Packit 98cdb6
  fg[NORMAL] = "red"
Packit 98cdb6
}
Packit 98cdb6
Packit 98cdb6
style "testgtk-green-style" {
Packit 98cdb6
  fg[NORMAL] = "green"
Packit 98cdb6
}
Packit 98cdb6
Packit 98cdb6
style "testgtk-blue-style" {
Packit 98cdb6
 fg[NORMAL] = "blue"
Packit 98cdb6
}
Packit 98cdb6
Packit 98cdb6
Packit 98cdb6
widget_class "*.GtkAspectFrame.*.GtkLabel" style "testgtk-green-style"
Packit 98cdb6
widget_class "*.GtkAspectFrame.*.GtkLabel" style "testgtk-blue-style"  # override because it's later
Packit 98cdb6
Packit 98cdb6
widget "*.testgtk-red-label" style "testgtk-red-style"  # override because it's widget, not widget_class
Packit 98cdb6
Packit 98cdb6
widget "*.testgtk-green-label" style : highest "testgtk-green-style"
Packit 98cdb6
# overrides the following, because it is higher priority
Packit 98cdb6
widget "*.testgtk-green-label" style "testgtk-red-style"