Ticket #305: sugar-100.gtkrc

File sugar-100.gtkrc, 19.2 KB (added by ishan, 14 years ago)
Line 
1
2
3gtk-icon-sizes="gtk-menu=33,33:gtk-dnd=33,33:gtk-small-toolbar=33,33:gtk-button=33,33:gtk-large-toolbar=55,55"
4
5style "default"
6{
7    # Will be overriden in some widgets
8    color["focus_line"] = "#FFFFFF"
9
10    bg[NORMAL] = "#808080"
11    bg[PRELIGHT] = "#808080"
12    bg[ACTIVE] = "#FFFFFF"
13    bg[SELECTED] = "#E5E5E5"
14
15    fg[NORMAL]        = "#000000"
16    fg[ACTIVE]        = "#000000"
17    fg[SELECTED]      = "#FFFFFF"
18    fg[PRELIGHT]      = "#FFFFFF"
19
20    text[NORMAL] = "#000000" # button_grey? 1. need to patch GTK+ to use ACTIVE when focused, 2. what color should this really be?
21    text[ACTIVE] = "#000000"
22    text[SELECTED] = "#000000"
23    text[PRELIGHT] = "#000000"
24
25    base[NORMAL] = "#E5E5E5"
26    base[ACTIVE] = "#FFFFFF"
27    base[SELECTED] = "#A6A6A6"
28    base[PRELIGHT] = "#FFFFFF"
29
30    fg[INSENSITIVE] = "#808080"
31    text[INSENSITIVE] = "#808080"
32
33    xthickness = 2
34    ythickness = 2
35
36    # A lot of these will probably need to be changed, but this has to
37    # be done when the exact sizes are known
38    GtkWidget::interior-focus = 0
39    GtkWidget::focus-line-width = 1   # Prevents some drawing glitches
40    GtkWidget::focus-padding = 0
41    # 0.05 works good for both the sugar and sugar-xo themes
42    GtkWidget::cursor-aspect-ratio = 0.05
43
44    GtkWidget::wide-separators = 0
45    GtkWidget::separator-height = 2
46    GtkWidget::separator-width = 2
47   
48    GtkWidget::scroll-arrow-hlength = 15
49    GtkWidget::scroll-arrow-vlength = 15
50
51    GtkRange::activate-slider = 1
52
53    # We fake the default border in the theme
54    GtkButton::default-border = { 0, 0, 0, 0 }
55    GtkButton::default-outside-border = { 0, 0, 0, 0 }
56    GtkButton::image-spacing = 15
57
58    GtkEntry::progress-border = { 2, 2, 2, 2 }
59
60    GtkScrolledWindow::scrollbar-spacing = 0
61
62    GtkExpander::expander-size = 24
63    GtkExpander::expander-spacing = 2     # XXX
64
65    GtkTreeView::expander-size = 24
66
67    # we have to disable focus border for GtkTreeView, see #1261
68    GtkTreeView::interior-focus = 1
69    GtkTreeView::focus-line-width = 0
70   
71    GtkArrow::arrow-size = 1.0
72
73    GtkToolbar::shadow-type = GTK_SHADOW_NONE
74    GtkToolbar::space-size = 30
75
76    GtkProgressBar::min-horizontal-bar-height = 15
77    GtkProgressBar::min-vertical-bar-width = 15
78
79    GtkButtonBox::child-min-height = 45
80    GtkButtonBox::child-min-width = 45
81    GtkButtonBox::child-internal-pad-x = 0
82    GtkButtonBox::child-internal-pad-y = 0
83
84    # The following line hints to gecko (and possibly other appliations)
85    # that the entry should be drawn transparently on the canvas.
86    # Without this, gecko will fill in the background of the entry.
87    GtkEntry::honors-transparent-bg-hint = 1
88
89    engine "sugar" {
90        line_width = 2.0
91        thick_line_width = 3.5
92        subcell_size = 15
93
94        max_radius = 30
95    }
96}
97
98
99#############################################################
100# Styles that set default background/foreground colors
101#
102#  We almost always need two styles because of the X windows.
103#  For example bg[NORMAL] of a window (or eventbox) needs to
104#  be set to be the correct window color so that X fills the
105#  window correctly from the beginning, and it does not
106#  flash in the wrong color.
107#############################################################
108
109style "window"
110{
111    bg[NORMAL] = "#C0C0C0"
112}
113
114style "window-child"
115{
116    bg[INSENSITIVE] = "#C0C0C0"
117    base[INSENSITIVE] = "#C0C0C0"
118
119    fg[NORMAL] = "#000000"
120   
121    engine "sugar" {
122        parent_fg_color = "#000000"
123        parent_bg_color = "#C0C0C0"
124    }
125}
126
127
128style "white-bg"
129{
130    bg[NORMAL] = "#FFFFFF"
131}
132
133style "white-bg-child"
134{
135    bg[INSENSITIVE] = "#FFFFFF"
136    base[INSENSITIVE] = "#FFFFFF"
137
138    fg[NORMAL] = "#000000"
139   
140    engine "sugar" {
141        parent_fg_color = "#000000"
142        parent_bg_color = "#FFFFFF"
143    }
144}
145
146style "black-bg"
147{
148    bg[NORMAL] = "#000000"
149}
150
151style "black-bg-child"
152{
153    bg[INSENSITIVE] = "#000000"
154    base[INSENSITIVE] = "#000000"
155
156    fg[NORMAL] = "#FFFFFF"
157   
158    engine "sugar" {
159        parent_fg_color = "#FFFFFF"
160        parent_bg_color = "#000000"
161    }
162}
163
164
165style "groupbox-panel"
166{
167    bg[NORMAL] = "#A6A6A6"
168}
169
170style "groupbox-panel-child"
171{
172    bg[INSENSITIVE] = "#A6A6A6"
173    base[INSENSITIVE] = "#A6A6A6"
174   
175    fg[NORMAL] = "#000000"
176   
177    engine "sugar" {
178        parent_fg_color = "#000000"
179        parent_bg_color = "#A6A6A6"
180    }
181}
182
183style "groupbox-palette"
184{
185    bg[NORMAL] = "#282828"
186}
187
188style "groupbox-palette-child"
189{
190    bg[INSENSITIVE] = "#282828"
191    base[INSENSITIVE] = "#282828"
192   
193    fg[NORMAL] = "#FFFFFF"
194   
195    engine "sugar" {
196        parent_fg_color = "#FFFFFF"
197        parent_bg_color = "#282828"
198    }
199}
200
201style "menu"
202{
203    bg[NORMAL] = "#000000"
204    # Used for the arrow colour
205    fg[NORMAL]   = "#FFFFFF"
206    fg[PRELIGHT] = "#FFFFFF"
207    bg[ACTIVE] = "#808080"
208
209   
210    GtkMenu::scroll-arrow-vlength = 25
211    GtkMenu::horizontal-padding = 2
212    GtkMenu::vertical-padding   = 2
213    # This means the outline of the submenu overlaps with a palette.
214    # However in the case of two normal menus, they are next to each other.
215    # It is not possible to be smarter about this, because the style comes from
216    # the submenu.
217    GtkMenu::horizontal-offset  = 0
218    GtkMenu::vertical-offset    = 0
219
220    xthickness = 0
221    ythickness = 0
222}
223
224style "palette" = "menu"
225{
226    xthickness = 2
227    ythickness = 2
228}
229
230style "palette-menu" = "menu"
231{
232    GtkMenu::horizontal-padding = 0
233    GtkMenu::vertical-padding   = 0
234
235    xthickness = 0
236    ythickness = 15
237}
238
239# Can this all be moved in the menuitem style?
240style "menu-child"
241{
242    color["bg_color"] = "#000000"
243
244    fg[NORMAL]   = "#FFFFFF"
245    fg[PRELIGHT] = "#FFFFFF"
246   
247    bg[NORMAL] = "#808080"
248
249    bg[INSENSITIVE] = "#000000"
250    base[INSENSITIVE] = "#000000"
251   
252    engine "sugar" {
253        parent_fg_color = "#FFFFFF"
254        parent_bg_color = "#000000"
255    }
256}
257
258
259
260#########################################################
261#########################################################
262
263
264style "textview"
265{
266    # We always use white here
267    base[NORMAL]      = "#FFFFFF"
268   
269    GtkTextView::interior-focus = 1
270}
271
272style "scrollbar"
273{
274    GtkScrollbar::slider-width = 15
275    GtkScrollbar::trough-border = 0
276    GtkScrollbar::stepper-spacing = 0
277    GtkScrollbar::min-slider-length = 45
278    GtkScrollbar::has-forward-stepper = 0
279    GtkScrollbar::has-backward-stepper = 0
280    GtkScrollbar::has-secondary-forward-stepper = 0
281    GtkScrollbar::has-secondary-backward-stepper = 0
282
283    # Hack for mozilla as it does not obey the above style properties ...
284    # Really, mozilla should be fixed ...
285    GtkScrollbar::stepper-size = 1
286}
287
288# hints for the trough padding hacks
289# We cannot go trough GTK+, as we don't want a padding on all sides, but only one
290# If we wanted padding on all sides, trough-border would work great.
291style "hscrollbar" = "scrollbar"
292{
293    engine "sugar" {
294        hint = "hscrollbar"
295        scrollbar_border = 2
296    }
297}
298
299style "vscrollbar" = "scrollbar"
300{
301    engine "sugar" {
302        hint = "vscrollbar"
303        scrollbar_border = 2
304    }
305}
306
307style "hscrollbar-scrolled-window"
308{
309    GtkScrollbar::slider-width = 13
310    GtkScrollbar::stepper-spacing = 2
311    GtkScrollbar::has-forward-stepper = 1
312    GtkScrollbar::has-backward-stepper = 1
313    GtkScrollbar::stepper-size = 0
314
315    engine "sugar" {
316        hint = "hscrollbar-scrolled-window"
317    }
318}
319
320style "vscrollbar-scrolled-window"
321{
322    GtkScrollbar::slider-width = 13
323    GtkScrollbar::stepper-spacing = 2
324    GtkScrollbar::has-forward-stepper = 1
325    GtkScrollbar::has-backward-stepper = 1
326    GtkScrollbar::stepper-size = 0
327
328    engine "sugar" {
329        hint = "vscrollbar-scrolled-window"
330    }
331}
332
333style "scale"
334{
335    GtkWidget::focus-line-width = 0
336
337    bg[NORMAL] = "#808080"
338
339    # "square" slider (really round of course)
340    # Same as indicator-size?
341    GtkRange::slider-width = 32
342    GtkScale::slider-length = 32
343    GtkRange::trough-border = 0
344    GtkRange::stepper-spacing = 0
345    GtkRange::trough-side-details = 1
346}
347
348# hints for the trough sizing hacks
349style "hscale" = "scale"
350{
351    engine "sugar" {
352        hint = "hscale"
353    }
354}
355
356style "vscale" = "scale"
357{
358    engine "sugar" {
359        hint = "vscale"
360    }
361}
362
363style "spinbutton"
364{
365    bg[NORMAL]  = "#808080"
366    bg[ACTIVE]  = "#FFFFFF"
367    fg[NORMAL]  = "#FFFFFF"
368    fg[ACTIVE]  = "#000000"
369
370   
371   
372
373    # small inner border and a large x/ythickness for entries
374    # to reduce the number of hacks needed :-)
375    xthickness = 15
376    ythickness = 7
377    GtkWidget::focus-line-width = 0
378
379    # This tries to get a height of exactly 45 pixel for the entry.
380    GtkEntry::inner-border = { 0, 0,
381                               4, 3 }
382
383    engine "sugar" {
384        hint = "spinbutton"
385    }
386}
387
388
389style "frame"
390{
391    bg[NORMAL] = "#282828"
392
393    engine "sugar" {
394        parent_bg_color = "#282828"
395        parent_fg_color = "#FFFFFF"
396    }
397}
398
399style "notebook-tab"
400{
401    bg[ACTIVE] = "#808080"
402    fg[ACTIVE] = "#FFFFFF"
403}
404
405style "notebook-panel"
406{
407    GtkNotebook::tab-overlap = -2
408    GtkNotebook::tab-curvature = 6
409   
410    xthickness = 0
411    ythickness = 0
412   
413    bg[NORMAL] = "#A6A6A6"
414}
415
416style "toolbox-notebook"
417{
418    GtkNotebook::tab-overlap = -2
419   
420    xthickness = 0
421    ythickness = 0
422}
423
424style "toolbutton"
425{
426    xthickness = 0
427    ythickness = 0
428    GtkButton::inner-border = { 9,
429                                9,
430                                9,
431                                9 }
432    GtkWidget::focus-padding = 0
433
434    bg[PRELIGHT] = "#000000"
435    bg[ACTIVE] = "#808080"
436    bg[NORMAL] = "#000000"
437
438    fg[NORMAL] = "#FFFFFF"
439    fg[ACTIVE] = "#FFFFFF"
440    fg[PRELIGHT] = "#FFFFFF"
441
442    engine "sugar" {
443        max_radius = 5.0
444        fake_padding = 6
445    }
446}
447
448style "separatortoolbutton"
449{
450    # The sizing is handled in the engine.
451    bg[NORMAL] = "#808080"
452}
453
454style "toolbar"
455{
456    xthickness = 0
457    ythickness = 0
458
459    bg[NORMAL] = "#282828"
460    bg[INSENSITIVE] = "#282828"
461    base[INSENSITIVE] = "#282828"
462
463    engine "sugar" {
464        parent_fg_color = "#FFFFFF"
465        parent_bg_color = "#282828"
466    }
467}
468
469style "toolbox"
470{
471    fg[NORMAL] = "#FFFFFF"
472    fg[ACTIVE] = "#FFFFFF"
473
474    bg[NORMAL] = "#282828"
475    bg[INSENSITIVE] = "#282828"
476    base[INSENSITIVE] = "#282828"
477
478    engine "sugar" {
479        parent_fg_color = "#FFFFFF"
480        parent_bg_color = "#282828"
481    }
482}
483
484style "panel"
485{
486    bg[NORMAL] = "#C0C0C0"
487    fg[NORMAL] = "#000000"
488}
489
490style "entry"
491{
492    color["focus_line"] = "#E5E5E5"
493
494   
495   
496
497    # small inner border and a large x/ythickness for entries
498    # to reduce the number of hacks needed :-)
499    xthickness = 9
500    ythickness = 7
501    GtkWidget::focus-line-width = 0
502
503    # Colors for the progress bar.
504    bg[SELECTED] = "#A6A6A6"
505    fg[SELECTED] = "#000000"
506
507    # This tries to get a height of exactly 45 pixel for the entry.
508    GtkEntry::inner-border = { 6, 6,
509                               4, 3 }
510}
511
512style "button"
513{
514   
515    # It would be nicer to just set the inner-border, but that does not work
516    # for combo boxes ... The combobox ignores it, so set it to 0px
517    # See http://bugzilla.gnome.org/show_bug.cgi?id=485762
518
519    GtkButton::inner-border = { 0, 0, 0, 0 }
520
521    # So set the x/ythickness; y-padding is 15 overall
522    xthickness = 6
523    ythickness = 6
524
525
526    fg[NORMAL] = "#FFFFFF"
527    fg[ACTIVE] = "#000000"
528
529    bg[NORMAL] = "#808080"
530}
531
532style "combobox"
533{
534    # "Disable" the ACTIVE state of the button, it only creates problems :-(
535    bg[ACTIVE] = "#808080"
536    fg[ACTIVE] = "#FFFFFF"
537
538    # Work around GTK+ bug #382646
539    text[NORMAL]      = "#FFFFFF"
540    text[ACTIVE]      = "#FFFFFF"
541    text[PRELIGHT]    = "#FFFFFF"
542}
543
544style "comboboxentry"
545{
546    # Copied from the "default" style. Part of the workaround for bug #382646.
547    text[NORMAL] = "#000000"
548    text[ACTIVE] = "#000000"
549    text[SELECTED] = "#000000"
550    text[PRELIGHT] = "#000000"
551
552    # It just happens that the entry xthickness works good for the button,
553    # which simplefies matters a bit.
554    xthickness = 9
555
556    engine "sugar" {
557        hint = "comboboxentry"
558    }
559}
560
561style "checkbutton"
562{
563    base[NORMAL]      = "#FFFFFF"
564    base[PRELIGHT]    = "#FFFFFF"
565    base[ACTIVE]      = "#000000"
566
567    text[PRELIGHT]    = "#282828"
568    text[NORMAL]      = "#282828"
569    text[ACTIVE]      = "#282828"
570
571    # I won't get the exact sizing, but this should be pretty close
572    GtkCheckButton::indicator-size = 26
573    GtkCheckButton::indicator-spacing = 3
574    GtkWidget::focus-padding = 3
575
576    engine "sugar" {
577        # Reset the colors to the normal color again
578        # as they were overriden by the button style
579        fg[NORMAL]        = parent_fg_color
580        fg[PRELIGHT]      = parent_fg_color
581        fg[ACTIVE]        = parent_fg_color
582    }
583}
584
585style "progressbar"
586{
587    # text[PRELIGHT] is used for the bar in the sugar engine
588    text[PRELIGHT] = "#FFFFFF"
589
590    # Text on top of the bar
591    fg[PRELIGHT] = "#000000"
592    xthickness = 2
593    ythickness = 2
594
595    engine "sugar" {
596        # Someone seems to have decided, that the background fill of a progress
597        # bar should be done with bg[ACTIVE].
598        bg[ACTIVE] = parent_bg_color
599
600        # Color to fill the progress bar ("transparent" usually, except for the
601        # white background case)
602        bg[NORMAL] = parent_bg_color
603        fg[NORMAL] = parent_fg_color
604    }
605}
606
607style "progressbar-on-white" {
608    bg[NORMAL] = "#C0C0C0"
609    fg[NORMAL] = "#000000"
610}
611
612style "menuitem"
613{
614    GtkMenuItem::horizontal-padding = 0
615    GtkMenuItem::arrow-spacing = 15
616    GtkMenuItem::toggle-spacing = 15
617
618    bg[PRELIGHT] = "#808080"
619
620    # Work around bug #382646
621    text[PRELIGHT]    = "#FFFFFF"
622    text[NORMAL]      = "#FFFFFF"
623    text[ACTIVE]      = "#FFFFFF"
624
625    xthickness = 15
626    ythickness = 10
627}
628
629style "checkmenuitem"
630{
631    GtkCheckMenuItem::indicator-size = 26
632    GtkMenuItem::toggle-spacing = 10
633
634    ythickness = 10
635
636    # This is only there because of bug #382646 ...
637    base[NORMAL]      = "#FFFFFF"
638    base[PRELIGHT]    = "#FFFFFF"
639    base[ACTIVE]      = "#E5E5E5"
640
641    text[PRELIGHT]    = "#282828"
642    text[NORMAL]      = "#282828"
643    text[ACTIVE]      = "#282828"
644}
645
646style "imagemenuitem"
647{
648    # Assume a 33px image and height of 60
649    ythickness = 6
650}
651
652style "separatormenuitem"
653{
654    GtkWidget::wide-separators = 1
655    GtkWidget::separator-height = 30
656
657    ythickness = 0
658    xthickness = 0
659}
660
661style "trayicon"
662{
663    bg[PRELIGHT] = "#000000"
664    bg[ACTIVE] = "#808080"
665}
666
667style "parent-bg"
668{
669    engine "sugar" {
670        bg[NORMAL] = parent_bg_color
671        bg[INSENSITIVE] = parent_bg_color
672    }
673}
674
675####################################################################
676# Default style, setting some generic options and style properties
677####################################################################
678class "GtkWidget" style "default"
679
680
681####################################################################
682# Styles that apply the different background (and foreground) colors
683####################################################################
684
685# This one should probably be the default (ie. no window-child style)
686widget_class "<GtkWindow>"               style "window"
687widget_class "<GtkWindow>*"              style "window-child"
688
689widget_class "*<SugarAlert>"               style "black-bg"
690widget_class "*<SugarAlert>*"              style "black-bg-child"
691
692widget_class "*<SugarSectionView>"       style "white-bg"
693widget_class "*<SugarSectionView>*"      style "white-bg-child"
694
695
696# The notebook is very high, so that everything is overriden
697# Only the color of the tab labels needs to be modified inside the
698# notebooks in this style (and the widget itself).
699# Assume that there is either just a normal label in the notebook tab, or
700# it is inside a GtkBox (H- or VBox) together with eg. a close button.
701widget_class "*<GtkNotebook>"                        style "notebook-tab"
702widget_class "*<GtkNotebook>.<GtkLabel>"             style "notebook-tab"
703widget_class "*<GtkNotebook>.<GtkBox>.<GtkLabel>"    style "notebook-tab"
704
705
706# SugarPalette and Menu
707widget_class "*<GtkMenu>"               style "menu"
708widget_class "<SugarPaletteWindow>"           style "palette"
709widget_class "<SugarPaletteWindow>.*"         style "menu-child"
710widget_class "<SugarPaletteWindow>*<GtkMenu>" style "palette-menu"
711widget_class "*<GtkMenuShell>.*"        style "menu-child"
712
713# SugarFrameWindow
714widget_class "*<SugarFrameWindow>*"    style "frame"
715
716# SugarPanel
717widget_class "*<SugarPanel>*"          style "panel"
718
719
720# GroupBoxes (don't set bg[NORMAL] on the widget itself)
721widget_class "<GtkWindow>*<SugarGroupBox>*"   style "groupbox-panel-child"
722
723widget_class "<GtkWindow>*<GtkNotebook>*"   style "groupbox-panel-child"
724widget_class "<GtkWindow>*<GtkNotebook>"    style "notebook-panel"
725
726
727widget_class "<SugarPaletteWindow>*<SugarGroupBox>*"   style "groupbox-palette-child"
728
729
730# SugarToolbox
731#widget_class "*<SugarToolbox>" style "toolbox"
732#widget_class "*<SugarToolbox>*" style "toolbox-child"
733#widget_class "*<SugarToolbox>*<GtkEventBox>" style "toolbox"
734#widget_class "*<SugarToolbox>*<GtkLayout>"   style "toolbox"
735widget_class "*<SugarToolbox>*"        style "toolbox"
736widget_class "*<GtkToolbar>*"          style "toolbox"
737widget_class "*<SugarToolbox>.<GtkNotebook>" style "toolbox-notebook"
738
739
740####################################################################
741# Normal widget styles, using the above things
742####################################################################
743# The following only uses widget_class matches to get the priority
744# right. An alternative would be to lower the priority of the
745# background matches (which need widget_class) to eg. "application"
746
747widget_class "*<GtkMenuItem>*"            style "menuitem"
748widget_class "*<GtkCheckMenuItem>"        style "checkmenuitem"
749widget_class "*<GtkImageMenuItem>"        style "imagemenuitem"
750widget_class "*<GtkSeparatorMenuItem>*"   style "separatormenuitem"
751
752# Buttons and Combos
753widget_class "*<GtkButton>*"           style "button"
754widget_class "*<GtkCheckButton>*"      style "checkbutton"
755widget_class "*<GtkComboBox>*"         style "combobox"
756widget_class "*<GtkComboBoxEntry>*"    style "comboboxentry"
757widget_class "*<GtkCombo>*"            style "comboboxentry"
758
759# Entries
760widget_class "*<GtkEntry>"       style "entry"
761widget_class "*<GtkSpinButton>"  style "spinbutton"
762widget_class "*<GtkTextView>"    style "textview"
763
764
765# Misc widgets
766widget_class "*<GtkHScrollbar>"  style "hscrollbar"
767widget_class "*<GtkVScrollbar>"  style "vscrollbar"
768widget_class "*<GtkHScale>"      style "hscale"
769widget_class "*<GtkVScale>"      style "vscale"
770widget_class "*<GtkProgressBar>" style "progressbar"
771
772widget_class "*<SugarSectionView>*<GtkProgress>"  style "progressbar-on-white"
773
774
775# Scrolled window scrollbars
776widget_class "*<GtkScrolledWindow>.<GtkVScrollbar>" style "vscrollbar-scrolled-window"
777widget_class "*<GtkScrolledWindow>.<GtkHScrollbar>" style "hscrollbar-scrolled-window"
778
779# Toolbar
780widget_class "*<GtkToolButton>*"          style "toolbutton"
781widget_class "*<SugarColorToolButton>*"   style "toolbutton"
782widget_class "*<GtkSeparatorToolItem>*"   style "separatortoolbutton"
783widget_class "*<GtkToolbar>"              style "toolbar"
784
785# Tray
786widget_class "*<SugarTrayIcon>*" style "trayicon"
787
788# Widgets that should get the background color from the parent
789widget_class "*<GtkEventBox>"        style "parent-bg"
790widget_class "*<GtkLayout>"          style "parent-bg"
791widget_class "*<GtkViewport>"        style "parent-bg"
792widget_class "*<GtkDrawingArea>"     style "parent-bg"
793widget_class "*<GtkScrolledWindow>"  style "parent-bg"
794