Statistics
| Branch: | Revision:

root / hope_font

History | View | Annotate | Download (4.3 KB)

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