1# vim:set ft=gtkrc ts=2 sw=2 sts=2 ai et:
2#
3# This is the main theme file, handling all the default widgets and theme
4# properties. Since GTK+ 2 is old, we need to overcome some of its limitations,
5# which is also mostly done in this file. Sadly not all of them can be overcome
6# so there will always be a visible difference between the GTK+ 2 and 3 theme.
7
8style "default" {
9
10  xthickness = 1
11  ythickness = 1
12
13  ####################
14  # Style Properties #
15  ####################
16
17  GtkWidget::focus-line-width = 1
18  GtkWidget::focus-line-pattern = "\2\1"
19
20  GtkToolbar::internal-padding = 4
21  GtkToolButton::icon-spacing  = 4
22
23  GtkWidget::tooltip-radius    = 3
24  GtkWidget::tooltip-alpha     = 235
25  GtkWidget::new-tooltip-style = 1 #for compatibility
26
27  GtkWidget::link-color              = @link_color
28  GtkWidget::visited-link-color      = @visited_link_color
29  GnomeHRef::link_color              = @link_color
30  GtkHTML::link-color                = @link_color
31  GtkHTML::vlink-color               = @visited_link_color
32  GtkIMHtml::hyperlink-color         = @link_color
33  GtkIMHtml::hyperlink-visited-color = @visited_link_color
34
35  GtkSeparatorMenuItem::horizontal-padding = 0
36  GtkSeparatorMenuItem::wide-separators    = 1
37  GtkSeparatorMenuItem::separator-height   = 1
38
39  GtkButton::child-displacement-y = 0
40
41  GtkButton::default-border         = {0, 0, 0, 0}
42  GtkButton::default-outside-border = {0, 0, 0, 0}
43  GtkButton::inner-border           = {4, 4, 4, 4}
44
45  GtkEntry::state-hint = 1
46  GtkEntry::inner-border = {7, 7, 4, 5}
47
48  GtkPaned::handle-size = 9
49  GtkHPaned::handle-size = 9
50  GtkVPaned::handle-size = 9
51
52  GtkScrollbar::trough-border = 0
53  GtkRange::trough-border     = 0
54  GtkRange::slider-width      = 13
55  GtkRange::stepper-size      = 0
56  GtkRange::activate-slider   = 1
57
58  GtkScrollbar::activate-slider              = 1
59  GtkScrollbar::stepper-size                 = 0
60  GtkScrollbar::has-backward-stepper         = 0
61  GtkScrollbar::has-forward-stepper          = 0
62  GtkScrollbar::min-slider-length            = 48 # 42 + 2*3 (margins)
63  GtkScrolledWindow::scrollbar-spacing       = 0
64  GtkScrolledWindow::scrollbars-within-bevel = 1
65
66  GtkScale::slider_length       = 26
67  GtkScale::slider_width        = 26
68  GtkScale::trough-side-details = 1
69
70  GtkProgressBar::min-horizontal-bar-height = 6
71  GtkProgressBar::min-vertical-bar-width    = 6
72  # Making this bigger than the min[height,width]-2*[y,x]spacing makes the
73  # whole progressbar thicker, so by setting it to the exact above value
74  # we get the maximum spacing between the text and the edges without
75  # doing so.
76  GtkProgressBar::xspacing = 4
77  GtkProgressBar::yspacing = 4
78
79  GtkStatusbar::shadow_type    = GTK_SHADOW_NONE
80  GtkSpinButton::shadow_type   = GTK_SHADOW_NONE
81  GtkMenuBar::shadow-type      = GTK_SHADOW_NONE
82  GtkToolbar::shadow-type      = GTK_SHADOW_NONE
83  # TODO: find out what this comment means:
84  # ( every window is misaligned for the sake of menus ):
85  GtkMenuBar::internal-padding = 0
86  GtkMenu::horizontal-padding  = 0
87  GtkMenu::vertical-padding    = 2
88  GtkMenu::double-arrows       = 0
89  GtkMenuItem::arrow-scaling   = 1
90  GtkMenuItem::toggle-spacing  = 10
91
92  GtkCheckButton::indicator_spacing = 3
93  GtkOptionMenu::indicator_spacing  = {13, 13, 5, 8}
94
95  GtkTreeView::expander-size        = 16
96  GtkTreeView::vertical-separator   = 0
97  GtkTreeView::horizontal-separator = 4
98  GtkTreeView::allow-rules          = 0
99  # Set this because some apps read it
100  GtkTreeView::odd-row-color        = @base_color
101  GtkTreeView::even-row-color       = @base_color
102
103  GtkExpander::expander-size = 16
104
105  GtkNotebook::tab-overlap = 4
106
107  ##########
108  # Colors #
109  ##########
110
111  bg[NORMAL]      = @bg_color
112  bg[PRELIGHT]    = @bg_color
113  bg[SELECTED]    = @selected_bg_color
114  bg[INSENSITIVE] = @insensitive_bg_color
115  bg[ACTIVE]      = @bg_color
116
117  fg[NORMAL]      = @fg_color
118  fg[PRELIGHT]    = @fg_color
119  fg[SELECTED]    = @selected_fg_color
120  fg[INSENSITIVE] = @insensitive_fg_color
121  fg[ACTIVE]      = @fg_color
122
123  text[NORMAL]      = @text_color
124  text[PRELIGHT]    = @text_color
125  text[SELECTED]    = @selected_fg_color
126  text[INSENSITIVE] = @insensitive_fg_color
127  text[ACTIVE]      = @selected_fg_color
128
129  base[NORMAL]      = @base_color
130  base[PRELIGHT]    = shade (0.95, @bg_color)
131  base[SELECTED]    = @selected_bg_color
132  base[INSENSITIVE] = @insensitive_bg_color
133  base[ACTIVE]      = @selected_bg_color
134
135  # For succinctness, all reasonable pixmap options remain here
136
137  # Draw frame around menu in a non-compositied environment
138  # This needs to go before pixmap because we need to override some stuff
139  engine "adwaita" {}
140
141  engine "pixmap" {
142
143    #################
144    # Check Buttons #
145    #################
146
147    image {
148      function        = CHECK
149      state           = NORMAL
150      shadow          = OUT
151      overlay_file    = "assets/checkbox-unchecked.png"
152      overlay_stretch = FALSE
153    }
154
155    image {
156      function        = CHECK
157      state           = PRELIGHT
158      shadow          = OUT
159      overlay_file    = "assets/checkbox-unchecked-hover.png"
160      overlay_stretch = FALSE
161    }
162
163    image {
164      function        = CHECK
165      state           = ACTIVE
166      shadow          = OUT
167      overlay_file    = "assets/checkbox-unchecked-active.png"
168      overlay_stretch = FALSE
169    }
170
171    image {
172      function        = CHECK
173      state           = SELECTED
174      shadow          = OUT
175      overlay_file    = "assets/checkbox-unchecked.png"
176      overlay_stretch = FALSE
177    }
178
179    image {
180      function        = CHECK
181      state           = INSENSITIVE
182      shadow          = OUT
183      overlay_file    = "assets/checkbox-unchecked-insensitive.png"
184      overlay_stretch = FALSE
185    }
186
187    image {
188      function        = CHECK
189      state           = NORMAL
190      shadow          = IN
191      overlay_file    = "assets/checkbox-checked.png"
192      overlay_stretch = FALSE
193    }
194
195    image {
196      function        = CHECK
197      state           = PRELIGHT
198      shadow          = IN
199      overlay_file    = "assets/checkbox-checked-hover.png"
200      overlay_stretch = FALSE
201    }
202
203    image {
204      function        = CHECK
205      state           = ACTIVE
206      shadow          = IN
207      overlay_file    = "assets/checkbox-checked-active.png"
208      overlay_stretch = FALSE
209    }
210
211    image {
212      function        = CHECK
213      state           = SELECTED
214      shadow          = IN
215      overlay_file    = "assets/checkbox-checked.png"
216      overlay_stretch = FALSE
217    }
218
219    image {
220      function        = CHECK
221      state           = INSENSITIVE
222      shadow          = IN
223      overlay_file    = "assets/checkbox-checked-insensitive.png"
224      overlay_stretch = FALSE
225    }
226
227    image {
228      function        = CHECK
229      state           = NORMAL
230      shadow          = ETCHED_IN
231      overlay_file    = "assets/checkbox-mixed.png"
232      overlay_stretch = FALSE
233    }
234
235    image {
236      function        = CHECK
237      state           = PRELIGHT
238      shadow          = ETCHED_IN
239      overlay_file    = "assets/checkbox-mixed-hover.png"
240      overlay_stretch = FALSE
241    }
242
243    image {
244      function        = CHECK
245      state           = ACTIVE
246      shadow          = ETCHED_IN
247      overlay_file    = "assets/checkbox-mixed-active.png"
248      overlay_stretch = FALSE
249    }
250
251    image {
252      function        = CHECK
253      state           = SELECTED
254      shadow          = ETCHED_IN
255      overlay_file    = "assets/checkbox-mixed.png"
256      overlay_stretch = FALSE
257    }
258
259    image {
260      function        = CHECK
261      state           = INSENSITIVE
262      shadow          = ETCHED_IN
263      overlay_file    = "assets/checkbox-mixed-insensitive.png"
264      overlay_stretch = FALSE
265    }
266
267    #################
268    # Radio Buttons #
269    #################
270
271    image {
272      function        = OPTION
273      state           = NORMAL
274      shadow          = OUT
275      overlay_file    = "assets/radio-unchecked.png"
276      overlay_stretch = FALSE
277    }
278
279    image {
280      function        = OPTION
281      state           = PRELIGHT
282      shadow          = OUT
283      overlay_file    = "assets/radio-unchecked-hover.png"
284      overlay_stretch = FALSE
285    }
286
287    image {
288      function        = OPTION
289      state           = ACTIVE
290      shadow          = OUT
291      overlay_file    = "assets/radio-unchecked-active.png"
292      overlay_stretch = FALSE
293    }
294
295    image {
296      function        = OPTION
297      state           = SELECTED
298      shadow          = OUT
299      overlay_file    = "assets/radio-unchecked.png"
300      overlay_stretch = FALSE
301    }
302
303    image {
304      function        = OPTION
305      state           = INSENSITIVE
306      shadow          = OUT
307      overlay_file    = "assets/radio-unchecked-insensitive.png"
308      overlay_stretch = FALSE
309    }
310
311    image {
312      function        = OPTION
313      state           = NORMAL
314      shadow          = IN
315      overlay_file    = "assets/radio-checked.png"
316      overlay_stretch = FALSE
317    }
318
319    image {
320      function        = OPTION
321      state           = PRELIGHT
322      shadow          = IN
323      overlay_file    = "assets/radio-checked-hover.png"
324      overlay_stretch = FALSE
325    }
326
327    image {
328      function        = OPTION
329      state           = ACTIVE
330      shadow          = IN
331      overlay_file    = "assets/radio-checked-active.png"
332      overlay_stretch = FALSE
333    }
334
335    image {
336      function        = OPTION
337      state           = SELECTED
338      shadow          = IN
339      overlay_file    = "assets/radio-checked.png"
340      overlay_stretch = FALSE
341    }
342
343    image {
344      function        = OPTION
345      state           = INSENSITIVE
346      shadow          = IN
347      overlay_file    = "assets/radio-checked-insensitive.png"
348      overlay_stretch = FALSE
349    }
350
351    image {
352      function        = OPTION
353      state           = NORMAL
354      shadow          = ETCHED_IN
355      overlay_file    = "assets/radio-mixed.png"
356      overlay_stretch = FALSE
357    }
358
359    image {
360      function        = OPTION
361      state           = PRELIGHT
362      shadow          = ETCHED_IN
363      overlay_file    = "assets/radio-mixed-hover.png"
364      overlay_stretch = FALSE
365    }
366
367    image {
368      function        = OPTION
369      state           = ACTIVE
370      shadow          = ETCHED_IN
371      overlay_file    = "assets/radio-mixed-active.png"
372      overlay_stretch = FALSE
373    }
374
375    image {
376      function        = OPTION
377      state           = SELECTED
378      shadow          = ETCHED_IN
379      overlay_file    = "assets/radio-mixed.png"
380      overlay_stretch = FALSE
381    }
382
383    image {
384      function        = OPTION
385      state           = INSENSITIVE
386      shadow          = ETCHED_IN
387      overlay_file    = "assets/radio-mixed-insensitive.png"
388      overlay_stretch = FALSE
389    }
390
391    ##########
392    # Arrows #
393    ##########
394
395    # Overrides
396
397    # Disable arrows in spinbuttons
398    image {
399      function = ARROW
400      detail = "spinbutton"
401    }
402
403    # Disable arrows for qt in scrollbars
404    image {
405      function = ARROW
406      detail   = "vscrollbar"
407    }
408    image {
409      function = ARROW
410      detail   = "hscrollbar"
411    }
412
413    # Menu arrows
414
415    image {
416      function        = ARROW
417      state           = NORMAL
418      detail          = "menuitem"
419      overlay_file    = "assets/menu-pan-left.png"
420      overlay_stretch = FALSE
421      arrow_direction = LEFT
422    }
423
424    image {
425      function        = ARROW
426      state           = PRELIGHT
427      detail          = "menuitem"
428      overlay_file    = "assets/menu-pan-left-hover.png"
429      overlay_stretch = FALSE
430      arrow_direction = LEFT
431    }
432
433    image {
434      function        = ARROW
435      state           = INSENSITIVE
436      detail          = "menuitem"
437      overlay_file    = "assets/menu-pan-left-insensitive.png"
438      overlay_stretch = FALSE
439      arrow_direction = LEFT
440    }
441
442    image {
443      function        = ARROW
444      state           = NORMAL
445      detail          = "menuitem"
446      overlay_file    = "assets/menu-pan-right.png"
447      overlay_stretch = FALSE
448      arrow_direction = RIGHT
449    }
450
451    image {
452      function        = ARROW
453      state           = PRELIGHT
454      detail          = "menuitem"
455      overlay_file    = "assets/menu-pan-right-hover.png"
456      overlay_stretch = FALSE
457      arrow_direction = RIGHT
458    }
459
460    image {
461      function        = ARROW
462      state           = INSENSITIVE
463      detail          = "menuitem"
464      overlay_file    = "assets/menu-pan-right-insensitive.png"
465      overlay_stretch = FALSE
466      arrow_direction = RIGHT
467    }
468
469    image {
470      function        = ARROW
471      state           = INSENSITIVE
472      detail          = "menu_scroll_arrow_up"
473      overlay_file    = "assets/menu-pan-up-insensitive.png"
474      overlay_stretch = FALSE
475    }
476
477    image {
478      function        = ARROW
479      detail          = "menu_scroll_arrow_up"
480      overlay_file    = "assets/menu-pan-up.png"
481      overlay_stretch = FALSE
482    }
483
484    image {
485      function        = ARROW
486      state           = INSENSITIVE
487      detail          = "menu_scroll_arrow_down"
488      overlay_file    = "assets/menu-pan-down-insensitive.png"
489      overlay_stretch = FALSE
490    }
491
492    image {
493      function        = ARROW
494      detail          = "menu_scroll_arrow_down"
495      overlay_file    = "assets/menu-pan-down.png"
496      overlay_stretch = FALSE
497    }
498
499    # Regular arrows
500
501    image {
502      function        = ARROW
503      state           = NORMAL
504      overlay_file    = "assets/pan-up.png"
505      overlay_stretch = FALSE
506      arrow_direction = UP
507    }
508
509    image {
510      function        = ARROW
511      state           = PRELIGHT
512      overlay_file    = "assets/pan-up.png"
513      overlay_stretch = FALSE
514      arrow_direction = UP
515    }
516
517    image {
518      function        = ARROW
519      state           = ACTIVE
520      overlay_file    = "assets/pan-up.png"
521      overlay_stretch = FALSE
522      arrow_direction = UP
523    }
524
525    image {
526      function        = ARROW
527      state           = INSENSITIVE
528      overlay_file    = "assets/pan-up-insensitive.png"
529      overlay_stretch = FALSE
530      arrow_direction = UP
531    }
532
533    image {
534      function        = ARROW
535      state           = NORMAL
536      overlay_file    = "assets/pan-down.png"
537      overlay_stretch = FALSE
538      arrow_direction = DOWN
539    }
540
541    image {
542      function        = ARROW
543      state           = PRELIGHT
544      overlay_file    = "assets/pan-down.png"
545      overlay_stretch = FALSE
546      arrow_direction = DOWN
547    }
548
549    image {
550      function        = ARROW
551      state           = ACTIVE
552      overlay_file    = "assets/pan-down.png"
553      overlay_stretch = FALSE
554      arrow_direction = DOWN
555    }
556
557    image {
558      function        = ARROW
559      state           = INSENSITIVE
560      overlay_file    = "assets/pan-down-insensitive.png"
561      overlay_stretch = FALSE
562      arrow_direction = DOWN
563    }
564
565    image {
566      function        = ARROW
567      state           = NORMAL
568      overlay_file    = "assets/pan-left.png"
569      overlay_stretch = FALSE
570      arrow_direction = LEFT
571    }
572
573    image {
574      function        = ARROW
575      state           = PRELIGHT
576      overlay_file    = "assets/pan-left.png"
577      overlay_stretch = FALSE
578      arrow_direction = LEFT
579    }
580
581    image {
582      function        = ARROW
583      state           = ACTIVE
584      overlay_file    = "assets/pan-left.png"
585      overlay_stretch = FALSE
586      arrow_direction = LEFT
587    }
588
589    image {
590      function        = ARROW
591      state           = INSENSITIVE
592      overlay_file    = "assets/pan-left-insensitive.png"
593      overlay_stretch = FALSE
594      arrow_direction = LEFT
595    }
596
597    image {
598      function        = ARROW
599      state           = NORMAL
600      overlay_file    = "assets/pan-right.png"
601      overlay_stretch = FALSE
602      arrow_direction = RIGHT
603    }
604
605    image {
606      function        = ARROW
607      state           = PRELIGHT
608      overlay_file    = "assets/pan-right.png"
609      overlay_stretch = FALSE
610      arrow_direction = RIGHT
611    }
612
613    image {
614      function        = ARROW
615      state           = ACTIVE
616      overlay_file    = "assets/pan-right.png"
617      overlay_stretch = FALSE
618      arrow_direction = RIGHT
619    }
620
621    image {
622      function        = ARROW
623      state           = INSENSITIVE
624      overlay_file    = "assets/pan-right-insensitive.png"
625      overlay_stretch = FALSE
626      arrow_direction = RIGHT
627    }
628
629    ######################
630    # Option Menu Arrows #
631    ######################
632
633    image {
634      function        = TAB
635      state           = NORMAL
636      overlay_file    = "assets/pan-down.png"
637      overlay_stretch = FALSE
638    }
639
640    image {
641      function        = TAB
642      state           = PRELIGHT
643      overlay_file    = "assets/pan-down.png"
644      overlay_stretch = FALSE
645    }
646
647    image {
648      function        = TAB
649      state           = ACTIVE
650      overlay_file    = "assets/pan-down.png"
651      overlay_stretch = FALSE
652    }
653
654    image {
655      function        = TAB
656      state           = INSENSITIVE
657      overlay_file    = "assets/pan-down-insensitive.png"
658      overlay_stretch = FALSE
659    }
660
661    #########
662    # Lines #
663    #########
664
665    image {
666      function = VLINE
667      file     = "assets/line.png"
668      border   = {1, 0, 0, 0}
669    }
670
671    image {
672      function = HLINE
673      file     = "assets/line.png"
674      border   = {0, 0, 1, 0}
675    }
676
677    #########
678    # Focus #
679    #########
680
681    image {
682      function = FOCUS
683      file     = "assets/focus.png"
684      border   = {1, 1, 1, 1}
685      stretch  = TRUE
686    }
687
688    ###########
689    # Handles #
690    ###########
691
692    image {
693      function        = HANDLE
694      detail          = "handlebox"
695      overlay_file    = "assets/handle.png"
696      overlay_stretch = FALSE
697    }
698
699    image {
700      function    = HANDLE
701      file        = "assets/handle-horz.png"
702      border      = {0, 0, 4, 4}
703      orientation = HORIZONTAL
704    }
705
706    image {
707      function    = HANDLE
708      file        = "assets/handle-vert.png"
709      border      = {4, 4, 0, 0}
710      orientation = VERTICAL
711    }
712
713    image {
714      function = RESIZE_GRIP
715    }
716
717    #############
718    # Expanders #
719    #############
720
721    image {
722      function       = EXPANDER
723      expander_style = EXPANDED
724      file           = "assets/pan-down.png"
725    }
726
727    # LTR
728
729    image {
730      function       = EXPANDER
731      expander_style = COLLAPSED
732      file           = "assets/pan-right.png"
733      direction      = LTR
734    }
735
736    image {
737      function       = EXPANDER
738      expander_style = SEMI_COLLAPSED
739      file           = "assets/pan-right-semi.png"
740      direction      = LTR
741    }
742
743    image {
744      function       = EXPANDER
745      expander_style = SEMI_EXPANDED
746      file           = "assets/pan-right-semi.png"
747      direction      = LTR
748    }
749
750    # RTL
751
752    image {
753      function       = EXPANDER
754      expander_style = COLLAPSED
755      file           = "assets/pan-left.png"
756      direction      = RTL
757    }
758
759    image {
760      function       = EXPANDER
761      expander_style = SEMI_COLLAPSED
762      file           = "assets/pan-left-semi.png"
763      direction      = RTL
764    }
765
766    image {
767      function       = EXPANDER
768      expander_style = SEMI_EXPANDED
769      file           = "assets/pan-left-semi.png"
770      direction      = RTL
771    }
772
773    #############
774    # Notebooks #
775    #############
776
777    # Left
778
779    image {
780      function = EXTENSION
781      state    = NORMAL
782      file     = "assets/tab-left-active.png"
783      border   = {3, 0, 3, 3}
784      stretch  = TRUE
785      gap_side = RIGHT
786    }
787
788    image {
789      function = EXTENSION
790      file     = "assets/tab-left.png"
791      border   = {3, 0, 3, 3}
792      stretch  = TRUE
793      gap_side = RIGHT
794    }
795
796    # Right
797
798    image {
799      function = EXTENSION
800      state    = NORMAL
801      file     = "assets/tab-right-active.png"
802      border   = {0, 3, 3, 3}
803      stretch  = TRUE
804      gap_side = LEFT
805    }
806
807    image {
808      function = EXTENSION
809      file     = "assets/tab-right.png"
810      border   = {0, 3, 3, 3}
811      stretch  = TRUE
812      gap_side = LEFT
813    }
814
815    # Up
816
817    image {
818      function = EXTENSION
819      state    = NORMAL
820      file     = "assets/tab-up-active.png"
821      border   = {3, 3, 3, 0}
822      stretch  = TRUE
823      gap_side = BOTTOM
824    }
825
826    image {
827      function = EXTENSION
828      file     = "assets/tab-up.png"
829      border   = {3, 3, 3, 0}
830      stretch  = TRUE
831      gap_side = BOTTOM
832    }
833
834    # Down
835
836    image {
837      function = EXTENSION
838      state    = NORMAL
839      file     = "assets/tab-down-active.png"
840      border   = {3, 3, 0, 3}
841      stretch  = TRUE
842      gap_side = TOP
843    }
844
845    image {
846      function = EXTENSION
847      file     = "assets/tab-down.png"
848      border   = {3, 3, 0, 3}
849      stretch  = TRUE
850      gap_side = TOP
851    }
852
853    # Inner frame
854
855    image {
856      function   = BOX_GAP
857      detail     = "notebook"
858      file       = "assets/frame-notebook.png"
859      border     = {1, 1, 1, 1}
860      stretch    = TRUE
861      gap_file   = "assets/tab-vert-gap.png"
862      gap_border = {1, 0, 1, 1}
863      gap_side   = LEFT
864    }
865
866    image {
867      function   = BOX_GAP
868      detail     = "notebook"
869      file       = "assets/frame-notebook.png"
870      border     = {1, 1, 1, 1}
871      stretch    = TRUE
872      gap_file   = "assets/tab-vert-gap.png"
873      gap_border = {0, 1, 1, 1}
874      gap_side   = RIGHT
875    }
876
877    image {
878      function   = BOX_GAP
879      detail     = "notebook"
880      file       = "assets/frame-notebook.png"
881      border     = {1, 1, 1, 1}
882      stretch    = TRUE
883      gap_file   = "assets/tab-horz-gap.png"
884      gap_border = {1, 1, 1, 0}
885      gap_side   = TOP
886    }
887
888    image {
889      function   = BOX_GAP
890      detail     = "notebook"
891      file       = "assets/frame-notebook.png"
892      border     = {1, 1, 1, 1}
893      stretch    = TRUE
894      gap_file   = "assets/tab-horz-gap.png"
895      gap_border = {1, 1, 0, 1}
896      gap_side   = BOTTOM
897    }
898
899    # Standalone frame
900    image {
901      function = BOX
902      detail   = "notebook"
903      file     = "assets/frame-notebook.png"
904      border   = {1, 1, 1, 1}
905      stretch  = TRUE
906    }
907
908    ##############
909    # Scrollbars #
910    ##############
911
912    image {
913      function    = BOX
914      detail      = "trough"
915      file        = "assets/scrollbar-horz-trough.png"
916      border      = {0, 0, 1, 0}
917      orientation = HORIZONTAL
918    }
919
920    image {
921      function    = BOX
922      detail      = "trough"
923      file        = "assets/scrollbar-vert-trough.png"
924      border      = {1, 0, 0, 0}
925      orientation = VERTICAL
926      direction   = LTR
927    }
928
929    image {
930      function    = BOX
931      detail      = "trough"
932      file        = "assets/scrollbar-vert-trough-rtl.png"
933      border      = {0, 1, 0, 0}
934      orientation = VERTICAL
935      direction   = RTL
936    }
937
938
939    # Disable insensitive sliders
940
941    image {
942      function = SLIDER
943      state    = INSENSITIVE
944      detail   = "slider"
945    }
946
947    # Horizontal sliders
948
949    image {
950      function    = SLIDER
951      state       = NORMAL
952      detail      = "slider"
953      file        = "assets/scrollbar-horz-slider.png"
954      border      = {6, 6, 7, 6 }
955      stretch     = TRUE
956      orientation = HORIZONTAL
957    }
958
959    image {
960      function    = SLIDER
961      state       = PRELIGHT
962      detail      = "slider"
963      file        = "assets/scrollbar-horz-slider-hover.png"
964      border      = {6, 6, 7, 6 }
965      stretch     = TRUE
966      orientation = HORIZONTAL
967    }
968
969    image {
970      function    = SLIDER
971      state       = ACTIVE
972      detail      = "slider"
973      file        = "assets/scrollbar-horz-slider-active.png"
974      border      = {6, 6, 7, 6 }
975      stretch     = TRUE
976      orientation = HORIZONTAL
977    }
978
979    # Vertical sliders
980
981    image {
982      function    = SLIDER
983      state       = NORMAL
984      detail      = "slider"
985      file        = "assets/scrollbar-vert-slider.png"
986      border      = {7, 6, 6, 6}
987      stretch     = TRUE
988      orientation = VERTICAL
989      direction   = LTR
990    }
991
992    image {
993      function    = SLIDER
994      state       = PRELIGHT
995      detail      = "slider"
996      file        = "assets/scrollbar-vert-slider-hover.png"
997      border      = {7, 6, 6, 6}
998      stretch     = TRUE
999      orientation = VERTICAL
1000      direction   = LTR
1001    }
1002
1003    image {
1004      function    = SLIDER
1005      state       = ACTIVE
1006      detail      = "slider"
1007      file        = "assets/scrollbar-vert-slider-active.png"
1008      border      = {7, 6, 6, 6}
1009      stretch     = TRUE
1010      orientation = VERTICAL
1011      direction   = LTR
1012    }
1013
1014    # RTL
1015
1016    image {
1017      function    = SLIDER
1018      state       = NORMAL
1019      detail      = "slider"
1020      file        = "assets/scrollbar-vert-slider-rtl.png"
1021      border      = {6, 7, 6, 6}
1022      stretch     = TRUE
1023      orientation = VERTICAL
1024      direction   = RTL
1025    }
1026
1027    image {
1028      function    = SLIDER
1029      state       = PRELIGHT
1030      detail      = "slider"
1031      file        = "assets/scrollbar-vert-slider-hover-rtl.png"
1032      border      = {6, 7, 6, 6}
1033      stretch     = TRUE
1034      orientation = VERTICAL
1035      direction   = RTL
1036    }
1037
1038    image {
1039      function    = SLIDER
1040      state       = ACTIVE
1041      detail      = "slider"
1042      file        = "assets/scrollbar-vert-slider-active-rtl.png"
1043      border      = {6, 7, 6, 6}
1044      stretch     = TRUE
1045      orientation = VERTICAL
1046      direction   = RTL
1047    }
1048
1049    ##########
1050    # Scales #
1051    ##########
1052
1053    # Troughs, overrided later on. We set them here too because some widgets
1054    # don't specify their orientation.
1055
1056    image {
1057      function    = BOX
1058      detail      = "trough-upper"
1059      file        = "assets/scale-horz-trough.png"
1060      border      = {10, 10, 0, 0}
1061      stretch     = TRUE
1062      orientation = HORIZONTAL
1063    }
1064
1065    image {
1066      function    = BOX
1067      detail      = "trough-lower"
1068      file        = "assets/scale-horz-trough-active.png"
1069      border      = {10, 10, 0, 0}
1070      stretch     = TRUE
1071      orientation = HORIZONTAL
1072    }
1073
1074    image {
1075      function    = BOX
1076      detail      = "trough-upper"
1077      file        = "assets/scale-vert-trough.png"
1078      border      = {0, 0, 10, 10}
1079      stretch     = TRUE
1080      orientation = VERTICAL
1081    }
1082
1083    image {
1084      function    = BOX
1085      detail      = "trough-lower"
1086      file        = "assets/scale-vert-trough-active.png"
1087      border      = {0, 0, 10, 10}
1088      stretch     = TRUE
1089      orientation = VERTICAL
1090    }
1091
1092    # Sliders
1093
1094    image {
1095      function = SLIDER
1096      state    = NORMAL
1097      detail   = "hscale"
1098      file     = "assets/scale-slider.png"
1099    }
1100
1101    image {
1102      function = SLIDER
1103      state    = PRELIGHT
1104      detail   = "hscale"
1105      file     = "assets/scale-slider-hover.png"
1106    }
1107
1108    image {
1109      function = SLIDER
1110      state    = ACTIVE
1111      detail   = "hscale"
1112      file     = "assets/scale-slider-active.png"
1113    }
1114
1115    image {
1116      function = SLIDER
1117      state    = INSENSITIVE
1118      detail   = "hscale"
1119      file     = "assets/scale-slider-insensitive.png"
1120    }
1121    image {
1122      function = SLIDER
1123      state    = NORMAL
1124      detail   = "vscale"
1125      file     = "assets/scale-slider.png"
1126    }
1127
1128    image {
1129      function = SLIDER
1130      state    = PRELIGHT
1131      detail   = "vscale"
1132      file     = "assets/scale-slider-hover.png"
1133    }
1134
1135    image {
1136      function = SLIDER
1137      state    = ACTIVE
1138      detail   = "vscale"
1139      file     = "assets/scale-slider-active.png"
1140    }
1141
1142    image {
1143      function = SLIDER
1144      state    = INSENSITIVE
1145      detail   = "vscale"
1146      file     = "assets/scale-slider-insensitive.png"
1147    }
1148
1149    ###########
1150    # Menubar #
1151    ###########
1152
1153    image {
1154      function = BOX
1155      detail   = "menubar"
1156      file     = "assets/line.png"
1157      border   = {0, 0, 0, 1}
1158    }
1159
1160    #########
1161    # Menus #
1162    #########
1163
1164    image {
1165      function = BOX
1166      state    = PRELIGHT
1167      detail   = "menu_scroll_arrow_up"
1168      file     = "assets/line.png"
1169    }
1170
1171    image {
1172      function = BOX
1173      detail   = "menu_scroll_arrow_up"
1174      file     = "assets/line.png"
1175      border   = {0, 0, 0, 1}
1176    }
1177
1178    image {
1179      function = BOX
1180      state    = PRELIGHT
1181      detail   = "menu_scroll_arrow_down"
1182      file     = "assets/line.png"
1183    }
1184
1185    image {
1186      function = BOX
1187      detail   = "menu_scroll_arrow_down"
1188      file     = "assets/line.png"
1189      border   = {0, 0, 1, 0}
1190    }
1191
1192    ###########
1193    # Entries #
1194    ###########
1195
1196
1197    image {
1198      function = SHADOW
1199      state    = ACTIVE
1200      detail   = "entry"
1201      file     = "assets/entry-active.png"
1202      border   = {4, 4, 4, 4}
1203      stretch  = TRUE
1204    }
1205
1206    image {
1207      function = SHADOW
1208      state    = INSENSITIVE
1209      detail   = "entry"
1210      file     = "assets/entry-insensitive.png"
1211      border   = {4, 4, 4, 4}
1212      stretch  = TRUE
1213    }
1214
1215    image {
1216      function = SHADOW
1217      detail   = "entry"
1218      file     = "assets/entry.png"
1219      border   = {4, 4, 4, 4}
1220      stretch  = TRUE
1221    }
1222
1223    image {
1224      function = FLAT_BOX
1225      state    = ACTIVE
1226      detail   = "entry_bg"
1227      file     = "assets/entry-background.png"
1228    }
1229
1230    image {
1231      function = FLAT_BOX
1232      state    = INSENSITIVE
1233      detail   = "entry_bg"
1234      file     = "assets/entry-background-insensitive.png"
1235    }
1236
1237    image {
1238      function = FLAT_BOX
1239      detail   = "entry_bg"
1240      file     = "assets/entry-background.png"
1241    }
1242    #########
1243    # Spins #
1244    #########
1245
1246    # Spin-Up LTR
1247
1248    image {
1249      function        = BOX
1250      state           = NORMAL
1251      detail          = "spinbutton_up"
1252      file            = "assets/spin-ltr-up.png"
1253      border          = {1, 4, 4, 0}
1254      stretch         = TRUE
1255      overlay_file    = "assets/spin-up.png"
1256      overlay_stretch = FALSE
1257      direction       = LTR
1258    }
1259
1260    image {
1261      function        = BOX
1262      state           = PRELIGHT
1263      detail          = "spinbutton_up"
1264      file            = "assets/spin-ltr-up-hover.png"
1265      border          = {1, 4, 4, 0}
1266      stretch         = TRUE
1267      overlay_file    = "assets/spin-up.png"
1268      overlay_stretch = FALSE
1269      direction       = LTR
1270    }
1271
1272    image {
1273      function        = BOX
1274      state           = ACTIVE
1275      detail          = "spinbutton_up"
1276      file            = "assets/spin-ltr-up-active.png"
1277      border          = {1, 4, 4, 0}
1278      stretch         = TRUE
1279      overlay_file    = "assets/spin-up.png"
1280      overlay_stretch = FALSE
1281      direction       = LTR
1282    }
1283
1284    image {
1285      function        = BOX
1286      state           = INSENSITIVE
1287      detail          = "spinbutton_up"
1288      file            = "assets/spin-ltr-up-insensitive.png"
1289      border          = {1, 4, 4, 0}
1290      stretch         = TRUE
1291      overlay_file    = "assets/spin-up-insensitive.png"
1292      overlay_stretch = FALSE
1293      direction       = LTR
1294    }
1295
1296    # Spin-Up RTL
1297
1298    image {
1299      function        = BOX
1300      state           = NORMAL
1301      detail          = "spinbutton_up"
1302      file            = "assets/spin-rtl-up.png"
1303      border          = {4, 1, 4, 0}
1304      stretch         = TRUE
1305      overlay_file    = "assets/spin-up.png"
1306      overlay_stretch = FALSE
1307      direction       = RTL
1308    }
1309
1310    image {
1311      function        = BOX
1312      state           = PRELIGHT
1313      detail          = "spinbutton_up"
1314      file            = "assets/spin-rtl-up-hover.png"
1315      border          = {4, 1, 4, 0}
1316      stretch         = TRUE
1317      overlay_file    = "assets/spin-up.png"
1318      overlay_stretch = FALSE
1319      direction       = RTL
1320    }
1321
1322    image {
1323      function        = BOX
1324      state           = ACTIVE
1325      detail          = "spinbutton_up"
1326      file            = "assets/spin-rtl-up-hover.png"
1327      border          = {4, 1, 4, 0}
1328      stretch         = TRUE
1329      overlay_file    = "assets/spin-up.png"
1330      overlay_stretch = FALSE
1331      direction       = RTL
1332    }
1333
1334    image {
1335      function        = BOX
1336      state           = INSENSITIVE
1337      detail          = "spinbutton_up"
1338      file            = "assets/spin-rtl-up-insensitive.png"
1339      border          = {4, 1, 4, 0}
1340      stretch         = TRUE
1341      overlay_file    = "assets/spin-up-insensitive.png"
1342      overlay_stretch = FALSE
1343      direction       = RTL
1344    }
1345
1346    # Spin-Down LTR
1347
1348    image {
1349      function        = BOX
1350      state           = NORMAL
1351      detail          = "spinbutton_down"
1352      file            = "assets/spin-ltr-down.png"
1353      border          = {1, 4, 1, 4}
1354      stretch         = TRUE
1355      overlay_file    = "assets/spin-down.png"
1356      overlay_stretch = FALSE
1357      direction       = LTR
1358    }
1359
1360    image {
1361      function        = BOX
1362      state           = PRELIGHT
1363      detail          = "spinbutton_down"
1364      file            = "assets/spin-ltr-down-hover.png"
1365      border          = {1, 4, 1, 4}
1366      stretch         = TRUE
1367      overlay_file    = "assets/spin-down.png"
1368      overlay_stretch = FALSE
1369      direction       = LTR
1370    }
1371
1372    image {
1373      function        = BOX
1374      state           = ACTIVE
1375      detail          = "spinbutton_down"
1376      file            = "assets/spin-ltr-down-active.png"
1377      border          = {1, 4, 1, 4}
1378      stretch         = TRUE
1379      overlay_file    = "assets/spin-down.png"
1380      overlay_stretch = FALSE
1381      direction       = LTR
1382    }
1383
1384    image {
1385      function        = BOX
1386      state           = INSENSITIVE
1387      detail          = "spinbutton_down"
1388      file            = "assets/spin-ltr-down-insensitive.png"
1389      border          = {1, 4, 1, 4}
1390      stretch         = TRUE
1391      overlay_file    = "assets/spin-down-insensitive.png"
1392      overlay_stretch = FALSE
1393      direction       = LTR
1394    }
1395
1396    # Spin-Down RTL
1397
1398    image {
1399      function        = BOX
1400      state           = NORMAL
1401      detail          = "spinbutton_down"
1402      file            = "assets/spin-rtl-down.png"
1403      border          = {4, 1, 1, 4}
1404      stretch         = TRUE
1405      overlay_file    = "assets/spin-down.png"
1406      overlay_stretch = FALSE
1407      direction       = RTL
1408    }
1409
1410    image {
1411      function        = BOX
1412      state           = PRELIGHT
1413      detail          = "spinbutton_down"
1414      file            = "assets/spin-rtl-down-hover.png"
1415      border          = {4, 1, 1, 4}
1416      stretch         = TRUE
1417      overlay_file    = "assets/spin-down.png"
1418      overlay_stretch = FALSE
1419      direction       = RTL
1420    }
1421
1422    image {
1423      function        = BOX
1424      state           = ACTIVE
1425      detail          = "spinbutton_down"
1426      file            = "assets/spin-rtl-down-active.png"
1427      border          = {4, 1, 1, 4}
1428      stretch         = TRUE
1429      overlay_file    = "assets/spin-down.png"
1430      overlay_stretch = FALSE
1431      direction       = RTL
1432    }
1433
1434    image {
1435      function        = BOX
1436      state           = INSENSITIVE
1437      detail          = "spinbutton_down"
1438      file            = "assets/spin-rtl-down-insensitive.png"
1439      border          = {4, 1, 1, 4}
1440      stretch         = TRUE
1441      overlay_file    = "assets/spin-down-insensitive.png"
1442      overlay_stretch = FALSE
1443      direction       = RTL
1444    }
1445
1446    ##############
1447    # Scrollbars #
1448    ##############
1449
1450    image {
1451      function    = BOX
1452      detail      = "bar"
1453      file        = "assets/progressbar-horz.png"
1454      stretch     = TRUE
1455      border      = {2, 2, 1, 1}
1456      orientation = HORIZONTAL
1457    }
1458
1459    image {
1460      function    = BOX
1461      detail      = "bar"
1462      file        = "assets/progressbar-vert.png"
1463      stretch     = TRUE
1464      border      = {1, 1, 2, 2}
1465      orientation = VERTICAL
1466    }
1467
1468    #############
1469    # Treeviews #
1470    #############
1471
1472    # Disable active the column highlight
1473    # We need to match specific cells or we break stuff
1474    # Looking at you deadbeef
1475
1476    image {
1477      function = FLAT_BOX
1478      detail   = "cell_even_sorted"
1479      state    = NORMAL
1480    }
1481
1482    image {
1483      function = FLAT_BOX
1484      detail   = "cell_odd_sorted"
1485      state    = NORMAL
1486    }
1487
1488    # Disable all the other shadows
1489    # This prevents the Raleigh effect
1490    image {
1491      function = SHADOW
1492    }
1493
1494  }
1495
1496}
1497
1498style "menubar" {
1499
1500  # Needed to fix Firefox's menubar text
1501  bg[SELECTED] = @selected_fg_color
1502  fg[SELECTED] = @link_color
1503
1504}
1505
1506style "menubar_item" {
1507
1508  xthickness = 3
1509  ythickness = 4
1510
1511  fg[PRELIGHT] = @link_color
1512
1513  engine "pixmap" {
1514    image {
1515      function    = BOX
1516      state       = PRELIGHT
1517      file        = "assets/menubar-item-active.png"
1518      border      = {0, 0, 0, 3}
1519    }
1520  }
1521
1522}
1523
1524style "menu" {
1525
1526  xthickness = 0
1527  ythickness = 0
1528
1529  bg[NORMAL]      = @menu_color
1530  bg[INSENSITIVE] = @menu_color
1531  bg[PRELIGHT]    = @menu_color
1532  bg[SELECTED]    = @selected_bg_color
1533
1534}
1535
1536style "menu_item" {
1537
1538  xthickness = 3
1539  ythickness = 4
1540
1541  bg[PRELIGHT]   = @selected_bg_color
1542  # Chromium uses this setting
1543  bg[SELECTED]   = @selected_bg_color
1544
1545  fg[PRELIGHT]   = @selected_fg_color
1546  # Some widgets use text, we need to handle that
1547  text[NORMAL]   = @fg_color
1548  text[PRELIGHT] = @selected_fg_color
1549
1550  # Unfortunately we can't tell regular and menu checks/radios apart
1551  # Without the heirarchy
1552  engine "pixmap" {
1553
1554    #################
1555    # Check Buttons #
1556    #################
1557
1558    image {
1559      function        = CHECK
1560      state           = NORMAL
1561      shadow          = OUT
1562      overlay_file    = "assets/menu-checkbox.png"
1563      overlay_stretch = FALSE
1564    }
1565
1566    image {
1567      function        = CHECK
1568      state           = PRELIGHT
1569      shadow          = OUT
1570      overlay_file    = "assets/menu-checkbox-hover.png"
1571      overlay_stretch = FALSE
1572    }
1573
1574    image {
1575      function        = CHECK
1576      state           = ACTIVE
1577      shadow          = OUT
1578      overlay_file    = "assets/menu-checkbox.png"
1579      overlay_stretch = FALSE
1580    }
1581
1582    image {
1583      function        = CHECK
1584      state           = INSENSITIVE
1585      shadow          = OUT
1586      overlay_file    = "assets/menu-checkbox-insensitive.png"
1587      overlay_stretch = FALSE
1588    }
1589
1590    image {
1591      function        = CHECK
1592      state           = NORMAL
1593      shadow          = IN
1594      overlay_file    = "assets/menu-checkbox-checked.png"
1595      overlay_stretch = FALSE
1596    }
1597
1598    image {
1599      function        = CHECK
1600      state           = PRELIGHT
1601      shadow          = IN
1602      overlay_file    = "assets/menu-checkbox-checked-hover.png"
1603      overlay_stretch = FALSE
1604    }
1605
1606    image {
1607      function        = CHECK
1608      state           = ACTIVE
1609      shadow          = IN
1610      overlay_file    = "assets/menu-checkbox-checked.png"
1611      overlay_stretch = FALSE
1612    }
1613
1614    image {
1615      function        = CHECK
1616      state           = INSENSITIVE
1617      shadow          = IN
1618      overlay_file    = "assets/menu-checkbox-checked-insensitive.png"
1619      overlay_stretch = FALSE
1620    }
1621
1622    image {
1623      function        = CHECK
1624      state           = NORMAL
1625      shadow          = ETCHED_IN
1626      overlay_file    = "assets/menu-checkbox-mixed.png"
1627      overlay_stretch = FALSE
1628    }
1629
1630    image {
1631      function        = CHECK
1632      state           = PRELIGHT
1633      shadow          = ETCHED_IN
1634      overlay_file    = "assets/menu-checkbox-mixed-hover.png"
1635      overlay_stretch = FALSE
1636    }
1637
1638    image {
1639      function        = CHECK
1640      state           = ACTIVE
1641      shadow          = ETCHED_IN
1642      overlay_file    = "assets/menu-checkbox-mixed.png"
1643      overlay_stretch = FALSE
1644    }
1645
1646    image {
1647      function        = CHECK
1648      state           = INSENSITIVE
1649      shadow          = ETCHED_IN
1650      overlay_file    = "assets/menu-checkbox-mixed-insensitive.png"
1651      overlay_stretch = FALSE
1652    }
1653
1654    #################
1655    # Radio Buttons #
1656    #################
1657
1658    image {
1659      function        = OPTION
1660      state           = NORMAL
1661      shadow          = OUT
1662      overlay_file    = "assets/menu-radio.png"
1663      overlay_stretch = FALSE
1664    }
1665
1666    image {
1667      function        = OPTION
1668      state           = PRELIGHT
1669      shadow          = OUT
1670      overlay_file    = "assets/menu-radio-hover.png"
1671      overlay_stretch = FALSE
1672    }
1673
1674    image {
1675      function        = OPTION
1676      state           = ACTIVE
1677      shadow          = OUT
1678      overlay_file    = "assets/menu-radio.png"
1679      overlay_stretch = FALSE
1680    }
1681
1682    image {
1683      function        = OPTION
1684      state           = INSENSITIVE
1685      shadow          = OUT
1686      overlay_file    = "assets/menu-radio-insensitive.png"
1687      overlay_stretch = FALSE
1688    }
1689
1690    image {
1691      function        = OPTION
1692      state           = NORMAL
1693      shadow          = IN
1694      overlay_file    = "assets/menu-radio-checked.png"
1695      overlay_stretch = FALSE
1696    }
1697
1698    image {
1699      function        = OPTION
1700      state           = PRELIGHT
1701      shadow          = IN
1702      overlay_file    = "assets/menu-radio-checked-hover.png"
1703      overlay_stretch = FALSE
1704    }
1705
1706    image {
1707      function        = OPTION
1708      state           = ACTIVE
1709      shadow          = IN
1710      overlay_file    = "assets/menu-radio-checked.png"
1711      overlay_stretch = FALSE
1712    }
1713
1714    image {
1715      function        = OPTION
1716      state           = INSENSITIVE
1717      shadow          = IN
1718      overlay_file    = "assets/menu-radio-checked-insensitive.png"
1719      overlay_stretch = FALSE
1720    }
1721
1722    image {
1723      function        = OPTION
1724      state           = NORMAL
1725      shadow          = ETCHED_IN
1726      overlay_file    = "assets/menu-radio-mixed.png"
1727      overlay_stretch = FALSE
1728    }
1729
1730    image {
1731      function        = OPTION
1732      state           = PRELIGHT
1733      shadow          = ETCHED_IN
1734      overlay_file    = "assets/menu-radio-mixed-hover.png"
1735      overlay_stretch = FALSE
1736    }
1737
1738    image {
1739      function        = OPTION
1740      state           = ACTIVE
1741      shadow          = ETCHED_IN
1742      overlay_file    = "assets/menu-radio-mixed.png"
1743      overlay_stretch = FALSE
1744    }
1745
1746    image {
1747      function        = OPTION
1748      state           = INSENSITIVE
1749      shadow          = ETCHED_IN
1750      overlay_file    = "assets/menu-radio-mixed-insensitive.png"
1751      overlay_stretch = FALSE
1752    }
1753
1754
1755
1756  }
1757
1758}
1759
1760style "separator_menu_item" {
1761
1762  xthickness = 0
1763  ythickness = 0
1764
1765  engine "pixmap" {
1766    image {
1767      function = BOX
1768      file     = "assets/line.png"
1769    }
1770  }
1771
1772}
1773
1774style "button" {
1775
1776  xthickness = 2
1777  ythickness = 2
1778
1779  # For the sake of sanity style buttons this way
1780  engine "pixmap" {
1781
1782    ###########
1783    # Buttons #
1784    ###########
1785
1786    image {
1787      function = BOX
1788      state    = NORMAL
1789      file     = "assets/button.png"
1790      border   = {4, 4, 4, 4}
1791      stretch  = TRUE
1792    }
1793
1794    image {
1795      function = BOX
1796      state    = PRELIGHT
1797      shadow   = OUT
1798      file     = "assets/button-hover.png"
1799      border   = {4, 4, 4, 4}
1800      stretch  = TRUE
1801    }
1802
1803    # Don't add hover effect on pressed buttons
1804    image {
1805      function = BOX
1806      state    = PRELIGHT
1807      shadow   = IN
1808      file     = "assets/button-active.png"
1809      border   = {4, 4, 4, 4}
1810      stretch  = TRUE
1811    }
1812
1813    image {
1814      function = BOX
1815      state    = ACTIVE
1816      file     = "assets/button-active.png"
1817      border   = {4, 4, 4, 4}
1818      stretch  = TRUE
1819    }
1820
1821    image {
1822      function = BOX
1823      state    = INSENSITIVE
1824      file     = "assets/button-insensitive.png"
1825      border   = {4, 4, 4, 4}
1826      stretch  = TRUE
1827    }
1828  }
1829}
1830
1831style "link_button" {
1832
1833  # Disable the button effect, leave just the link
1834  engine "pixmap" {
1835    image {
1836      function = BOX
1837    }
1838  }
1839
1840}
1841
1842style "entry" {
1843
1844  # We set this same as the border of the border of the entry
1845  # This way there's no overlap
1846  xthickness = 4
1847  ythickness = 4
1848
1849}
1850
1851style "combobox" {
1852
1853  xthickness = 6
1854  ythickness = 4
1855
1856  # This affects only the button beside an entry
1857  GtkButton::inner-border = {0, 0, 0, 0}
1858
1859}
1860
1861style "combobox_cellview" {
1862  text[NORMAL]   = @fg_color
1863  text[PRELIGHT] = @fg_color
1864}
1865
1866style "combobox_entry" {
1867
1868  # Since one side of the button is missing, we need to shift the arrow a little to the right
1869  GtkButton::inner-border = {0, 1, 0, 0}
1870
1871  engine "pixmap" {
1872
1873    #############
1874    # LTR entry #
1875    #############
1876
1877    image {
1878      function  = SHADOW
1879      state     = NORMAL
1880      detail    = "entry"
1881      file      = "assets/combo-entry-ltr-entry.png"
1882      border    = {4, 4, 4, 4}
1883      stretch   = TRUE
1884      direction = LTR
1885    }
1886
1887    image {
1888      function  = SHADOW
1889      state     = ACTIVE
1890      detail    = "entry"
1891      file      = "assets/combo-entry-ltr-entry-active.png"
1892      border    = {4, 4, 4, 4}
1893      stretch   = TRUE
1894      direction = LTR
1895    }
1896
1897    image {
1898      function  = SHADOW
1899      state     = INSENSITIVE
1900      detail    = "entry"
1901      file      = "assets/combo-entry-ltr-entry-insensitive.png"
1902      border    = {4, 4, 4, 4}
1903      stretch   = TRUE
1904      direction = LTR
1905    }
1906
1907    #############
1908    # RTL entry #
1909    #############
1910
1911    image {
1912      function  = SHADOW
1913      state     = NORMAL
1914      detail    = "entry"
1915      file      = "assets/combo-entry-rtl-entry.png"
1916      border    = {4, 4, 4, 4}
1917      stretch   = TRUE
1918      direction = RTL
1919    }
1920
1921    image {
1922      function  = SHADOW
1923      state     = ACTIVE
1924      detail    = "entry"
1925      file      = "assets/combo-entry-rtl-entry-active.png"
1926      border    = {4, 4, 4, 4}
1927      stretch   = TRUE
1928      direction = RTL
1929    }
1930
1931    image {
1932      function  = SHADOW
1933      state     = INSENSITIVE
1934      detail    = "entry"
1935      file      = "assets/combo-entry-rtl-entry-insensitive.png"
1936      border    = {4, 4, 4, 4}
1937      stretch   = TRUE
1938      direction = RTL
1939    }
1940
1941    ##############
1942    # LTR button #
1943    ##############
1944
1945    image {
1946      function  = BOX
1947      state     = NORMAL
1948      detail    = "button"
1949      file      = "assets/combo-entry-ltr-button.png"
1950      border    = {0, 4, 4, 4}
1951      stretch   = TRUE
1952      direction = LTR
1953    }
1954
1955    image {
1956      function  = BOX
1957      state     = PRELIGHT
1958      detail    = "button"
1959      file      = "assets/combo-entry-ltr-button-hover.png"
1960      border    = {0, 4, 4, 4}
1961      stretch   = TRUE
1962      direction = LTR
1963    }
1964
1965    image {
1966      function  = BOX
1967      state     = ACTIVE
1968      detail    = "button"
1969      file      = "assets/combo-entry-ltr-button-active.png"
1970      border    = {0, 4, 4, 4}
1971      stretch   = TRUE
1972      direction = LTR
1973    }
1974
1975    image {
1976      function  = BOX
1977      state     = INSENSITIVE
1978      detail    = "button"
1979      file      = "assets/combo-entry-ltr-button-insensitive.png"
1980      border    = {0, 4, 4, 4}
1981      stretch   = TRUE
1982      direction = LTR
1983    }
1984
1985    ##############
1986    # RTL button #
1987    ##############
1988
1989    image {
1990      function  = BOX
1991      state     = NORMAL
1992      detail    = "button"
1993      file      = "assets/combo-entry-rtl-button.png"
1994      border    = {4, 0, 4, 4}
1995      stretch   = TRUE
1996      direction = RTL
1997    }
1998
1999    image {
2000      function  = BOX
2001      state     = PRELIGHT
2002      detail    = "button"
2003      file      = "assets/combo-entry-rtl-button-hover.png"
2004      border    = {4, 0, 4, 4}
2005      stretch   = TRUE
2006      direction = RTL
2007    }
2008
2009    image {
2010      function  = BOX
2011      state     = ACTIVE
2012      detail    = "button"
2013      file      = "assets/combo-entry-rtl-button-active.png"
2014      border    = {4, 0, 4, 4}
2015      stretch   = TRUE
2016      direction = RTL
2017    }
2018
2019    image {
2020      function  = BOX
2021      state     = INSENSITIVE
2022      detail    = "button"
2023      file      = "assets/combo-entry-rtl-button-insensitive.png"
2024      border    = {4, 0, 4, 4}
2025      stretch   = TRUE
2026      direction = RTL
2027    }
2028
2029  }
2030
2031}
2032
2033style "combo_button_padding" {
2034
2035  # Since one side of the button is missing, we need to shift the arrow a
2036  # little to the right.
2037  # This is the same thing we've done above but the combo, unlike the combobox,
2038  # uses padding the same way as a button.
2039  GtkButton::inner-border = {6, 8, 4, 4}
2040
2041}
2042
2043style "notebook" {
2044
2045  xthickness = 5
2046  ythickness = 2
2047
2048}
2049
2050style "notebook_viewport" {
2051  bg[NORMAL] = @base_color
2052}
2053
2054style "notebook_bg" {
2055  bg[NORMAL]      = @base_color
2056  bg[PRELIGHT]    = @base_color
2057  bg[INSENSITIVE] = @base_color
2058}
2059
2060style "notebook_entry" {
2061
2062  engine "pixmap" {
2063
2064    image {
2065      function = SHADOW
2066      state    = ACTIVE
2067      detail   = "entry"
2068      file     = "assets/notebook-entry-active.png"
2069      border   = {4, 4, 4, 4}
2070      stretch  = TRUE
2071    }
2072
2073    image {
2074      function = SHADOW
2075      state    = INSENSITIVE
2076      detail   = "entry"
2077      file     = "assets/notebook-entry-insensitive.png"
2078      border   = {4, 4, 4, 4}
2079      stretch  = TRUE
2080    }
2081
2082    image {
2083      function = SHADOW
2084      detail   = "entry"
2085      file     = "assets/notebook-entry.png"
2086      border   = {4, 4, 4, 4}
2087      stretch  = TRUE
2088    }
2089  }
2090}
2091
2092style "normal_bg" {
2093  bg[NORMAL]      = @bg_color
2094  bg[PRELIGHT]    = @bg_color
2095  bg[INSENSITIVE] = @insensitive_bg_color
2096}
2097
2098style "normal_entry" {
2099
2100  engine "pixmap" {
2101
2102    image {
2103      function = SHADOW
2104      state    = ACTIVE
2105      detail   = "entry"
2106      file     = "assets/entry-active.png"
2107      border   = {4, 4, 4, 4}
2108      stretch  = TRUE
2109    }
2110
2111    image {
2112      function = SHADOW
2113      state    = INSENSITIVE
2114      detail   = "entry"
2115      file     = "assets/entry-insensitive.png"
2116      border   = {4, 4, 4, 4}
2117      stretch  = TRUE
2118    }
2119
2120    image {
2121      function = SHADOW
2122      detail   = "entry"
2123      file     = "assets/entry.png"
2124      border   = {4, 4, 4, 4}
2125      stretch  = TRUE
2126    }
2127  }
2128}
2129
2130style "notebook_combo" {
2131
2132  engine "pixmap" {
2133
2134    #############
2135    # LTR entry #
2136    #############
2137
2138    image {
2139      function  = SHADOW
2140      state     = NORMAL
2141      detail    = "entry"
2142      file      = "assets/notebook-combo-entry-ltr-entry.png"
2143      border    = {4, 4, 4, 4}
2144      stretch   = TRUE
2145      direction = LTR
2146    }
2147
2148    image {
2149      function  = SHADOW
2150      state     = ACTIVE
2151      detail    = "entry"
2152      file      = "assets/notebook-combo-entry-ltr-entry-active.png"
2153      border    = {4, 4, 4, 4}
2154      stretch   = TRUE
2155      direction = LTR
2156    }
2157
2158    image {
2159      function  = SHADOW
2160      state     = INSENSITIVE
2161      detail    = "entry"
2162      file      = "assets/notebook-combo-entry-ltr-entry-insensitive.png"
2163      border    = {4, 4, 4, 4}
2164      stretch   = TRUE
2165      direction = LTR
2166    }
2167
2168    #############
2169    # RTL entry #
2170    #############
2171
2172    image {
2173      function  = SHADOW
2174      state     = NORMAL
2175      detail    = "entry"
2176      file      = "assets/notebook-combo-entry-rtl-entry.png"
2177      border    = {4, 4, 4, 4}
2178      stretch   = TRUE
2179      direction = RTL
2180    }
2181
2182    image {
2183      function  = SHADOW
2184      state     = ACTIVE
2185      detail    = "entry"
2186      file      = "assets/notebook-combo-entry-rtl-entry-active.png"
2187      border    = {4, 4, 4, 4}
2188      stretch   = TRUE
2189      direction = RTL
2190    }
2191
2192    image {
2193      function  = SHADOW
2194      state     = INSENSITIVE
2195      detail    = "entry"
2196      file      = "assets/notebook-combo-entry-rtl-entry-insensitive.png"
2197      border    = {4, 4, 4, 4}
2198      stretch   = TRUE
2199      direction = RTL
2200    }
2201
2202  }
2203
2204}
2205
2206style "textview" {
2207  bg[NORMAL] = @base_color
2208}
2209
2210style "scale_horz" {
2211
2212  engine "pixmap" {
2213
2214    image {
2215      function    = BOX
2216      detail      = "trough-upper"
2217      file        = "assets/scale-horz-trough.png"
2218      border      = {10, 10, 0, 0}
2219      stretch     = TRUE
2220    }
2221
2222    image {
2223      function    = BOX
2224      detail      = "trough-lower"
2225      file        = "assets/scale-horz-trough-active.png"
2226      border      = {10, 10, 0, 0}
2227      stretch     = TRUE
2228    }
2229
2230  }
2231
2232}
2233
2234style "scale_vert" {
2235
2236  engine "pixmap" {
2237
2238    image {
2239      function    = BOX
2240      detail      = "trough-upper"
2241      file        = "assets/scale-vert-trough.png"
2242      border      = {0, 0, 10, 10}
2243      stretch     = TRUE
2244    }
2245
2246    image {
2247      function    = BOX
2248      detail      = "trough-lower"
2249      file        = "assets/scale-vert-trough-active.png"
2250      border      = {0, 0, 10, 10}
2251      stretch     = TRUE
2252    }
2253
2254  }
2255
2256}
2257
2258style "progressbar" {
2259
2260  xthickness = 1
2261  ythickness = 1
2262
2263  fg[PRELIGHT] = @selected_fg_color
2264
2265  engine "pixmap" {
2266
2267    image {
2268      function    = BOX
2269      detail      = "trough"
2270      file        = "assets/progressbar-horz-trough.png"
2271      border      = {3, 3, 2, 2}
2272      stretch     = TRUE
2273      orientation = HORIZONTAL
2274    }
2275
2276    image {
2277      function    = BOX
2278      detail      = "trough"
2279      file        = "assets/progressbar-vert-trough.png"
2280      border      = {2, 2, 3, 3}
2281      stretch     = TRUE
2282      orientation = VERTICAL
2283    }
2284
2285  }
2286
2287}
2288
2289style "treeview_header" {
2290
2291  xthickness = 1
2292  ythickness = 0
2293
2294  fg[NORMAL]   = @column_header_color
2295  fg[PRELIGHT] = @hover_column_header_color
2296
2297  font_name    = "Bold"
2298
2299  GtkButton::inner-border = {5, 5, 0, 1}
2300
2301  engine "pixmap" {
2302
2303    image {
2304      function  = BOX
2305      file      = "assets/treeview-separator-ltr.png"
2306      border    = {0, 1, 0, 1}
2307      stretch   = TRUE
2308      direction = LTR
2309    }
2310
2311    image {
2312      function  = BOX
2313      file      = "assets/treeview-separator-rtl.png"
2314      border    = {1, 0, 0, 1}
2315      stretch   = TRUE
2316      direction = RTL
2317    }
2318
2319    image {
2320      function        = ARROW
2321      state           = NORMAL
2322      overlay_file    = "assets/treeview-pan-up.png"
2323      overlay_stretch = FALSE
2324      arrow_direction = UP
2325    }
2326
2327    image {
2328      function        = ARROW
2329      state           = PRELIGHT
2330      overlay_file    = "assets/treeview-pan-up-hover.png"
2331      overlay_stretch = FALSE
2332      arrow_direction = UP
2333    }
2334
2335    image {
2336      function        = ARROW
2337      state           = ACTIVE
2338      overlay_file    = "assets/treeview-pan-up-active.png"
2339      overlay_stretch = FALSE
2340      arrow_direction = UP
2341    }
2342
2343    image {
2344      function        = ARROW
2345      state           = NORMAL
2346      overlay_file    = "assets/treeview-pan-down.png"
2347      overlay_stretch = FALSE
2348      arrow_direction = DOWN
2349    }
2350
2351    image {
2352      function        = ARROW
2353      state           = PRELIGHT
2354      overlay_file    = "assets/treeview-pan-down-hover.png"
2355      overlay_stretch = FALSE
2356      arrow_direction = DOWN
2357    }
2358
2359    image {
2360      function        = ARROW
2361      state           = ACTIVE
2362      overlay_file    = "assets/treeview-pan-down-active.png"
2363      overlay_stretch = FALSE
2364      arrow_direction = DOWN
2365    }
2366
2367  }
2368
2369}
2370
2371style "scrolled_window" {
2372
2373  engine "pixmap" {
2374    image {
2375      function = SHADOW
2376      file     = "assets/frame.png"
2377      border   = {1, 1, 1, 1}
2378      stretch  = TRUE
2379    }
2380  }
2381
2382}
2383
2384style "frame" {
2385
2386  engine "pixmap" {
2387
2388    image {
2389      function = SHADOW
2390      shadow   = NONE
2391    }
2392
2393    image {
2394      function = SHADOW
2395      file     = "assets/frame.png"
2396      border   = {1, 1, 1, 1}
2397      stretch  = TRUE
2398    }
2399
2400    image {
2401      function       = SHADOW_GAP
2402      file           = "assets/frame.png"
2403      border         = {1, 1, 1, 1}
2404      stretch        = TRUE
2405      gap_start_file = "assets/border.png"
2406      gap_end_file   = "assets/border.png"
2407    }
2408
2409  }
2410
2411}
2412
2413style "toolbar_button" {
2414
2415  xthickness = 2
2416  ythickness = 2
2417
2418  GtkButton::inner-border = {2, 2, 2, 2}
2419
2420}
2421
2422style "toolbar_separator" {
2423
2424  GtkWidget::wide-separators  = 1
2425  GtkWidget::separator-width  = 1
2426  GtkWidget::separator-height = 1
2427
2428  engine "pixmap" {
2429    image {
2430      function = BOX
2431      file     = "assets/line.png"
2432    }
2433  }
2434
2435}
2436
2437style "inline_toolbar" {
2438
2439  GtkToolbar::button-relief = GTK_RELIEF_NORMAL
2440
2441  engine "pixmap" {
2442    image {
2443      function = SHADOW
2444      file     = "assets/frame-inline.png"
2445      border   = {1, 1, 0, 1}
2446      stretch  = TRUE
2447    }
2448  }
2449
2450}
2451
2452style "tooltip" {
2453
2454  xthickness = 13
2455  ythickness = 13
2456
2457  bg[NORMAL]   = @tooltip_bg_color
2458  fg[NORMAL]   = @tooltip_fg_color
2459  bg[SELECTED] = @tooltip_bg_color
2460
2461}
2462
2463style "disable_separator" {
2464
2465  xthickness = 0
2466  ythickness = 0
2467
2468  GtkWidget::wide-separators = 1
2469
2470}
2471
2472# Default style, containing theme properties and trying to match every widget as
2473# much as possible, which is not only faster than trying to match every widget
2474# by its own but also less bug-prune and more consistent. However there is some
2475# widget specific stuff that needs to be taken care of, which is the point of
2476# every other style below.
2477class "GtkWidget" style "default"
2478
2479 ######################################
2480 # Override padding, style and colour #
2481 ######################################
2482
2483class "GtkButton"                                                  style "button"
2484class "GtkLinkButton"                                              style "link_button"
2485class "GtkEntry"                                                   style "entry"
2486class "GtkOldEditable"                                             style "entry"
2487class "GtkNotebook"                                                style "notebook"
2488class "GtkHScale"                                                  style "scale_horz"
2489class "GtkVScale"                                                  style "scale_vert"
2490class "GtkProgressBar"                                             style "progressbar"
2491class "GtkScrolledWindow"                                          style "scrolled_window"
2492class "GtkFrame"                                                   style "frame"
2493class "GtkSeparatorToolItem"                                       style "toolbar_separator"
2494class "GtkMenuBar"                                                 style "menubar"
2495class "GtkMenu"                                                    style "menu"
2496class "GtkTextView"                                                style "textview"
2497
2498# Menu and menubar items
2499widget_class "*<GtkMenuItem>*"                                     style "menu_item"
2500widget_class "*<GtkMenuBar>.<GtkMenuItem>*"                        style "menubar_item"
2501widget_class "*<GtkSeparatorMenuItem>*"                            style "separator_menu_item"
2502
2503# Treeview buttons
2504widget_class "*<GtkTreeView>*<GtkButton>*"                         style "treeview_header"
2505
2506# Give the file chooser toolbar a border
2507widget_class "*<GtkFileChooserDefault>*<GtkToolbar>"               style "inline_toolbar"
2508
2509# Fix padding on regular comboboxes
2510widget_class "*<GtkComboBox>.<GtkButton>"                          style "combobox"
2511# And disable separators on them
2512widget_class "*<GtkComboBox>.<GtkButton>*<GtkSeparator>"           style "disable_separator"
2513
2514# Join together the ComboBoxEntry entry and button
2515widget_class "*<GtkComboBoxEntry>*"                                style "combobox_entry"
2516
2517# Join the Combo entry and button
2518widget_class "*<GtkCombo>*"                                        style "combobox_entry"
2519# Tweak the padding on the button a little bit because it
2520# uses it a bit differently
2521widget_class "*<GtkCombo>.<GtkButton>"                             style "combo_button_padding"
2522
2523# Alas we cannot do the same for ComboBoxText because there
2524# isn't a way to apply the style to only the comboboxes that
2525# have an entry inside
2526
2527# Toolbar buttons have different paddings
2528widget_class "*<GtkToolbar>*<GtkButton>"                           style "toolbar_button"
2529
2530# Notebooks are white, act accordingly
2531widget_class "*<GtkNotebook>*<GtkEntry>"                           style "notebook_entry"
2532widget_class "*<GtkNotebook>*<GtkProgressBar>"                     style "notebook_bg"
2533widget_class "*<GtkNotebook>*<GtkSpinButton>"                      style "notebook_bg"
2534widget_class "*<GtkNotebook>*<GtkScrolledWindow>*<GtkViewport>"    style "notebook_bg"
2535widget_class "*<GtkNotebook>*<GimpRuler>"                          style "notebook_bg"
2536widget_class "*<GtkNotebook>.<GimpDisplayShell>*<GtkEventBox>"     style "notebook_bg"
2537widget_class "*<GtkNotebook>*<GtkComboBoxEntry>*"                  style "notebook_combo"
2538widget_class "*<GtkNotebook>*<GtkCombo>*"                          style "notebook_combo"
2539
2540# However, stuff inside eventboxes inside notebooks is grey
2541# again, react
2542widget_class "*<GtkNotebook>*<GtkEventBox>*<GtkEntry>"             style "normal_entry"
2543widget_class "*<GtkNotebook>*<GtkEventBox>*<GtkProgressBar>"       style "normal_bg"
2544widget_class "*<GtkNotebook>*<GtkEventBox>*<GtkSpinButton>"        style "normal_bg"
2545widget_class "*<GtkNotebook>*<GtkEventBox>*<GtkComboBoxEntry>*"    style "combobox_entry"
2546widget_class "*<GtkNotebook>*<GtkEventBox>*<GtkCombo>*"            style "combobox_entry"
2547widget_class "*<GtkNotebook>*<GtkEventBox>*<GtkCombo>.<GtkButton>" style "combo_button_padding"
2548
2549# ComboBoxes tend to draw the button label with text[]
2550# instead of fg[], we need to fix that
2551widget_class "*<GtkComboBox>*<GtkCellView>"                        style "combobox_cellview"
2552
2553# GTK tooltips
2554widget "gtk-tooltip*"                                              style "tooltip"
2555