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