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