1# pixmap_path "<dir 1>:<dir 2>:<dir 3>:..."
2#
3# include "rc-file"
4#
5# style <name> [= <name>]
6# {
7#   <option>
8# }
9#
10# widget <widget_set> style <style_name>
11# widget_class <widget_class_set> style <style_name>
12
13# testgtkrc2 sets all the buttons in the main window to blue by default
14include "testgtkrc2"
15
16double-click_timeout = 42
17bell-duration = 39
18bell_duration = 40
19
20# gtk-cursor-blink-time = 200
21# gtk-menu-bar-accel = F10
22
23style "global-style-properties"
24{
25#  xthickness = 20
26  GtkButton::child_displacement_x = 1
27  GtkButton::child_displacement_y = 1
28#  GtkWidget::cursor_color = "#ff0000"
29  GtkToolbar::space_size = 10
30  GtkToolbar::space_style = line
31  GtkToolbar::button_relief = none
32  GtkButtonBox::child_min_width = 0
33  GtkButtonBox::child_min_height = 0
34  GtkArrow::arrow-scaling = 1.0
35  GtkEntry::invisible-char = 10046
36}
37
38class "GtkWidget" style "global-style-properties"
39
40style "defaultfont"
41{
42  font_name = "Sans 12"
43
44  Gtest::foo = 47
45  Gtest::bar = 47
46#  GtkScrollbar::spacing = 33
47#  GtkButton::color = { 3, 2,45, 6, 6, 4, 23 }
48}
49
50style "myicons"
51{
52  stock["gtk-dialog-warning"] =
53    {
54      { "3DRings.xpm", *, *, *}
55    }
56}
57
58class "GtkImage" style "myicons"
59
60# common default
61class "GtkWidget" style "defaultfont"
62
63style "window"
64{
65# bg_pixmap[NORMAL] = "marble.xpm"
66}
67
68style "scale"
69{
70  fg[NORMAL] = { 1.0, 0, 0 }
71  bg_pixmap[NORMAL] = "<parent>"
72}
73
74style "button" = "default"
75{
76#  fg[PRELIGHT] = { 1.0, 1.0, 1.0 }
77#  bg[PRELIGHT] = { 0, 0, 0.75 }
78#  bg[PRELIGHT] = { 0.75, 0, 0x00 }
79}
80
81style "label" = "default"
82{
83 base[PRELIGHT] = "gray"
84 base[ACTIVE] = mix (0.9, "gray", "purple")
85}
86
87class "GtkLabel" style "label"
88
89style "toggle_button" = "button"
90{
91  fg[NORMAL] = { 1.0, 0, 0 }
92  fg[ACTIVE] = { 1.0, 0, 0 }
93#  bg_pixmap[ACTIVE] = "check-y.xpm"
94#  bg_pixmap[NORMAL] = "check-n.xpm"
95}
96
97style "text"
98{
99  bg_pixmap[NORMAL] = "marble.xpm"
100  text[NORMAL] = { 1.0, 1.0, 1.0 }
101  fg[NORMAL] = { 1.0, 1.0, 1.0 }
102  base[NORMAL] = { 0.0, 0.0, 0.0 }
103}
104
105style "slider"
106{
107  fg[NORMAL] = { 1.0, 1.0, 1.0 }
108  bg[NORMAL] = { 0.0, 0.0, 1.0 }
109  bg[ACTIVE] = { 0.0 ,0.0, 0.5 }
110  bg[PRELIGHT] = { 0.75 ,0.75, 1.0 }
111}
112
113style "ruler"
114{
115  font_name = 'Sans 8'
116}
117
118style "curve"
119{
120  fg[NORMAL] = { 58000, 0, 0 }                  # red
121}
122
123style "red-bar-parent"
124{
125  color["my-red"] = "red"
126  color["my-other-red"] = { 0.95, .55, 0.55 }
127}
128
129style "red-bar" = "red-bar-parent"
130{
131  color["my-light-red"] = lighter (lighter (@my-red))
132
133  bg[PRELIGHT] = @my-light-red
134}
135
136# override testgtk2, introduce the green color in the button list
137style 'button_list' = 'button'
138{
139  font_name = "Monospace 10"
140  bg[PRELIGHT] = { 0, 0.75, 0x00 }
141}
142widget "main window.*GtkScrolledWindow.*GtkButton*" style "button_list"
143
144style "checkbutton" {
145#  GtkCheckButton::indicator-size = 27
146}
147
148class "GtkCheckButton" style "checkbutton"
149
150
151class "GtkScrollbar" style "red-bar"
152
153widget_class "GtkWindow" style "window"
154widget_class "GtkDialog" style "window"
155widget_class "GtkFileSelection" style "window"
156widget_class "*Gtk*Scale" style "scale"
157widget_class "*GtkCheckButton*" style "toggle_button"
158widget_class "*GtkRadioButton*" style "toggle_button"
159widget_class "*GtkButton*" style "button"
160widget_class "*Ruler" style "ruler"
161widget_class "*GtkText" style "text"
162widget "*GtkCurve" style "curve"
163
164binding "test1"
165{
166  bind "<ctrl>1" {
167    "debug-msg" ("jup!")
168  }
169}
170
171binding "test2"
172{
173  bind "<ctrl>1" {
174    "debug-msg" ("hallo and")
175    "debug-msg" ("huhu")
176  }
177}
178
179# possible priorities are (in ascending order):
180# lowest
181# gtk         (used by gtk for internal class bindings)
182# application (for hard coded bindings on application basis)
183# rc          (used implicitel by rc files)
184# highest
185class "GtkCList" binding  "test1"           # implicit : rc
186#class "GtkWindow" binding : highest "test2" # override "rc" priority
187
188binding "clist-test"
189{
190  bind "j" {
191    "scroll-vertical" (step-backward, 0.0)
192  }
193  bind "k" {
194    "scroll-vertical" (step-forward, 0.0)
195  }
196}
197
198class "GtkCList" binding "clist-test"
199
200style "testthickness" {
201  xthickness = 15
202  ythickness = 15
203}
204
205#class "GtkFrame" style "testthickness"
206
207# Test ordering of RC file priorities
208
209style "testgtk-red-style" {
210  fg[NORMAL] = "red"
211}
212
213style "testgtk-green-style" {
214  fg[NORMAL] = "green"
215}
216
217style "testgtk-blue-style" {
218 fg[NORMAL] = "blue"
219}
220
221
222widget_class "*.GtkAspectFrame.*.GtkLabel" style "testgtk-green-style"
223widget_class "*.GtkAspectFrame.*.GtkLabel" style "testgtk-blue-style"  # override because it's later
224
225widget "*.testgtk-red-label" style "testgtk-red-style"  # override because it's widget, not widget_class
226
227widget "*.testgtk-green-label" style : highest "testgtk-green-style"
228# overrides the following, because it is higher priority
229widget "*.testgtk-green-label" style "testgtk-red-style"
230