]> Pileus Git - ~andy/gtk/blob - gtk/gtk-win32-base.css
win32: Fix up theme for menus on XP
[~andy/gtk] / gtk / gtk-win32-base.css
1 @define-color bg_color -gtk-win32-color(button, 15);
2 @define-color text_color -gtk-win32-color(button, 18);
3 @define-color base_color #fff;
4 @define-color selected_bg_color -gtk-win32-color(button, 13);
5 @define-color selected_fg_color -gtk-win32-color(button, 14);
6 @define-color info_fg_color rgb (181, 171, 156);
7 @define-color info_bg_color rgb (252, 252, 189);
8 @define-color warning_fg_color rgb (173, 120, 41);
9 @define-color warning_bg_color rgb (250, 173, 61);
10 @define-color question_fg_color rgb (97, 122, 214);
11 @define-color question_bg_color rgb (138, 173, 212);
12 @define-color error_fg_color rgb (166, 38, 38);
13 @define-color error_bg_color rgb (237, 54, 54);
14
15 GtkWindow,
16 GtkViewport {
17     background-color: @bg_color;
18 }
19
20 * {
21     color: -gtk-win32-color(button, 18);
22     -GtkWidget-link-color: -gtk-win32-color(button, 26);
23     -GtkWidget-visited-link-color: -gtk-win32-color(button, 26);
24     border-color: shade (@bg_color, 0.6);
25 }
26
27 GtkFrame {
28     border-width: 2px;
29     border-style: solid;
30     background-color: transparent;
31     border-image: -gtk-win32-theme-part(button, 4 1) 2 2 2 2 stretch;
32 }
33
34 *:insensitive {
35     color: -gtk-win32-color(button, 17);
36 }
37
38 *:selected,
39 *:selected:focus {
40     background-color: @selected_bg_color;
41     color: @selected_fg_color;
42 }
43
44 .info {
45     background-color: @info_bg_color;
46     color: @info_fg_color;
47 }
48
49 .warning {
50     background-color: @warning_bg_color;
51     color: @warning_fg_color;
52 }
53
54 .question {
55     background-color: @question_bg_color;
56     color: @question_fg_color;
57 }
58
59 .error {
60     background-color: @error_bg_color;
61     color: @error_fg_color;
62 }
63
64 .highlight {
65     background-color: @selected_bg_color;
66     color: @selected_fg_color;
67 }
68
69 .light-area-focus {
70     color: #000;
71 }
72
73 .dark-area-focus {
74     color: #fff;
75 }
76
77 .view {
78   border-width: 0;
79   border-radius: 0;
80   background-color: @base_color;
81   color: @text_color;
82 }
83
84 .view:selected {
85   background-color: shade (@bg_color, 0.9);
86   color: @fg_color;
87 }
88
89 .view:selected:focused {
90   background-color: @selected_bg_color;
91   color: @selected_fg_color;
92 }
93
94 .tooltip {
95     background-color: -gtk-win32-color(button, 24);
96     color: -gtk-win32-color(button, 23);
97     border-width: 1px;
98     border-style: solid;
99 }
100
101 .tooltip * {
102     color: -gtk-win32-color(button, 23);
103 }
104
105 GtkAssistant .sidebar .highlight {
106     font: bold;
107     color:  -gtk-win32-color(button, 9);
108 }
109
110 /* Buttons */
111
112 .button {
113     color: -gtk-win32-color(button, 18);
114     background-color: transparent;
115     background-image: -gtk-win32-theme-part(button, 1 1);
116     border-width: 0;
117     -GtkWidget-focus-line-width: 1;
118     -GtkWidget-focus-padding: 3;
119     -GtkButton-interior-focuse: true;
120     padding: 3px;
121 }
122
123 .button:insensitive {
124     background-image: -gtk-win32-theme-part(button, 1 4);
125 }
126
127 .button:focused {
128     background-image: -gtk-win32-theme-part(button, 1 5);
129 }
130
131 .button:prelight, .button:prelight:focused {
132     background-image: -gtk-win32-theme-part(button, 1 2);
133     color: #000000;
134 }
135
136 .button:active, .button:active:focused, .button:active:focused:prelight {
137     background-image: -gtk-win32-theme-part(button, 1 3);
138 }
139
140 /* Check buttons */
141
142 .check {
143     background-color: transparent;
144     background-image: -gtk-win32-theme-part(button, 3 1);
145     border-width: 0;
146 }
147
148 .check:insensitive {
149     background-image: -gtk-win32-theme-part(button, 3 4);
150 }
151
152 .check:prelight {
153     background-image: -gtk-win32-theme-part(button, 3 2);
154 }
155
156 .check:active {
157     background-image: -gtk-win32-theme-part(button, 3 5);
158 }
159
160 .check:active:insensitive {
161     background-image: -gtk-win32-theme-part(button, 3 8);
162 }
163
164 .check:active:prelight {
165     background-image: -gtk-win32-theme-part(button, 3 6);
166 }
167
168 .check:inconsistent {
169     background-image: -gtk-win32-theme-part(button, 3 9);
170 }
171
172 .check:inconsistent:insensitive {
173     background-image: -gtk-win32-theme-part(button, 3 12);
174 }
175
176 .check:inconsistent:prelight {
177     background-image: -gtk-win32-theme-part(button, 3 10);
178 }
179
180 /* Radio buttons */
181
182 .radio {
183     background-color: transparent;
184     background-image: -gtk-win32-theme-part(button, 2 1);
185     border-width: 0;
186 }
187
188 .radio:insensitive {
189     background-image: -gtk-win32-theme-part(button, 2 4);
190 }
191
192 .radio:prelight {
193     background-image: -gtk-win32-theme-part(button, 2 2);
194 }
195
196 .radio:active {
197     background-image: -gtk-win32-theme-part(button, 2 5);
198 }
199
200 .radio:active:insensitive {
201     background-image: -gtk-win32-theme-part(button, 2 8);
202 }
203
204 .radio:active:prelight {
205     background-image: -gtk-win32-theme-part(button, 2 6);
206 }
207
208 .radio:inconsistent {
209     background-image: -gtk-win32-theme-part(button, 2 1, over (2 5, 0.3));
210 }
211
212 .radio:inconsistent:insensitive {
213     background-image: -gtk-win32-theme-part(button, 2 4, over (2 8, 0.3));
214 }
215
216 .radio:inconsistent:prelight {
217     background-image: -gtk-win32-theme-part(button, 2 4, over(2 6, 0.3));
218 }
219
220 /* Scrollbars */
221
222 /* TODO: Win32 has different concept for upper and lower trough, we
223    don't use this atm */
224
225 .scrollbar {
226     background-color: transparent;
227     -GtkRange-trough-border: 0;
228     -GtkRange-arrow-scaling: 0.0;
229     -GtkRange-slider-width: -gtk-win32-size(scrollbar, 3);
230 }
231
232 .scrollbar.vertical {
233     -GtkRange-slider-width: -gtk-win32-size(scrollbar, 2);
234 }
235
236 .scrollbar.button.bottom {
237     background-image: -gtk-win32-theme-part(scrollbar, 1 5);
238 }
239
240 .scrollbar.button.bottom:prelight {
241     background-image: -gtk-win32-theme-part(scrollbar, 1 6);
242 }
243
244 .scrollbar.button.bottom:active,
245 .scrollbar.button.bottom:active:prelight {
246     background-image: -gtk-win32-theme-part(scrollbar, 1 7);
247 }
248
249 .scrollbar.button.bottom:insensitive {
250     background-image: -gtk-win32-theme-part(scrollbar, 1 8);
251 }
252
253 .scrollbar.button.top {
254     background-image: -gtk-win32-theme-part(scrollbar, 1 1);
255 }
256
257 .scrollbar.button.top:prelight {
258     background-image: -gtk-win32-theme-part(scrollbar, 1 2);
259 }
260
261 .scrollbar.button.top:active,
262 .scrollbar.button.top:active:prelight {
263     background-image: -gtk-win32-theme-part(scrollbar, 1 3);
264 }
265
266 .scrollbar.button.top:insensitive {
267     background-image: -gtk-win32-theme-part(scrollbar, 1 4);
268 }
269
270 .scrollbar.button.left {
271     background-image: -gtk-win32-theme-part(scrollbar, 1 9);
272 }
273
274 .scrollbar.button.left:prelight {
275     background-image: -gtk-win32-theme-part(scrollbar, 1 10);
276 }
277
278 .scrollbar.button.left:active,
279 .scrollbar.button.left:active:prelight {
280     background-image: -gtk-win32-theme-part(scrollbar, 1 11);
281 }
282
283 .scrollbar.button.left:insensitive {
284     background-image: -gtk-win32-theme-part(scrollbar, 1 12);
285 }
286
287 .scrollbar.button.right {
288     background-image: -gtk-win32-theme-part(scrollbar, 1 13);
289 }
290
291 .scrollbar.button.right:prelight {
292     background-image: -gtk-win32-theme-part(scrollbar, 1 14);
293 }
294
295 .scrollbar.button.right:active,
296 .scrollbar.button.right:active:prelight {
297     background-image: -gtk-win32-theme-part(scrollbar, 1 15);
298 }
299
300 .scrollbar.button.right:insensitive {
301     background-image: -gtk-win32-theme-part(scrollbar, 1 16);
302 }
303
304 .scrollbar.trough {
305     border-width: 0;
306     background-image: -gtk-win32-theme-part(scrollbar, 2 1, over (4 1));
307 }
308
309 .scrollbar.trough.vertical {
310     border-width: 0;
311     background-image: -gtk-win32-theme-part(scrollbar, 2 1, over (6 1));
312 }
313
314 .scrollbar.slider {
315     border-width: 0;
316     background-image: -gtk-win32-theme-part(scrollbar, 2 1, over (8 1));
317 }
318
319 .scrollbar.slider:prelight {
320     background-image: -gtk-win32-theme-part(scrollbar, 2 2, over (8 2));
321 }
322
323 .scrollbar.slider.vertical {
324     background-image: -gtk-win32-theme-part(scrollbar, 3 1, over (9 1));
325 }
326
327 .scrollbar.slider.vertical:prelight {
328     background-image: -gtk-win32-theme-part(scrollbar, 3 2, over (9 2));
329 }
330
331 /* Entry */
332
333 /* TODO: For entries with set_has_frame FALSE we should use 'edit, 3 1', not 
334    sure how to select for this though */
335 .entry {
336     background-color: black;
337     border-width: 0;
338     background-image: -gtk-win32-theme-part(edit, 1 1);
339     padding: 3px;
340 }
341 .entry:insensitive {
342     background-image: -gtk-win32-theme-part(edit, 1 4);
343 }
344 .entry:prelight {
345     background-image: -gtk-win32-theme-part(edit, 1 4);
346 }
347
348 /* Spinbuttons */
349
350 .spinbutton .button,
351 .spinbutton .button:focused {
352     background-color: transparent;
353     background-image: -gtk-win32-theme-part(spin, 1 1, margins(-1 -1 0 -1));
354     color: rgba(0, 0, 0, 0);
355 }
356
357 .spinbutton .button:last-child {
358     background-image: -gtk-win32-theme-part(spin, 1 1, margins(-1 -1 0 -2));
359 }
360
361 .spinbutton .button:prelight,
362 .spinbutton .button:prelight:focused {
363     background-image: -gtk-win32-theme-part(spin, 1 2, margins(-1 -1 0 -1));
364 }
365
366 .spinbutton .button:active,
367 .spinbutton .button:active:prelight,
368 .spinbutton .button:active:focused,
369 .spinbutton .button:active:prelight:focused {
370     background-image: -gtk-win32-theme-part(spin, 1 3, margins(-1 -1 0 -1));
371 }
372
373 .spinbutton .button:insensitive {
374     background-image: -gtk-win32-theme-part(spin, 1 4, margins(-1 -1 0 -1));
375 }
376
377 .spinbutton .button:insensitive:last-child {
378     background-image: -gtk-win32-theme-part(spin, 1 4, margins(-1 -1 0 -2));
379 }
380
381 .spinbutton .button.bottom,
382 .spinbutton .button.bottom:focused {
383     background-image: -gtk-win32-theme-part(spin, 2 1);
384 }
385
386 .spinbutton .button.bottom:prelight,
387 .spinbutton .button.bottom:prelight:focused {
388     background-image: -gtk-win32-theme-part(spin, 2 2);
389 }
390
391 .spinbutton .button.bottom:active,
392 .spinbutton .button.bottom:active:prelight {
393     background-image: -gtk-win32-theme-part(spin, 2 3);
394 }
395
396 .spinbutton .button.bottom:insensitive {
397     background-image: -gtk-win32-theme-part(spin, 2 4);
398 }
399
400 /* Ranges */
401
402 /* TODO: The trough is not quite right, it covers everything,
403    but in win32 the slider 'sticks out' on the sides of the
404    trough */
405
406 .scale {
407     background-color: transparent;
408     -GtkScale-value-spacing: 0;
409     -GtkScale-slider-length: 9;
410     -GtkRange-slider-width: 20;
411     -GtkRange-trough-border: 0;
412 }
413
414 .scale.trough {
415     border-style: none;
416     border-width: 0;
417     background-image: -gtk-win32-theme-part(trackbar, 1 1, margins (2 0 2 0));
418 }
419
420 .scale.trough.vertical {
421     background-image: -gtk-win32-theme-part(trackbar, 1 1, margins (0 2 0 2));
422 }
423
424 .scale.slider {
425     background-color: transparent;
426     border-width: 0;
427     color: rgba(0,0,0,0);
428     background-image: -gtk-win32-theme-part(trackbar, 3 1);
429 }
430
431 .scale.slider:prelight {
432     background-image: -gtk-win32-theme-part(trackbar, 3 2);
433 }
434
435 .scale.slider:active,
436 .scale.slider:prelight:active {
437     background-image: -gtk-win32-theme-part(trackbar, 3 3);
438 }
439
440 .scale.slider:focus {
441     background-image: -gtk-win32-theme-part(trackbar, 3 4);
442 }
443
444 .scale.slider:insensitive {
445     background-image: -gtk-win32-theme-part(trackbar, 3 5);
446 }
447
448 .scale.slider.vertical {
449     background-image: -gtk-win32-theme-part(trackbar, 6 1);
450 }
451
452 .scale.slider.vertical:prelight {
453     background-image: -gtk-win32-theme-part(trackbar, 6 2);
454 }
455
456 .scale.slider.vertical:active,
457 .scale.slider.vertical:prelight:active {
458     background-image: -gtk-win32-theme-part(trackbar, 6 3);
459 }
460
461 .scale.slider.vertical:focus {
462     background-image: -gtk-win32-theme-part(trackbar, 6 4);
463 }
464
465 .scale.slider.vertical:insensitive {
466     background-image: -gtk-win32-theme-part(trackbar, 6 5);
467 }
468
469 .scale.slider.scale-has-marks-below {
470     background-image: -gtk-win32-theme-part(trackbar, 4 1);
471 }
472
473 .scale.slider.scale-has-marks-below:prelight {
474     background-image: -gtk-win32-theme-part(trackbar, 4 2);
475 }
476
477 .scale.slider.scale-has-marks-below:active,
478 .scale.slider.scale-has-marks-below:prelight:active {
479     background-image: -gtk-win32-theme-part(trackbar, 4 3);
480 }
481
482 .scale.slider.scale-has-marks-below:focus {
483     background-image: -gtk-win32-theme-part(trackbar, 4 4);
484 }
485
486 .scale.slider.scale-has-marks-below:insensitive {
487     background-image: -gtk-win32-theme-part(trackbar, 4 5);
488 }
489
490 .scale.slider.scale-has-marks-below.vertical {
491     background-image: -gtk-win32-theme-part(trackbar, 8 1);
492 }
493
494 .scale.slider.scale-has-marks-below.vertical:prelight {
495     background-image: -gtk-win32-theme-part(trackbar, 8 2);
496 }
497
498 .scale.slider.scale-has-marks-below.vertical:active,
499 .scale.slider.scale-has-marks-below.vertical:prelight:active {
500     background-image: -gtk-win32-theme-part(trackbar, 8 3);
501 }
502
503 .scale.slider.scale-has-marks-below.vertical:focus {
504     background-image: -gtk-win32-theme-part(trackbar, 8 4);
505 }
506
507 .scale.slider.scale-has-marks-below.vertical:insensitive {
508     background-image: -gtk-win32-theme-part(trackbar, 8 5);
509 }
510
511
512
513 .scale.slider.scale-has-marks-above {
514     background-image: -gtk-win32-theme-part(trackbar, 5 1);
515 }
516
517 .scale.slider.scale-has-marks-above:prelight {
518     background-image: -gtk-win32-theme-part(trackbar, 5 2);
519 }
520
521 .scale.slider.scale-has-marks-above:active,
522 .scale.slider.scale-has-marks-above:prelight:active {
523     background-image: -gtk-win32-theme-part(trackbar, 5 3);
524 }
525
526 .scale.slider.scale-has-marks-above:focus {
527     background-image: -gtk-win32-theme-part(trackbar, 5 4);
528 }
529
530 .scale.slider.scale-has-marks-above:insensitive {
531     background-image: -gtk-win32-theme-part(trackbar, 5 5);
532 }
533
534 .scale.slider.scale-has-marks-above.vertical {
535     background-image: -gtk-win32-theme-part(trackbar, 7 1);
536 }
537
538 .scale.slider.scale-has-marks-above.vertical:prelight {
539     background-image: -gtk-win32-theme-part(trackbar, 7 2);
540 }
541
542 .scale.slider.scale-has-marks-above.vertical:active,
543 .scale.slider.scale-has-marks-above.vertical:prelight:active {
544     background-image: -gtk-win32-theme-part(trackbar, 7 3);
545 }
546
547 .scale.slider.scale-has-marks-above.vertical:focus {
548     background-image: -gtk-win32-theme-part(trackbar, 7 4);
549 }
550
551 .scale.slider.scale-has-marks-above.vertical:insensitive {
552     background-image: -gtk-win32-theme-part(trackbar, 7 5);
553 }
554
555 /* Progress bars */
556
557 GtkProgressBar {
558     background-color: transparent;
559     padding: 0;
560 }
561
562 GtkProgressBar.trough {
563     border-width: 0;
564     background-image: -gtk-win32-theme-part(progress, 1 1);
565 }
566
567 GtkProgressBar.progressbar,
568 GtkEntry.progressbar {
569     border-width: 0;
570     background-image: -gtk-win32-theme-part(progress, 5 1);
571 }
572
573 GtkProgressBar.progressbar.pulse,
574 GtkEntry.progressbar.pulse {
575     background-color: transparent;
576     background-image: -gtk-win32-theme-part(progress, 8 1);
577 }
578
579 GtkProgressBar.trough.vertical {
580     background-image: -gtk-win32-theme-part(progress, 2 1);
581 }
582
583 .progressbar.vertical {
584     background-image: -gtk-win32-theme-part(progress, 6 1);
585 }
586
587 .progressbar.pulse.vertical {
588     background-image: -gtk-win32-theme-part(progress, 10 1);
589 }
590
591 /* Combobox */
592
593
594 GtkComboBox.combobox-entry .button {
595     background-color: transparent;
596     border-width: 0;
597     background-image: -gtk-win32-theme-part(combobox, 1 1);
598     color: rgba(0, 0, 0, 0);
599 }
600
601 GtkComboBox.combobox-entry .button:prelight,
602 GtkComboBox.combobox-entry .button:focused,
603 GtkComboBox.combobox-entry .button:prelight:focused {
604     background-image: -gtk-win32-theme-part(combobox, 1 2);
605 }
606 GtkComboBox.combobox-entry .button:active,
607 GtkComboBox.combobox-entry .button:active:focused,
608 GtkComboBox.combobox-entry .button:active:prelight,
609 GtkComboBox.combobox-entry .button:active:focused:prelight {
610     background-image: -gtk-win32-theme-part(combobox, 1 3);
611 }
612 GtkComboBox.combobox-entry .button:insensitive {
613     background-image: -gtk-win32-theme-part(combobox, 1 4);
614 }
615
616 /* Notebook */
617
618 .notebook {
619     background-color: #ffffff;
620     border-width: 1px 1px 1px 1px;
621     border-style: solid;
622     background-origin: padding-box;
623     background-clip: border-box;
624     background-image: -gtk-win32-theme-part(tab, 9 1, margins(-1 -3 -2 -1));
625     border-image: -gtk-win32-theme-part(tab, 9 1, margins(0 -2 -1 0)) 1 1 1 1 repeat;
626     -GtkNotebook-tab-overlap: 1;
627     -GtkNotebook-tab-curvature: 0;
628 }
629
630 .notebook tab {
631     border-width: 0;
632     background-image: -gtk-win32-theme-part(tab, 1 1);
633     padding: 0px 4px 0px 4px;
634 }
635
636 .notebook tab.left, .notebook tab.right {
637     padding: 4px 0px 4px 0px;
638 }
639
640 .notebook tab:active {
641     background-image: -gtk-win32-theme-part(tab, 1 3, margins(0 0 -1 0));
642 }
643 .notebook tab:active.top {
644     padding: 2px 4px 1px 4px;
645 }
646
647 .notebook tab:active.bottom {
648     padding: 1px 4px 2px 4px;
649 }
650
651 .notebook tab:active.right {
652     padding: 4px 4px 4px 1px;
653 }
654
655 .notebook tab:active.left {
656     padding: 4px 1px 4px 4px;
657 }
658
659 /* Toolbar */
660
661 .toolbar {
662     background-color: transparent;
663     border-width: 0;
664     background-image: -gtk-win32-theme-part(rebar, 6 1);
665 }
666
667 .toolbar .button,
668 .toolbar .button:focused {
669     background-color: transparent;
670     background-image: -gtk-win32-theme-part(toolbar, 1 1);
671 }
672
673 .toolbar .button:prelight,
674 .toolbar .button:prelight:focused {
675     background-image: -gtk-win32-theme-part(toolbar, 1 2);
676 }
677
678 .toolbar .button:active {
679     background-image: -gtk-win32-theme-part(toolbar, 1 3);
680 }
681
682 .toolbar .button:active:prelight {
683     background-image: -gtk-win32-theme-part(toolbar, 1 6);
684 }
685
686 .toolbar .button:insensitive {
687     background-image: -gtk-win32-theme-part(toolbar, 1 4);
688 }
689
690 /* Column headers */
691
692 column-header .button,
693 column-header .button:focus {
694     background-color: transparent;
695     border-width: 0;
696     background-image: -gtk-win32-theme-part(header, 1 1);
697 }
698
699 column-header .button:prelight,
700 column-header .button:prelight:focus {
701     background-image: -gtk-win32-theme-part(header, 1 2);
702 }
703
704 column-header .button:active,
705 column-header .button:active:prelight,
706 column-header .button:active:focus,
707 column-header .button:active:prelight:focus {
708     background-image: -gtk-win32-theme-part(header, 1 3);
709 }
710
711 GtkSwitch {
712     font: bold condensed 10;
713     color: -gtk-win32-color(button, 18);
714 }
715
716 GtkSwitch.slider {
717     padding: 4px;
718     background-color: transparent;
719     background-image: -gtk-win32-theme-part(scrollbar, 2 1, over (8 1));
720     border-width: 0;
721 }
722
723 GtkSwitch.trough:insensitive {
724     background-image: -gtk-win32-theme-part(button, 1 4);
725 }
726
727 GtkSwitch.trough {
728     background-image: -gtk-win32-theme-part(button, 1 1);
729 }
730
731 GtkSwitch.trough:active {
732     background-image: -gtk-win32-theme-part(button, 1 2);
733 }
734
735 /* Menus */
736
737 .menu {
738     background-color: -gtk-win32-color(button, 4);
739     border-color: shade (-gtk-win32-color(button, 4), 0.6);
740     border-style: solid;
741     border-width: 1px;
742     padding: 2px;
743 }
744
745 .menuitem {
746     color: -gtk-win32-color(button, 7);
747 }
748
749 .menubar > .menuitem {
750     padding: 3px 5px;
751 }