File: gtkrc

package info (click to toggle)
gabedit 2.4.2-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 17,236 kB
  • sloc: ansic: 294,923; cpp: 2,081; sh: 1,111; makefile: 507; csh: 181
file content (165 lines) | stat: -rw-r--r-- 5,473 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
     # pixmap_path "<dir 1>:<dir 2>:<dir 3>:..."
     #
     pixmap_path "/usr/include/X11R6/pixmaps:/home/imain/pixmaps"
     #
     # style <name> [= <name>]
     # {
     #   <option>
     # }
     #
     # widget <widget_set> style <style_name>
     # widget_class <widget_class_set> style <style_name>

     # Here is a list of all the possible states.  Note that some do not apply to
     # certain widgets.
     #
     # NORMAL - The normal state of a widget, without the mouse over top of
     # it, and not being pressed, etc.
     #
     # PRELIGHT - When the mouse is over top of the widget, colors defined
     # using this state will be in effect.
     #
     # ACTIVE - When the widget is pressed or clicked it will be active, and
     # the attributes assigned by this tag will be in effect.
     #
     # INSENSITIVE - When a widget is set insensitive, and cannot be
     # activated, it will take these attributes.
     #
     # SELECTED - When an object is selected, it takes these attributes.
     #
     # Given these states, we can set the attributes of the widgets in each of
     # these states using the following directives.
     #
     # fg - Sets the foreground color of a widget.
     # fg - Sets the background color of a widget.
     # bg_pixmap - Sets the background of a widget to a tiled pixmap.
     # font - Sets the font to be used with the given widget.
     #

     # This sets a style called "button".  The name is not really important, as
     # it is assigned to the actual widgets at the bottom of the file.

     style "window"
     {
       #This sets the padding around the window to the pixmap specified.
       #bg_pixmap[<STATE>] = "<pixmap filename>"
       #bg_pixmap[NORMAL] = "warning.xpm"
       fg[NORMAL] = { 1.0, 1.0, 1.0 }
       bg[NORMAL] = { 0.7, 0.7, 0.7 }
     }

     style "scale"
     {
       #Sets the foreground color (font color) to red when in the "NORMAL"
       #state.

       fg[NORMAL] = { 1.0, 0, 0 }

       #Sets the background pixmap of this widget to that of its parent.
       bg_pixmap[NORMAL] = "<parent>"
     }

     style "button"
     {
       # This shows all the possible states for a button.  The only one that
       # doesn't apply is the SELECTED state.

       fg[PRELIGHT] = { 0, 0.1, 1.0 }
       bg[PRELIGHT] = { 0.4, 0.4, 0.4 }
       bg[ACTIVE] = { 1.0, 0, 0 }
       fg[ACTIVE] = { 0, 1.0, 0 }
       bg[NORMAL] = { 0.65, 0.65, 0.65 }
       fg[NORMAL] = { .0, 0.0, 1.0 }
       bg[INSENSITIVE] = { 1.0, 1.0, 1.0 }
       fg[INSENSITIVE] = { 1.0, 0, 1.0 }
     }

     # In this example, we inherit the attributes of the "button" style and then
     # override the font and background color when prelit to create a new
     # "main_button" style.

     style "main_button" = "button"
     {
       font = "-adobe-helvetica-medium-r-normal--*-60-*-*-*-*-*-*"
       bg[PRELIGHT] = { 0.75, 0, 0 }
     }

     style "toggle_button" = "button"
     {
       fg[NORMAL] = { 0.0, 0.0, 0.0 }
       fg[ACTIVE] = { 0.0, 0.0, 1.0 }

       # This sets the background pixmap of the toggle_button to that of its
       # parent widget (as defined in the application).
       bg_pixmap[NORMAL] = "<parent>"
     }

     style "text"
     {
       #bg_pixmap[NORMAL] = "marble.xpm"
       fg[NORMAL] = { 1., 0., 0. }
       bg[NORMAL] = { 0.0, 0.0, 0.0 }
	font = "-adobe-times-medium-r-normal--*-140-*-*-*-*-*-*"
     }

     style "frame"
     {
       fg[NORMAL] = { 1., 0., 0. }
       bg[NORMAL] = { 0.5, 0.5, 0.5 }
	font = "-adobe-times-medium-r-normal--*-120-*-*-*-*-*-*"
     }

     style "notebook"
     {
       fg[NORMAL] = { 0., 0., 1. }
       bg[NORMAL] = { 0.8, 0.8, 0.8 }
     #bg[NORMAL] = { 0.4, 0.8, 0.8 }
	font = "-adobe-times-medium-r-normal--*-100-*-*-*-*-*-*"
     }
     style "optionmenu"
     {
	font = "-adobe-times-medium-r-normal--*-100-*-*-*-*-*-*"
       fg[NORMAL] = { 0., 0., 1. }
       bg[NORMAL] = { 0.65, 0.65, 0.65 }
     }
     style "menuitem"
     {
	font = "-adobe-times-medium-r-normal--*-100-*-*-*-*-*-*"
       fg[NORMAL] = { 0., 0., 1. }
       bg[NORMAL] = { 0.65, 0.65, 0.65 }
     }
     style "menubar"
     {
       fg[NORMAL] = { 1., 0., 0. }
       bg[NORMAL] = { 0.65, 0.65, 0.65 }
	font = "-adobe-times-medium-r-normal--*-100-*-*-*-*-*-*"
     }

     style "ruler"
     {
       font = "-adobe-helvetica-medium-r-normal--*-80-*-*-*-*-*-*"
     }

     # pixmap_path "~/.pixmaps"

     # These set the widget types to use the styles defined above.
     # The widget types are listed in the class hierarchy, but could probably be
     # just listed in this document for the users reference.

     widget_class "GtkWindow" style "window"
     widget_class "GtkDialog" style "window"
     widget_class "GtkFileSelection" style "window"
     widget_class "*Gtk*Scale" style "scale"
     widget_class "*GtkCheckButton*" style "toggle_button"
     widget_class "*GtkRadioButton*" style "toggle_button"
     widget_class "*GtkButton*" style "button"
     widget_class "*Ruler" style "ruler"
     widget_class "*GtkText" style "text"
     widget_class "*GtkFrame" style "frame"
     widget_class "*GtkNotebook" style "notebook"
     widget_class "*GtkOptionMenu" style "optionmenu"
     widget_class "*GtkMenuItem" style "menuitem"
     widget_class "*GtkMenuBar" style "menubar"

     # This sets all the buttons that are children of the "main window" to
     # the main_button style.  These must be documented to be taken advantage of.