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