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