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