A fork of the Materia GTK theme.

Important information: Google announced that, from September 2026, Android devices will require ALL apps to be signed by Google, effectively leading to an iOS situation. Value your right to a computer that does what you want; do not tolerate this monopolistic practice! Contact me if you don't understand why it is bad. Click to learn more.

 _common.scss

View raw Download
text/plain • 74.43 kiB
ASCII text
        
            
1
$asset_suffix: if($variant=='dark', '-dark', '');
2
$extra_background_clip: if($variant == 'light', padding-box, border-box);
3
4
$small_size: 24px;
5
$medium_size: 36px;
6
$large_size: 48px;
7
$bar_size: 4px;
8
$menuitem_size: 28px;
9
10
$container_padding: 6px;
11
$material_radius: 2px;
12
$material_faster: 0.2s;
13
$material_slower: 0.3s;
14
$material_ease: cubic-bezier(0.4, 0.0, 0.2, 1);
15
$material_ease_out: cubic-bezier(0.0, 0.0, 0.2, 1);
16
$material_ease_in: cubic-bezier(0.4, 0.0, 1, 1);
17
// FIXME: color's transition is too slow
18
$material_transition: all $material_slower $material_ease_out, color 0;
19
$shadow_transition: box-shadow $material_faster $material_ease_out;
20
21
* {
22
padding: 0;
23
background-clip: padding-box;
24
25
-GtkToolButton-icon-spacing: 4;
26
-GtkTextView-error-underline-color: $error_color;
27
28
// The size for scrollbars. The slider is 2px smaller, but we keep it
29
// up so that the whole area is sensitive to button presses for the
30
// slider. The stepper button is larger in both directions, the slider
31
// only in the width
32
33
-GtkScrolledWindow-scrollbar-spacing: 0;
34
35
-GtkToolItemGroup-expander-size: 11;
36
-GtkTreeView-expander-size: 11;
37
38
-GtkTreeView-horizontal-separator: 4;
39
40
-GtkWidget-text-handle-width: 24;
41
-GtkWidget-text-handle-height: 24;
42
43
-GtkDialog-button-spacing: 4;
44
-GtkDialog-action-area-border: 0;
45
46
// We use the outline properties to signal the focus properties
47
// to the adwaita engine: using real CSS properties is faster,
48
// and we don't use any outlines for now.
49
50
outline-style: solid;
51
outline-width: 2px;
52
outline-color: $track_color;
53
outline-offset: -4px;
54
-gtk-outline-radius: 2px;
55
56
-gtk-secondary-caret-color: $selected_bg_color;
57
}
58
59
60
/***************
61
* Base States *
62
***************/
63
.background {
64
background-color: $bg_color;
65
color: $fg_color;
66
}
67
68
/*
69
These wildcard seems unavoidable, need to investigate.
70
Wildcards are bad and troublesome, use them with care,
71
or better, just don't.
72
Everytime a wildcard is used a kitten dies, painfully.
73
*/
74
75
*:disabled { -gtk-icon-effect: dim; }
76
77
.gtkstyle-fallback {
78
background-color: $bg_color;
79
color: $fg_color;
80
81
&:hover {
82
background-color: darken($bg_color, 5%);
83
color: $fg_color;
84
}
85
86
&:active {
87
background-color: darken($bg_color, 10%);
88
color: $fg_color;
89
}
90
91
&:disabled {
92
background-color: $bg_color;
93
color: $insensitive_fg_color;
94
}
95
96
&:selected {
97
background-color: $selected_bg_color;
98
color: $selected_fg_color;
99
}
100
}
101
102
.view,
103
%view {
104
@extend row.activatable;
105
106
background-color: $base_color;
107
color: $fg_color;
108
109
&:hover, &:active, &:selected { border-radius: 2px; }
110
111
&:disabled {
112
// background-color: $secondary_base_color;
113
color: $insensitive_fg_color;
114
}
115
116
&:selected { @extend %selected_items; }
117
}
118
119
.view,
120
textview {
121
text {
122
// @extend %view;
123
124
background-color: $base_color;
125
color: $fg_color;
126
127
&:disabled {
128
// background-color: $secondary_base_color;
129
color: $insensitive_fg_color;
130
}
131
132
selection { @extend %selected_items; }
133
}
134
}
135
136
textview border {
137
background-color: $secondary_base_color;
138
background-image: image($borders_color); // HACK: the border node just draws background so, using a background-image to draw the border
139
background-repeat: no-repeat;
140
color: $tertiary_fg_color;
141
142
&.bottom {
143
background-size: 100% 1px;
144
background-position: top;
145
}
146
147
&.top {
148
background-size: 100% 1px;
149
background-position: bottom;
150
}
151
152
&.left {
153
background-size: 1px 100%;
154
background-position: right;
155
}
156
157
&.right {
158
background-size: 1px 100%;
159
background-position: left;
160
}
161
}
162
163
iconview { @extend .view; }
164
165
.rubberband,
166
rubberband {
167
border: 1px solid $secondary_selected_bg_color;
168
background-color: scale-alpha($secondary_selected_bg_color, $lower_opacity);
169
}
170
171
flowbox {
172
rubberband { @extend rubberband; }
173
174
flowboxchild {
175
outline-offset: -2px;
176
padding: 4px;
177
border-radius: 2px;
178
179
&:selected { @extend %selected_items; }
180
}
181
}
182
183
label {
184
&.separator {
185
@extend .dim-label;
186
187
color: $fg_color;
188
}
189
190
row:selected &,
191
&:selected { @extend %nobg_selected_items; }
192
193
selection {
194
background-color: $selected_bg_color;
195
color: $selected_fg_color;
196
}
197
198
&:disabled {
199
color: $insensitive_fg_color;
200
201
selection { @extend %selected_items:disabled; }
202
}
203
}
204
205
.dim-label { opacity: $hint_opacity; }
206
207
assistant {
208
.sidebar {
209
padding: 4px 0;
210
// background-color: $base_color;
211
// border-top: 1px solid $borders_color;
212
}
213
214
// &.csd .sidebar { border-top-style: none; }
215
216
.sidebar label {
217
min-height: $medium_size;
218
padding: 0 12px;
219
color: $tertiary_fg_color;
220
font-weight: 500;
221
222
&.highlight { color: $fg_color; }
223
}
224
}
225
226
%osd, .osd { opacity: $higher_opacity; }
227
228
229
/*********************
230
* Spinner Animation *
231
*********************/
232
@keyframes spin {
233
to { -gtk-icon-transform: rotate(1turn); }
234
}
235
236
@keyframes spin_colors {
237
1% { color: $info_bg_color; } 25% { color: $info_bg_color; }
238
26% { color: $question_bg_color; } 50% { color: $question_bg_color; }
239
51% { color: $warning_bg_color; } 75% { color: $warning_bg_color; }
240
76% { color: $error_bg_color; } 100% { color: $error_bg_color; }
241
}
242
243
spinner {
244
background: none;
245
opacity: 0; // non spinning spinner makes no sense
246
-gtk-icon-source: -gtk-icontheme('process-working-symbolic');
247
248
&:checked {
249
opacity: 1;
250
animation: spin 1s linear infinite, spin_colors 4s linear infinite;
251
252
&:disabled { opacity: $disabled_opacity; }
253
}
254
}
255
256
257
/****************
258
* Text Entries *
259
****************/
260
%entry,
261
entry {
262
%entry_basic, & {
263
min-height: $medium_size;
264
padding: 0 8px;
265
border-radius: 2px;
266
267
@include entry(normal);
268
269
&:focus { @include entry(focus); }
270
271
&:disabled { @include entry(insensitive); }
272
273
&.flat {
274
border-radius: 0;
275
276
@include entry(flat-normal);
277
278
&:focus { @include entry(flat-focus); }
279
280
&:disabled { @include entry(flat-insensitive); }
281
}
282
283
image { // icons inside the entry
284
color: gtkalpha(currentColor, $enabled_opacity);
285
286
&:hover, &:active { color: currentColor; }
287
288
&:disabled { color: gtkalpha(currentColor, $hint_opacity); }
289
290
&.left { padding-left: 2px; padding-right: 6px; }
291
292
&.right { padding-left: 6px; padding-right: 2px; }
293
}
294
295
undershoot {
296
&.left { @include undershoot(left); }
297
298
&.right { @include undershoot(right); }
299
}
300
301
selection { @extend %selected_items; }
302
303
// entry error and warning style
304
@each $e_type, $e_color in (error, $error_color),
305
(warning, $warning_color) {
306
&.#{$e_type} {
307
@include entry(normal, $e_color);
308
309
&:focus { @include entry(focus, $e_color); }
310
311
&:disabled { @include entry(insensitive, $e_color); }
312
313
&.flat {
314
@include entry(flat-normal, $e_color);
315
316
&:focus { @include entry(flat-focus, $e_color); }
317
318
&:disabled { @include entry(flat-insensitive, $e_color); }
319
}
320
}
321
}
322
323
&:drop(active) {
324
// box-shadow: inset 0 0 0 2px $accent_bg_color;
325
}
326
327
.osd & {
328
}
329
}
330
331
progress {
332
margin: 2px -6px;
333
border-style: none none solid;
334
border-width: 2px;
335
border-color: $selected_bg_color;
336
// border-radius: 0;
337
// box-shadow: none;
338
background-color: transparent;
339
// background-image: none;
340
}
341
342
// linked entries
343
.linked:not(.vertical) > &:not(.flat) { @extend %linked; }
344
345
// Vertically linked entries
346
.linked.vertical > &:not(.flat) { @extend %linked_vertical; }
347
}
348
349
treeview acceleditor > label { background-color: $selected_bg_color; }
350
351
treeview entry {
352
&.flat, & {
353
min-height: 0;
354
padding: 2px;
355
border-radius: 0;
356
background-color: $base_color;
357
358
&, &:focus {
359
border-image: none;
360
box-shadow: none;
361
}
362
}
363
}
364
365
366
/***********
367
* Buttons *
368
***********/
369
// stuff for .needs-attention
370
@keyframes needs_attention {
371
from {
372
background-image: -gtk-gradient(radial,
373
center center, 0,
374
center center, 0.001,
375
to($accent_bg_color),
376
to(transparent));
377
}
378
379
to {
380
background-image: -gtk-gradient(radial,
381
center center, 0,
382
center center, 0.5,
383
to($accent_bg_color),
384
to(transparent));
385
}
386
}
387
388
%button,
389
button {
390
@at-root %button_basic, & {
391
min-height: 24px;
392
min-width: 16px;
393
padding: 6px 10px;
394
border-radius: 2px;
395
font-weight: 500;
396
397
@include button(normal);
398
399
&:hover { @include button(hover); }
400
401
&:active { @include button(active); }
402
403
&:disabled { @include button(insensitive); }
404
405
&:checked { @include button(checked); }
406
407
&:checked:disabled { @include button(checked-insensitive); }
408
409
&.flat {
410
@include button(flat-normal);
411
412
&:hover { @include button(flat-hover); }
413
414
&:active { @include button(flat-active); }
415
416
&:disabled { @include button(flat-insensitive); }
417
418
&:checked { @include button(flat-checked); }
419
420
&:checked:disabled { @include button(flat-checked-insensitive); }
421
}
422
423
&.image-button {
424
min-width: 24px;
425
padding: 6px;
426
-gtk-outline-radius: 100px;
427
border-radius: 100px;
428
}
429
430
&.text-button {
431
padding-left: 16px;
432
padding-right: 16px;
433
}
434
435
&.text-button.image-button {
436
padding-left: 10px;
437
padding-right: 10px;
438
-gtk-outline-radius: 2px;
439
border-radius: 2px;
440
441
label {
442
&:last-child { padding-left: 2px; padding-right: 6px; }
443
&:first-child { padding-left: 6px; padding-right: 2px; }
444
}
445
}
446
447
.linked > & { @extend %linked; }
448
449
.linked.vertical > & { @extend %linked_vertical; }
450
451
.linked > &.flat,
452
.linked.vertical > &.flat {
453
border-radius: 2px;
454
455
&.image-button {
456
-gtk-outline-radius: 100px;
457
border-radius: 100px;
458
}
459
460
&.text-button.image-button {
461
-gtk-outline-radius: 2px;
462
border-radius: 2px;
463
}
464
}
465
466
&:drop(active) {
467
// box-shadow: inset 0 0 0 2px $accent_bg_color;
468
}
469
}
470
471
@at-root %button_selected, row:selected & {
472
&:disabled { color: $insensitive_secondary_selected_fg_color; }
473
474
&.flat {
475
color: $secondary_selected_fg_color;
476
477
&:hover, &:active { color: $selected_fg_color; }
478
479
&:disabled { color: $insensitive_secondary_selected_fg_color; }
480
}
481
}
482
483
separator {
484
min-width: 0;
485
min-height: 0;
486
background: transparent;
487
}
488
489
// big standalone buttons like in Documents pager
490
&.osd {
491
padding: 12px 16px;
492
493
&.image-button { padding: 12px; }
494
495
&:disabled { opacity: 0; }
496
}
497
498
//overlay / OSD style
499
@at-root %osd_button,
500
.osd & {
501
}
502
503
// Suggested and Destructive Action buttons
504
@each $b_type, $b_color in (suggested-action, $suggested_color),
505
(destructive-action, $destructive_color) {
506
&.#{$b_type} {
507
background-color: $b_color;
508
color: $selected_fg_color;
509
510
// @include button(normal, $b_color, white);
511
512
// &:hover { @include button(hover, $b_color, white); }
513
514
// &:active, &:checked { @include button(active, $b_color, white); }
515
516
&:disabled { @include button(insensitive, $b_color, white); }
517
518
&:checked { background-color: mix($selected_fg_color, $b_color, percentage($lower_opacity)); }
519
520
&.flat {
521
background-color: transparent;
522
color: $b_color;
523
524
// @include button(flat-normal, $b_color, white);
525
526
// &:hover { @include button(flat-hover, $b_color, white); }
527
528
// &:active, &:checked { @include button(flat-active, $b_color, white); }
529
530
&:disabled { @include button(flat-insensitive, $b_color, white); }
531
}
532
533
.osd & {
534
}
535
}
536
}
537
538
.stack-switcher > & {
539
// to position the needs attention dot, padding is added to the button
540
// child, a label needs just lateral padding while an icon needs vertical
541
// padding added too.
542
543
outline-offset: -4px; // needs to be set or it gets overriden by GtkRadioButton outline-offset
544
545
> label {
546
padding-left: 6px; // label padding
547
padding-right: 6px; //
548
}
549
550
> image {
551
padding-left: 6px; // image padding
552
padding-right: 6px; //
553
padding-top: 3px; //
554
padding-bottom: 3px; //
555
}
556
557
&.text-button {
558
// compensate text-button paddings
559
padding-left: 10px;
560
padding-right: 10px;
561
}
562
563
&.image-button {
564
// we want image buttons to have a 1:1 aspect ratio, so compensation
565
// of the padding added to the GtkImage is needed
566
padding-left: 4px;
567
padding-right: 4px;
568
}
569
570
&.needs-attention {
571
> label,
572
> image { @extend %needs_attention; }
573
574
&:checked {
575
> label,
576
> image {
577
animation: none;
578
background-image: none;
579
}
580
}
581
}
582
}
583
584
// inline-toolbar buttons
585
.inline-toolbar & {
586
@extend %button_basic.flat;
587
588
&:not(.text-button) { @extend %button_basic.image-button; }
589
}
590
591
.primary-toolbar & { -gtk-icon-shadow: none; } // tango icons don't need shadows
592
}
593
594
%needs_attention {
595
animation: needs_attention $material_slower $material_ease_out forwards;
596
background-repeat: no-repeat;
597
background-position: right 3px;
598
background-size: 6px 6px;
599
600
&:dir(rtl) { background-position: left 3px; }
601
}
602
603
// all the following is for the +|- buttons on inline toolbars, that way
604
// should really be deprecated...
605
.inline-toolbar toolbutton > button { // redefining the button look is
606
// needed since those are flat...
607
}
608
609
// More inline toolbar buttons
610
toolbar.inline-toolbar toolbutton {
611
// > button.flat { @extend %linked_middle; }
612
613
// &:first-child > button.flat { @extend %linked:first-child; }
614
615
// &:last-child > button.flat { @extend %linked:last-child; }
616
617
// &:only-child > button.flat { @extend %linked:only-child; }
618
}
619
620
%linked_middle {
621
border-radius: 0;
622
}
623
624
%linked {
625
-gtk-outline-radius: 2px;
626
627
@extend %linked_middle;
628
629
&:first-child {
630
border-top-left-radius: 2px;
631
border-bottom-left-radius: 2px;
632
}
633
634
&:last-child {
635
border-top-right-radius: 2px;
636
border-bottom-right-radius: 2px;
637
}
638
639
&:only-child {
640
border-radius: 2px;
641
}
642
}
643
644
%linked_vertical_middle {
645
border-radius: 0;
646
}
647
648
%linked_vertical{
649
-gtk-outline-radius: 2px;
650
651
@extend %linked_vertical_middle;
652
653
&:first-child {
654
border-top-left-radius: 2px;
655
border-top-right-radius: 2px;
656
}
657
658
&:last-child {
659
border-bottom-left-radius: 2px;
660
border-bottom-right-radius: 2px;
661
}
662
663
&:only-child {
664
border-radius: 2px;
665
}
666
}
667
668
/* menu buttons */
669
modelbutton.flat,
670
.menuitem.button.flat {
671
min-height: $menuitem_size;
672
padding-left: 8px;
673
padding-right: 8px;
674
border-radius: 2px;
675
color: inherit;
676
677
@extend %button_basic.flat;
678
679
&:selected { @extend %selected_items; }
680
681
check,
682
radio {
683
&:not(:checked):not(:indeterminate) { color: gtkalpha(currentColor, $hint_opacity); }
684
685
&, &:hover { background-image: none; }
686
687
&:active { animation: none; }
688
689
&:last-child { margin-left: -8px; margin-right: -16px; }
690
691
&:first-child { margin-left: -16px; margin-right: -8px; }
692
}
693
694
check:not(:indeterminate):checked { @extend %check_checked; }
695
696
// radio:not(:indeterminate):checked { @extend %radio_checked; }
697
698
check:indeterminate:checked, radio:indeterminate:checked { @extend %indeterminate_checked; }
699
}
700
701
modelbutton.flat arrow {
702
background: none;
703
704
&:hover { background: none; }
705
706
&.left { -gtk-icon-source: -gtk-icontheme("pan-start-symbolic"); }
707
708
&.right { -gtk-icon-source: -gtk-icontheme("pan-end-symbolic"); }
709
}
710
711
button.color {
712
min-height: $small_size;
713
min-width: $small_size;
714
padding: $container_padding;
715
716
colorswatch:only-child {
717
// &, overlay { border-radius: 0; }
718
}
719
}
720
721
722
/*********
723
* Links *
724
*********/
725
*:link {
726
&, &:hover, &:active { color: $link_color; }
727
728
&:visited {
729
&, &:hover, &:active { color: $link_visited_color; }
730
}
731
732
@at-root %link_selected,
733
&:selected,
734
*:selected & { color: $selected_fg_color; }
735
}
736
737
button:link,
738
button:visited {
739
@extend *:link;
740
741
> label { text-decoration-line: underline; }
742
}
743
744
/*****************
745
* GtkSpinButton *
746
*****************/
747
spinbutton {
748
&:not(.vertical) {
749
// in this horizontal configuration, the whole spinbutton
750
// behaves as the entry, so we extend the entry styling
751
// and nuke the style on the internal entry
752
@extend %entry;
753
754
padding: 0;
755
756
%spinbutton_entry,
757
entry {
758
min-width: $large_size - 16px;
759
// reset all the other props since the spinbutton node is styled here
760
margin: 0;
761
border-image: none;
762
border-radius: 0;
763
box-shadow: none;
764
background-color: transparent;
765
}
766
767
button {
768
min-height: $small_size;
769
min-width: $small_size;
770
// margin: $container_padding;
771
padding: 0;
772
border: solid $container_padding transparent;
773
774
@extend %button_basic.flat;
775
776
@extend %button_basic.image-button;
777
778
&.up { margin-left: -$container_padding / 2; }
779
780
&.down { margin-right: -$container_padding / 2; }
781
}
782
}
783
784
// OSD horizontal
785
.osd &:not(.vertical) {
786
button {
787
}
788
}
789
790
// Vertical
791
&.vertical {
792
// in the vertical configuration, we treat the spinbutton
793
// as a box, and tweak the style of the entry in the middle
794
// so that it's linked
795
796
// FIXME: this should not be set at all, but otherwise it gets the wrong
797
// color
798
&:disabled { color: $insensitive_fg_color; }
799
800
&:drop(active) {
801
box-shadow: none;
802
}
803
804
entry {
805
min-height: $medium_size;
806
min-width: $large_size;
807
padding: 0;
808
}
809
810
button {
811
min-height: $medium_size;
812
min-width: $large_size;
813
padding: 0;
814
815
@extend %button_basic.flat;
816
817
&.up { border-radius: 2px 2px 0 0; }
818
819
&.down { border-radius: 0 0 2px 2px; }
820
}
821
}
822
823
// OSD vertical
824
.osd &.vertical button:first-child {
825
}
826
827
// Misc
828
treeview &:not(.vertical) {
829
min-height: 0;
830
border-style: none;
831
border-radius: 0;
832
833
entry {
834
min-height: 0;
835
padding: 1px 2px;
836
}
837
}
838
}
839
840
841
/**************
842
* ComboBoxes *
843
**************/
844
combobox {
845
arrow {
846
-gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
847
min-height: 16px;
848
min-width: 16px;
849
}
850
851
menu,
852
.menu {
853
padding: 2px 0;
854
855
menuitem {
856
min-height: $medium_size;
857
padding: 0 10px;
858
}
859
}
860
861
&.linked {
862
button:nth-child(2) {
863
&:dir(ltr) { @extend %linked:last-child; }
864
&:dir(rtl) { @extend %linked:first-child; }
865
}
866
}
867
868
&:drop(active) { // FIXME: untested
869
box-shadow: none;
870
871
// button.combo { @extend %button_basic:drop(active); }
872
}
873
}
874
875
.linked > combobox > box > button.combo {
876
// the combo is a composite widget so the way we do button linking doesn't
877
// work, special case needed. See
878
// https://bugzilla.gnome.org/show_bug.cgi?id=733979
879
880
&:dir(ltr),
881
&:dir(rtl) { @extend %linked_middle; } // specificity bump
882
}
883
884
.linked:not(.vertical) > combobox:first-child > box > button.combo { @extend %linked:first-child; }
885
.linked:not(.vertical) > combobox:last-child > box > button.combo { @extend %linked:last-child; }
886
.linked:not(.vertical) > combobox:only-child > box > button.combo { @extend %linked:only-child; }
887
888
.linked.vertical > combobox > box > button.combo { @extend %linked_vertical_middle; }
889
.linked.vertical > combobox:first-child > box > button.combo { @extend %linked_vertical:first-child;}
890
.linked.vertical > combobox:last-child > box > button.combo { @extend %linked_vertical:last-child; }
891
.linked.vertical > combobox:only-child > box > button.combo { @extend %linked_vertical:only-child; }
892
893
894
/************
895
* Toolbars *
896
************/
897
toolbar {
898
-GtkWidget-window-dragging: true;
899
padding: $container_padding / 2;
900
background-color: $bg_color;
901
902
// on OSD
903
.osd & { background-color: transparent; }
904
905
// stand-alone OSD toolbars
906
&.osd {
907
transition: $shadow_transition;
908
padding: $container_padding;
909
border-radius: 2px;
910
box-shadow: $z-depth-2;
911
background-color: $base_color;
912
913
&:backdrop { box-shadow: $z-depth-1; }
914
915
&.left,
916
&.right,
917
&.top,
918
&.bottom { border-radius: 0; } // positional classes for `attached` osd toolbars
919
920
button { @extend %button_basic.flat; }
921
}
922
923
// toolbar separators
924
&.horizontal separator { margin: $container_padding / 2; }
925
&.vertical separator { margin: $container_padding / 2; }
926
927
&:not(.inline-toolbar):not(.osd) {
928
scale,
929
entry,
930
spinbutton,
931
button { margin: $container_padding / 2; }
932
933
switch { margin: ($container_padding / 2 + $container_padding) ($container_padding / 2); }
934
}
935
}
936
937
//searchbar, location-bar & inline-toolbar
938
.inline-toolbar {
939
padding: $container_padding;
940
border-style: solid;
941
border-width: 0 1px 1px;
942
border-color: $borders_color;
943
background-color: $secondary_base_color;
944
}
945
946
searchbar,
947
.location-bar {
948
padding: $container_padding;
949
border-style: solid;
950
border-width: 0 0 1px;
951
border-color: $borders_color;
952
background-color: $bg_color;
953
background-clip: border-box;
954
}
955
956
957
/***************
958
* Header bars *
959
***************/
960
%titlebar,
961
headerbar {
962
transition: background-color $material_faster $material_ease_out, color $material_faster $material_ease_out;
963
min-height: $large_size;
964
padding: 0 $container_padding;
965
box-shadow: $z-depth-1, inset 0 1px $secondary_highlight_color;
966
background-color: $headerbar_color;
967
color: $selected_fg_color;
968
969
&:backdrop {
970
color: $secondary_selected_fg_color;
971
}
972
973
.title {
974
padding-left: 12px;
975
padding-right: 12px;
976
font-weight: bold;
977
}
978
979
.subtitle {
980
padding-left: 12px;
981
padding-right: 12px;
982
font-size: smaller;
983
984
@extend .dim-label;
985
}
986
987
button:not(.suggested-action):not(.destructive-action) {
988
@extend %button_basic.flat;
989
990
border-image: radial-gradient(circle closest-corner at center calc(100% - 1px),
991
currentColor 0%,
992
transparent 0%)
993
0 0 0 / 0 0 0px;
994
color: gtkalpha(currentColor, $enabled_opacity);
995
996
&:hover, &:active { color: currentColor; }
997
998
&:disabled {
999
color: gtkalpha(currentColor, $enabled_opacity * $disabled_opacity);
1000
1001
> label { color: inherit; }
1002
}
1003
1004
&:checked {
1005
border-image: radial-gradient(circle closest-corner at center calc(100% - 1px),
1006
currentColor 100%,
1007
transparent 0%)
1008
0 0 2 / 0 0 2px;
1009
background-color: transparent;
1010
color: currentColor;
1011
1012
&:disabled {
1013
background-color: transparent;
1014
color: gtkalpha(currentColor, $disabled_opacity);
1015
1016
> label { color: inherit; }
1017
}
1018
}
1019
}
1020
1021
button.suggested-action, button.destructive-action {
1022
&:disabled {
1023
color: gtkalpha(currentColor, $disabled_opacity);
1024
1025
> label { color: inherit; }
1026
}
1027
}
1028
1029
&.selection-mode {
1030
transition: background-color 0 $material_slower, color $material_faster $material_ease_out;
1031
animation: header_ripple_effect $material_slower $material_ease_out;
1032
// box-shadow: $z-depth-1, inset 0 1px $secondary_highlight_color;
1033
background-color: $selected_bg_color;
1034
color: $selected_fg_color;
1035
1036
&:backdrop {
1037
color: $secondary_selected_fg_color;
1038
}
1039
1040
.subtitle:link { @extend *:link:selected; }
1041
1042
button:not(.suggested-action):not(.destructive-action) {
1043
border-image: radial-gradient(circle closest-corner at center calc(100% - 1px),
1044
currentColor 0%,
1045
transparent 0%)
1046
0 0 0 / 0 0 0px;
1047
// color: gtkalpha(currentColor, $enabled_opacity);
1048
1049
&, &:hover, &:active { color: currentColor; }
1050
1051
&:disabled {
1052
color: gtkalpha(currentColor, $disabled_opacity);
1053
1054
> label { color: inherit; }
1055
}
1056
1057
&:checked {
1058
border-image: radial-gradient(circle closest-corner at center calc(100% - 1px),
1059
currentColor 100%,
1060
transparent 0%)
1061
0 0 2 / 0 0 2px;
1062
color: currentColor;
1063
1064
&:disabled {
1065
color: gtkalpha(currentColor, $disabled_opacity);
1066
1067
> label { color: inherit; }
1068
}
1069
}
1070
}
1071
1072
.selection-menu {
1073
padding-left: 16px;
1074
padding-right: 16px;
1075
1076
GtkArrow { -GtkArrow-arrow-scaling: 1; }
1077
1078
.arrow { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
1079
}
1080
}
1081
1082
.fullscreen &,
1083
.tiled &,
1084
.maximized & {
1085
border-radius: 0; // squared corners when the window is max'd or tiled
1086
box-shadow: $z-depth-1;
1087
}
1088
1089
&.default-decoration {
1090
min-height: $small_size;
1091
padding: $container_padding;
1092
border-width: 0;
1093
1094
button.titlebutton {
1095
min-height: $small_size;
1096
min-width: $small_size;
1097
margin: 0;
1098
padding: 0;
1099
1100
&:active { // add fallback
1101
background-image: radial-gradient(circle farthest-corner at center,
1102
gtkalpha(currentColor, $lower_opacity / 2) 100%,
1103
transparent 0%),
1104
image(gtkalpha(currentColor, $lower_opacity / 2));
1105
}
1106
}
1107
}
1108
1109
.solid-csd & {
1110
&:dir(rtl), &:dir(ltr) { // specificity bump
1111
margin-left: -1px;
1112
margin-right: -1px;
1113
margin-top: -1px;
1114
border-radius: 0;
1115
box-shadow: none;
1116
}
1117
}
1118
}
1119
1120
headerbar {
1121
// add vertical margins to headerbar entries, buttons and separators to avoid them spanning the whole height
1122
entry,
1123
spinbutton,
1124
// separator,
1125
button {
1126
margin-top: $container_padding;
1127
margin-bottom: $container_padding;
1128
}
1129
}
1130
1131
.titlebar {
1132
border-top-left-radius: 2px;
1133
border-top-right-radius: 2px;
1134
}
1135
1136
headerbar {
1137
separator:first-child + &, // tackles the paned container case
1138
&:first-child {
1139
border-top-left-radius: 2px;
1140
1141
.tiled &,
1142
.maximized & { border-radius: 0; }
1143
}
1144
1145
&:last-child {
1146
border-top-right-radius: 2px;
1147
1148
.tiled &,
1149
.maximized & { border-radius: 0; }
1150
}
1151
}
1152
1153
.titlebar:not(headerbar) {
1154
window.csd > & {
1155
// in csd we assume every titlebar is a headerbar so reset anything, this is needed for split toolbars cases
1156
padding: 0;
1157
background-color: transparent;
1158
background-image: none;
1159
border-style: none;
1160
box-shadow: none;
1161
}
1162
1163
> separator {
1164
background-color: $headerbar_color;
1165
background-image: image($borders_color);
1166
}
1167
1168
@extend %titlebar;
1169
}
1170
1171
1172
/************
1173
* Pathbars *
1174
************/
1175
.path-bar button {
1176
&.text-button, &.image-button, & {
1177
padding-left: 6px;
1178
padding-right: 6px;
1179
}
1180
1181
&.text-button.image-button, & {
1182
// label:last-child { padding-left: 2px; padding-right: 8px; }
1183
// label:first-child { padding-left: 8px; padding-right: 2px; }
1184
}
1185
1186
image {
1187
padding-left: 4px;
1188
padding-right: 4px;
1189
}
1190
1191
&.slider-button {
1192
padding-left: 0;
1193
padding-right: 0;
1194
}
1195
}
1196
1197
1198
/**************
1199
* Tree Views *
1200
**************/
1201
treeview.view {
1202
-GtkTreeView-grid-line-width: 1;
1203
-GtkTreeView-grid-line-pattern: '';
1204
-GtkTreeView-tree-line-width: 1;
1205
-GtkTreeView-tree-line-pattern: '';
1206
-GtkTreeView-expander-size: 16;
1207
1208
border-left-color: $track_color; // this is actually the tree lines color,
1209
border-top-color: $borders_color; // while this is the grid lines color, better then nothing
1210
1211
rubberband { @extend rubberband; } // to avoid borders being overridden by the previously set props
1212
1213
&:hover, &:active, &:selected { border-radius: 0; }
1214
1215
&.separator {
1216
min-height: 1px + 2px * 2;
1217
color: $borders_color;
1218
}
1219
1220
&:drop(active) {
1221
border-style: solid none;
1222
border-width: 1px;
1223
border-color: $accent_bg_color;
1224
1225
&.after { border-top-style: none; }
1226
1227
&.before { border-bottom-style: none; }
1228
}
1229
1230
&.expander {
1231
-gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
1232
-gtk-icon-transform: rotate(-90deg);
1233
1234
&:dir(rtl) { -gtk-icon-transform: rotate(90deg); }
1235
1236
&:checked { -gtk-icon-transform: unset; }
1237
1238
color: $secondary_fg_color;
1239
1240
&:hover, &:active { color: $fg_color; }
1241
1242
&:disabled { color: $insensitive_secondary_fg_color; }
1243
1244
&:selected {
1245
color: $secondary_selected_fg_color;
1246
1247
&:hover, &:active { color: $selected_fg_color; }
1248
1249
&:disabled { color: $insensitive_secondary_selected_fg_color; }
1250
}
1251
}
1252
1253
&.progressbar { // progress bar in treeviews
1254
border-style: none none solid;
1255
border-width: $bar_size;
1256
border-color: $selected_bg_color;
1257
background-color: transparent;
1258
background-image: none;
1259
1260
&:selected { border-color: currentColor; }
1261
}
1262
1263
&.trough { // progress bar trough in treeviews
1264
border-style: none none solid;
1265
border-width: $bar_size;
1266
border-color: scale-alpha($selected_bg_color, $lower_opacity);
1267
background-color: transparent;
1268
background-image: none;
1269
1270
&:selected { border-color: $track_color; }
1271
}
1272
1273
header {
1274
button {
1275
@extend row.activatable;
1276
1277
padding: 2px 6px;
1278
border-style: none solid solid none;
1279
border-width: 1px;
1280
border-color: $borders_color;
1281
border-radius: 0;
1282
background-clip: border-box;
1283
1284
&, &:hover, &:active { box-shadow: none; }
1285
1286
&, &:disabled { background-color: $base_color; }
1287
1288
&:last-child { border-right-style: none; }
1289
}
1290
}
1291
1292
button.dnd,
1293
header.button.dnd { // for treeview-like derive widgets
1294
padding: 2px 6px;
1295
border-style: none solid solid;
1296
border-width: 1px;
1297
border-color: $borders_color;
1298
border-radius: 0;
1299
box-shadow: none;
1300
background-color: $base_color;
1301
background-clip: border-box;
1302
color: $selected_bg_color;
1303
}
1304
}
1305
1306
1307
/*********
1308
* Menus *
1309
*********/
1310
menubar,
1311
.menubar {
1312
-GtkWidget-window-dragging: true;
1313
padding: 0;
1314
// box-shadow: inset 0 -1px $borders_color;
1315
background-color: $headerbar_color;
1316
1317
> menuitem {
1318
transition: background-color $material_faster $material_ease_out;
1319
min-height: 20px;
1320
padding: 4px 8px;
1321
color: $secondary_selected_fg_color;
1322
1323
&:hover { //Seems like it :hover even with keyboard focus
1324
transition: none;
1325
background-color: gtkalpha(currentColor, $lower_opacity / 2);
1326
color: $selected_fg_color;
1327
}
1328
1329
&:disabled { color: $insensitive_secondary_selected_fg_color; }
1330
}
1331
}
1332
1333
menu,
1334
.menu {
1335
margin: 4px 0;
1336
padding: 4px 0;
1337
background-color: $base_color;
1338
border: 1px solid $borders_color; // adds borders in a non composited env
1339
1340
.csd & {
1341
border: none; // axes borders in a composited env
1342
border-radius: 2px;
1343
}
1344
1345
menuitem {
1346
transition: background-color $material_faster $material_ease_out;
1347
min-height: 20px;
1348
min-width: 40px;
1349
padding: 4px 8px;
1350
font: initial;
1351
text-shadow: none;
1352
1353
&:hover {
1354
transition: none;
1355
background-color: gtkalpha(currentColor, $lower_opacity / 2);
1356
}
1357
1358
&:disabled { color: $insensitive_fg_color; }
1359
1360
// submenu indicators
1361
arrow {
1362
min-height: 16px;
1363
min-width: 16px;
1364
1365
&:dir(ltr) {
1366
-gtk-icon-source: -gtk-icontheme('pan-end-symbolic');
1367
margin-left: 8px;
1368
}
1369
1370
&:dir(rtl) {
1371
-gtk-icon-source:-gtk-icontheme('pan-end-symbolic-rtl');
1372
margin-right: 8px;
1373
}
1374
}
1375
}
1376
1377
// overflow arrows
1378
> arrow {
1379
min-height: 16px;
1380
min-width: 16px;
1381
padding: 4px;
1382
border-radius: 0;
1383
background-color: $base_color;
1384
color: $secondary_fg_color;
1385
1386
&.top {
1387
margin-top: -4px;
1388
border-bottom: 1px solid $borders_color;
1389
-gtk-icon-source: -gtk-icontheme('pan-up-symbolic');
1390
}
1391
1392
&.bottom {
1393
margin-bottom: -4px;
1394
border-top: 1px solid $borders_color;
1395
-gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
1396
}
1397
1398
&:hover {
1399
background-image: image(gtkalpha(currentColor, $lower_opacity / 2));
1400
color: $fg_color;
1401
}
1402
1403
&:disabled {
1404
border-color: transparent;
1405
background-color: transparent;
1406
color: transparent;
1407
// color: $insensitive_secondary_fg_color;
1408
}
1409
}
1410
1411
separator { margin: 4px 0; }
1412
}
1413
1414
menuitem {
1415
accelerator { color: gtkalpha(currentColor, $hint_opacity); }
1416
1417
check,
1418
radio {
1419
&:dir(ltr) { margin-right: -8px; margin-left: -16px; }
1420
&:dir(rtl) { margin-right: -16px; margin-left: -8px; }
1421
}
1422
}
1423
1424
.csd.popup { border-radius: 2px; }
1425
1426
1427
/***************
1428
* Popovers *
1429
***************/
1430
popover.background {
1431
transition: $shadow_transition;
1432
padding: 0;
1433
box-shadow: $z-depth-2;
1434
background-color: $light_color;
1435
1436
&:backdrop { box-shadow: $z-depth-1; }
1437
1438
&, .csd & {
1439
border-style: solid;
1440
border-width: 1px;
1441
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.3);
1442
border-radius: 2px + 1px;
1443
}
1444
1445
> list,
1446
> .view,
1447
> toolbar {
1448
border-style: none;
1449
box-shadow: none;
1450
background-color: transparent;
1451
}
1452
1453
&, .csd & {
1454
&.touch-selection,
1455
&.magnifier,
1456
&.osd { @extend %osd; }
1457
}
1458
1459
separator { margin: 4px 0; }
1460
1461
list separator { margin: 0; }
1462
}
1463
1464
/*************
1465
* Notebooks *
1466
*************/
1467
notebook {
1468
> header {
1469
border-width: 1px;
1470
border-color: $borders_color;
1471
background-color: $bg_color;
1472
background-clip: border-box;
1473
1474
&.top {
1475
border-bottom-style: solid;
1476
> tabs {
1477
margin-bottom: -1px;
1478
> tab {
1479
1480
&:hover { box-shadow: inset 0 -2px $track_color; }
1481
1482
&:checked { box-shadow: inset 0 -2px $selected_bg_color; }
1483
}
1484
}
1485
}
1486
1487
&.bottom {
1488
border-top-style: solid;
1489
> tabs {
1490
margin-top: -1px;
1491
> tab {
1492
1493
&:hover { box-shadow: inset 0 2px $track_color; }
1494
1495
&:checked { box-shadow: inset 0 2px $selected_bg_color; }
1496
}
1497
}
1498
}
1499
1500
&.left {
1501
border-right-style: solid;
1502
> tabs {
1503
margin-right: -1px;
1504
> tab {
1505
1506
&:hover { box-shadow: inset -2px 0 $track_color; }
1507
1508
&:checked { box-shadow: inset -2px 0 $selected_bg_color; }
1509
}
1510
}
1511
}
1512
1513
&.right {
1514
border-left-style: solid;
1515
> tabs {
1516
margin-left: -1px;
1517
> tab {
1518
1519
&:hover { box-shadow: inset 2px 0 $track_color; }
1520
1521
&:checked { box-shadow: inset 2px 0 $selected_bg_color; }
1522
}
1523
}
1524
}
1525
1526
&.top > tabs > arrow {
1527
@extend %notebook_vert_arrows;
1528
1529
border-top-style: none;
1530
}
1531
1532
&.bottom > tabs > arrow {
1533
@extend %notebook_vert_arrows;
1534
1535
border-bottom-style: none;
1536
}
1537
1538
@at-root %notebook_vert_arrows {
1539
padding-left: 4px;
1540
padding-right: 4px;
1541
1542
&.down {
1543
margin-left: -8px;
1544
-gtk-icon-source: -gtk-icontheme('pan-start-symbolic');
1545
}
1546
1547
&.up {
1548
margin-right: -8px;
1549
-gtk-icon-source: -gtk-icontheme('pan-end-symbolic');
1550
}
1551
}
1552
1553
&.left > tabs > arrow {
1554
@extend %notebook_horz_arrows;
1555
1556
border-left-style: none;
1557
}
1558
1559
&.right > tabs > arrow {
1560
@extend %notebook_horz_arrows;
1561
1562
border-right-style: none;
1563
}
1564
1565
@at-root %notebook_horz_arrows {
1566
padding-top: 4px;
1567
padding-bottom: 4px;
1568
1569
&.down {
1570
margin-top: -8px;
1571
-gtk-icon-source: -gtk-icontheme('pan-up-symbolic');
1572
}
1573
1574
&.up {
1575
margin-bottom: -8px;
1576
-gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
1577
}
1578
}
1579
1580
> tabs > arrow {
1581
@extend %button_basic.flat;
1582
1583
min-height: 16px;
1584
min-width: 16px;
1585
border-radius: 0;
1586
}
1587
1588
tab {
1589
transition: $material_transition;
1590
min-height: 24px;
1591
min-width: 24px;
1592
padding: 6px 12px;
1593
1594
outline-offset: -6px;
1595
1596
border-width: 1px; // for reorderable tabs
1597
border-color: transparent; //
1598
1599
color: $secondary_fg_color;
1600
font-weight: 500;
1601
1602
&:hover {
1603
color: $fg_color;
1604
1605
&.reorderable-page {
1606
border-color: $borders_color;
1607
background-color: $secondary_base_color;
1608
}
1609
}
1610
1611
&:disabled { color: $insensitive_secondary_fg_color; }
1612
1613
&:checked {
1614
animation: tab_ripple_effect $material_slower * 3 $material_ease_out;
1615
color: $fg_color;
1616
1617
&:disabled { color: $insensitive_fg_color; }
1618
1619
&.reorderable-page {
1620
border-color: $borders_color;
1621
background-color: $base_color;
1622
}
1623
}
1624
1625
// colors the button like the label, overridden otherwise
1626
button.flat {
1627
// FIXME: generalize .small-button?
1628
min-width: $small_size;
1629
min-height: $small_size;
1630
padding: 0;
1631
1632
@extend %button_basic.image-button;
1633
1634
&:last-child {
1635
margin-left: 6px;
1636
margin-right: -6px;
1637
}
1638
1639
&:first-child {
1640
margin-left: -6px;
1641
margin-right: 6px;
1642
}
1643
}
1644
}
1645
1646
&.top,
1647
&.bottom {
1648
tabs {
1649
padding-left: 8px;
1650
padding-right: 8px;
1651
1652
&:not(:only-child) {
1653
&:first-child { margin-left: 0; }
1654
&:last-child { margin-right: 0; }
1655
}
1656
1657
tab {
1658
&.reorderable-page {
1659
margin: 0 -1px;
1660
border-style: none solid;
1661
}
1662
}
1663
}
1664
}
1665
1666
&.left,
1667
&.right {
1668
tabs {
1669
padding-top: 8px;
1670
padding-bottom: 8px;
1671
1672
&:not(:only-child) {
1673
&:first-child { margin-top: 0; }
1674
&:last-child { margin-bottom: 0; }
1675
}
1676
1677
tab {
1678
&.reorderable-page {
1679
margin: -1px 0;
1680
border-style: solid none;
1681
}
1682
}
1683
}
1684
}
1685
}
1686
1687
> stack:not(:only-child) { // the :not(:only-child) is for "hidden" notebooks
1688
background-color: $base_color;
1689
1690
entry,
1691
spinbutton:not(.vertical) { @extend %entry.flat; }
1692
1693
revealer entry,
1694
revealer spinbutton:not(.vertical) { @extend %entry; }
1695
1696
spinbutton:not(.vertical) entry { @extend %spinbutton_entry; }
1697
}
1698
}
1699
1700
1701
/**************
1702
* Scrollbars *
1703
**************/
1704
scrollbar {
1705
$_slider_min_length: 24px;
1706
1707
// disable steppers
1708
@at-root * {
1709
-GtkScrollbar-has-backward-stepper: false;
1710
-GtkScrollbar-has-forward-stepper: false;
1711
}
1712
1713
transition: $material_transition;
1714
background-color: $base_color;
1715
background-clip: $extra_background_clip;
1716
1717
// scrollbar border
1718
&.top { border-bottom: 1px solid $borders_color; }
1719
&.bottom { border-top: 1px solid $borders_color; }
1720
&.left { border-right: 1px solid $borders_color; }
1721
&.right { border-left: 1px solid $borders_color; }
1722
1723
// slider
1724
slider {
1725
transition: all $material_faster $material_ease_out, margin 0, border-width 0;
1726
min-width: 8px;
1727
min-height: 8px;
1728
border: 4px solid transparent;
1729
border-radius: 100px;
1730
background-clip: padding-box;
1731
background-color: $tertiary_fg_color;
1732
1733
&:hover { background-color: $secondary_fg_color; }
1734
1735
&:active { background-color: $fg_color; }
1736
1737
&:disabled { background-color: $insensitive_tertiary_fg_color; }
1738
}
1739
1740
&.fine-tune {
1741
slider {
1742
transition: all $material_faster $material_ease_out, margin 0, border-width 0, min-width 0, min-height 0;
1743
min-width: 4px;
1744
min-height: 4px;
1745
}
1746
1747
&.horizontal slider { margin: 2px 0; }
1748
1749
&.vertical slider { margin: 0 2px; }
1750
}
1751
1752
&.overlay-indicator {
1753
&:not(.dragging):not(.hovering) {
1754
border-color: transparent;
1755
background-color: transparent;
1756
1757
slider {
1758
min-width: 4px;
1759
min-height: 4px;
1760
margin: 2px;
1761
border: 2px solid scale-alpha($base_color, $lower_opacity);
1762
}
1763
1764
button {
1765
min-width: 4px;
1766
min-height: 4px;
1767
margin: 2px;
1768
border: 2px solid scale-alpha($base_color, $lower_opacity);
1769
border-radius: 100px;
1770
background-color: $tertiary_fg_color;
1771
background-clip: padding-box;
1772
-gtk-icon-source: none;
1773
1774
&:disabled { background-color: $insensitive_tertiary_fg_color; }
1775
}
1776
1777
&.horizontal {
1778
slider { min-width: $_slider_min_length; }
1779
1780
button { min-width: 8px; }
1781
}
1782
1783
&.vertical {
1784
slider { min-height: $_slider_min_length; }
1785
1786
button { min-height: 8px; }
1787
}
1788
}
1789
1790
&.dragging,
1791
&.hovering { background-color: scale-alpha($base_color, $higher_opacity); }
1792
}
1793
1794
&.horizontal slider { min-width: $_slider_min_length; }
1795
1796
&.vertical slider { min-height: $_slider_min_length; }
1797
1798
// button styling
1799
button {
1800
@extend %button_basic.flat;
1801
min-width: 16px;
1802
min-height: 16px;
1803
padding: 0;
1804
border-radius: 0;
1805
}
1806
1807
// button icons
1808
&.vertical {
1809
button {
1810
&.down { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
1811
1812
&.up { -gtk-icon-source: -gtk-icontheme('pan-up-symbolic'); }
1813
}
1814
}
1815
1816
&.horizontal {
1817
button {
1818
&.down { -gtk-icon-source: -gtk-icontheme('pan-right-symbolic'); }
1819
1820
&.up { -gtk-icon-source: -gtk-icontheme('pan-left-symbolic'); }
1821
}
1822
}
1823
}
1824
1825
1826
/**********
1827
* Switch *
1828
**********/
1829
switch {
1830
transition: $material_transition;
1831
margin: $container_padding 0;
1832
border: 4px solid transparent;
1833
border-radius: 100px;
1834
background-color: $track_color;
1835
background-clip: padding-box;
1836
font-size: 0;
1837
1838
&:disabled { color: $insensitive_fg_color; }
1839
1840
&:checked {
1841
background-color: scale-alpha($accent_bg_color, 0.5);
1842
1843
&:disabled {
1844
background-color: scale-alpha($accent_bg_color, 0.5 * $disabled_opacity);
1845
color: $insensitive_fg_color;
1846
}
1847
}
1848
1849
slider {
1850
@include entry(normal);
1851
1852
transition: $material_transition, margin 0;
1853
min-width: $small_size;
1854
min-height: $small_size;
1855
margin: -4px 0 -4px -4px;
1856
-gtk-outline-radius: 100px;
1857
border-radius: 100px;
1858
}
1859
1860
&:hover slider { @include entry(focus); }
1861
1862
&:disabled slider { @include entry(insensitive); }
1863
1864
&:checked slider {
1865
transition: $material_transition, margin 0, background-image 0, background-color 0 $material_slower;
1866
animation: needs_attention $material_slower $material_ease_out;
1867
margin: -4px -4px -4px 0;
1868
background-color: $accent_bg_color;
1869
color: $selected_fg_color;
1870
}
1871
1872
&:checked:disabled slider { animation: none; }
1873
1874
row:selected & {
1875
}
1876
}
1877
1878
1879
/*************************
1880
* Check and Radio items *
1881
*************************/
1882
// draw regular check and radio items using our PNG assets
1883
// all assets are rendered from assets.svg. never add pngs directly
1884
1885
//selection-mode
1886
@each $s,$as in ('','-selectionmode'),
1887
(':hover', '-hover-selectionmode'),
1888
(':checked', '-checked-selectionmode'),
1889
(':checked:hover', '-checked-hover-selectionmode') {
1890
.view.content-view.check#{$s}:not(list) {
1891
-gtk-icon-shadow: $z-depth-1;
1892
-gtk-icon-source: -gtk-scaled(url("assets/checkbox#{$as}#{$asset_suffix}.png"),
1893
url("assets/checkbox#{$as}#{$asset_suffix}@2.png"));
1894
margin: 8px;
1895
background-color: transparent;
1896
}
1897
}
1898
1899
checkbutton.text-button,
1900
radiobutton.text-button {
1901
// this is for a nice focus on check and radios text
1902
padding: 2px;
1903
outline-offset: 0;
1904
1905
label:not(:only-child) { margin: 0 4px; }
1906
}
1907
1908
check,
1909
radio {
1910
min-height: 24px;
1911
min-width: 24px;
1912
margin: -12px;
1913
padding: 12px;
1914
1915
@extend %button_basic.flat;
1916
1917
@extend %button_basic.image-button;
1918
1919
&:checked, &:checked:disabled { background-color: transparent; }
1920
1921
&:checked, &:indeterminate { color: $accent_bg_color; }
1922
1923
&:checked:disabled, &:indeterminate:disabled { color: scale-alpha($accent_bg_color, $disabled_opacity); }
1924
1925
// &:only-child { margin: -12px; }
1926
1927
row &:not(:checked):not(:indeterminate) {
1928
color: gtkalpha(currentColor, $enabled_opacity);
1929
1930
&:hover, &:active { color: currentColor; }
1931
}
1932
1933
menu menuitem & {
1934
transition: none;
1935
margin: -16px; // this is a workaround for a menu check/radio size allocation issue
1936
1937
&:not(:checked):not(:indeterminate) { color: gtkalpha(currentColor, $hint_opacity); }
1938
1939
&, &:hover, &:disabled {
1940
background-image: none;
1941
// color: inherit;
1942
// animation: none;
1943
}
1944
}
1945
}
1946
1947
%check,
1948
check {
1949
& { -gtk-icon-source: image(-gtk-recolor(url("assets/check-unchecked-symbolic.svg")),
1950
-gtk-recolor(url("assets/check-unchecked-symbolic.png"))); }
1951
1952
&:checked { -gtk-icon-source: image(-gtk-recolor(url("assets/check-checked-symbolic.svg")),
1953
-gtk-recolor(url("assets/check-checked-symbolic.png"))); }
1954
1955
&:indeterminate { -gtk-icon-source: image(-gtk-recolor(url("assets/check-dash-symbolic.svg")),
1956
-gtk-recolor(url("assets/check-dash-symbolic.png"))); }
1957
}
1958
1959
%radio,
1960
radio {
1961
& { -gtk-icon-source: image(-gtk-recolor(url("assets/radio-unchecked-symbolic.svg")),
1962
-gtk-recolor(url("assets/radio-unchecked-symbolic.png"))); }
1963
1964
// &:checked { -gtk-icon-source: image(-gtk-recolor(url("assets/radio-checked-symbolic.svg")),
1965
// -gtk-recolor(url("assets/radio-checked-symbolic.png"))); }
1966
1967
&:indeterminate { -gtk-icon-source: image(-gtk-recolor(url("assets/radio-dash-symbolic.svg")),
1968
-gtk-recolor(url("assets/radio-dash-symbolic.png"))); }
1969
1970
border-image: -gtk-gradient(radial,
1971
center center, 0,
1972
center center, 0.001,
1973
to($accent_bg_color),
1974
to(transparent))
1975
24 / 24px;
1976
1977
&:checked {
1978
border-image: -gtk-gradient(radial,
1979
center center, 0,
1980
center center, (10 / 48 / 2),
1981
to($accent_bg_color),
1982
to(transparent))
1983
24 / 24px;
1984
}
1985
1986
&:checked:disabled {
1987
border-image: -gtk-gradient(radial,
1988
center center, 0,
1989
center center, (10 / 48 / 2),
1990
to(scale-alpha($accent_bg_color, $disabled_opacity)),
1991
to(transparent))
1992
24 / 24px;
1993
}
1994
1995
&:indeterminate:checked {
1996
border-image: -gtk-gradient(radial,
1997
center center, 0,
1998
center center, 0.001,
1999
to($accent_bg_color),
2000
to(transparent))
2001
24 / 24px;
2002
}
2003
}
2004
2005
// let's animate things
2006
@keyframes check_check {
2007
from { -gtk-icon-transform: rotate(90deg); }
2008
to { -gtk-icon-transform: unset; }
2009
}
2010
2011
@keyframes check_radio { // FIXME: cannot animate border-image
2012
from {
2013
border-image: -gtk-gradient(radial,
2014
center center, 0,
2015
center center, 0.001,
2016
to($accent_bg_color),
2017
to(transparent))
2018
24 / 24px;
2019
}
2020
2021
to {
2022
border-image: -gtk-gradient(radial,
2023
center center, 0,
2024
center center, (10 / 48 / 2),
2025
to($accent_bg_color),
2026
to(transparent))
2027
24 / 24px;
2028
}
2029
}
2030
2031
@keyframes check_indeterminate {
2032
from { -gtk-icon-transform: unset; }
2033
50% { -gtk-icon-transform: scale(0, 1); }
2034
to { -gtk-icon-transform: unset; }
2035
}
2036
2037
%check_checked,
2038
check:not(:indeterminate):checked { animation: check_check $material_slower $material_ease; }
2039
2040
check:not(:indeterminate):checked:active { animation: check_check $material_slower $material_ease, flat_ripple_effect $material_slower $material_ease_out forwards; }
2041
2042
// %radio_checked,
2043
// radio:not(:indeterminate):checked { animation: check_radio $material_slower $material_ease; }
2044
2045
// radio:not(:indeterminate):checked:active { animation: check_radio $material_slower $material_ease, flat_ripple_effect $material_slower $material_ease_out forwards; }
2046
2047
%indeterminate_checked,
2048
check:indeterminate:checked, radio:indeterminate:checked { animation: check_indeterminate $material_slower $material_ease; }
2049
2050
check:indeterminate:checked:active, radio:indeterminate:checked:active { animation: check_indeterminate $material_slower $material_ease, flat_ripple_effect $material_slower $material_ease_out forwards; }
2051
2052
// no animations in menus
2053
menu menuitem {
2054
check:not(:indeterminate):checked,
2055
radio:not(:indeterminate):checked,
2056
check:indeterminate:checked,
2057
radio:indeterminate:checked { animation: none; }
2058
}
2059
2060
treeview.view check,
2061
treeview.view radio {
2062
padding: 0;
2063
2064
&:checked:hover, &:selected:checked:hover { background-image: none; }
2065
2066
& {
2067
color: $secondary_fg_color;
2068
2069
&:hover, &:active { color: $fg_color; }
2070
2071
&:disabled { color: $insensitive_secondary_fg_color; }
2072
2073
&:checked, &:indeterminate { color: $accent_bg_color; }
2074
2075
&:checked:disabled, &:indeterminate:disabled { color: scale-alpha($accent_bg_color, $disabled_opacity); }
2076
}
2077
2078
&:selected {
2079
color: $secondary_selected_fg_color;
2080
2081
&:hover, &:active { color: $selected_fg_color; }
2082
2083
&:disabled { color: $insensitive_secondary_selected_fg_color; }
2084
2085
&:checked, &:indeterminate { color: $accent_bg_color; }
2086
2087
&:checked:disabled, &:indeterminate:disabled { color: scale-alpha($accent_bg_color, $disabled_opacity); }
2088
}
2089
}
2090
2091
treeview.view radio:checked {
2092
-gtk-icon-source: image(-gtk-recolor(url("assets/radio-checked-symbolic.svg")),
2093
-gtk-recolor(url("assets/radio-checked-symbolic.png")));
2094
border-image: none;
2095
}
2096
2097
2098
/************
2099
* GtkScale *
2100
************/
2101
scale {
2102
// sizing
2103
2104
$_marks_lenght: 8px;
2105
$_marks_distance: 8px;
2106
2107
min-height: 12px;
2108
min-width: 12px;
2109
padding: 12px;
2110
2111
* { transition: $material_transition; }
2112
2113
// the slider is inside the trough, so to have make it bigger there's a negative margin
2114
slider {
2115
min-height: $small_size;
2116
min-width: $small_size;
2117
margin: -10px;
2118
}
2119
2120
// the backing bit
2121
trough {
2122
outline-offset: 2px;
2123
background-color: $track_color;
2124
2125
&:disabled { color: $insensitive_fg_color; }
2126
}
2127
2128
// the colored part of the backing bit
2129
highlight {
2130
background-color: $accent_bg_color;
2131
2132
&:disabled { background-color: transparent; }
2133
}
2134
2135
// this is another differently styled part of the backing bit, the most relevant use case is for example
2136
// in media player to indicate how much video stream as been cached
2137
fill {
2138
background-color: $track_color;
2139
2140
&:disabled { background-color: transparent; }
2141
}
2142
2143
slider {
2144
transition: all $material_faster $material_ease;
2145
// border-radius: 100%;
2146
// background-color: $accent_bg_color;
2147
background-repeat: no-repeat;
2148
background-position: center;
2149
2150
@each $s,$as in ('',''),
2151
(':disabled','-insensitive') {
2152
&#{$s} {
2153
$_url: 'assets/slider#{$as}#{$asset_suffix}';
2154
background-image: -gtk-scaled(url('#{$_url}.png'),
2155
url('#{$_url}@2.png'));
2156
}
2157
}
2158
2159
background-size: calc(100% - 8px);
2160
2161
&:hover { background-size: calc(100% - 4px); }
2162
2163
&:active { background-size: calc(100% - 0px); }
2164
}
2165
2166
// click-and-hold the slider to activate
2167
&.fine-tune {
2168
// to make the slider shrink in fine-tune mode
2169
slider { background-size: calc(100% - 12px); }
2170
}
2171
2172
value { color: gtkalpha(currentColor, $hint_opacity); }
2173
2174
marks {
2175
color: $track_color;
2176
2177
@each $marks_class, $marks_pos, $marks_margin in (top, top, bottom),
2178
(bottom, bottom, top),
2179
(top, left, right),
2180
(bottom, right, left) {
2181
&.#{$marks_class} {
2182
margin-#{$marks_margin}: $_marks_distance;
2183
margin-#{$marks_pos}: -($_marks_distance + $_marks_lenght);
2184
}
2185
}
2186
}
2187
2188
&.horizontal {
2189
indicator {
2190
min-height: $_marks_lenght;
2191
min-width: 1px;
2192
}
2193
}
2194
2195
&.vertical {
2196
indicator {
2197
min-height: 1px;
2198
min-width: $_marks_lenght;
2199
}
2200
}
2201
2202
// *WARNING* scale with marks madness following
2203
2204
// FIXME: OSD and selected list rows missing, I don't feel like adding the other 144 assets needed for those...
2205
$suffix: if($variant == 'light', '', '-dark');
2206
2207
@each $dir_class, $dir_infix in ('horizontal', 'horz'),
2208
('vertical', 'vert') {
2209
@each $marks_infix, $nth_child in ('scale-has-marks-above', ':last-child:not(:only-child)'),
2210
('scale-has-marks-below', ':first-child:not(:only-child)') {
2211
@each $state, $state_infix in ('', ''),
2212
(':disabled', '-insensitive') {
2213
&.#{$dir_class} {
2214
%#{$marks_infix}-#{$dir_infix},
2215
contents#{$nth_child} > trough > slider {
2216
&#{$state} {
2217
$_scale_asset: 'assets/slider-#{$dir_infix}-#{$marks_infix}#{$state_infix}#{$suffix}';
2218
2219
background-image: -gtk-scaled(url('#{$_scale_asset}.png'), url('#{$_scale_asset}@2.png'));
2220
}
2221
2222
@if $dir_class == 'horizontal' {
2223
min-height: 30px;
2224
min-width: $small_size;
2225
2226
@if $marks_infix == 'scale-has-marks-above' {
2227
margin-top: -16px;
2228
2229
background-position: center calc(100% - 4px);
2230
2231
&:hover { background-position: center calc(100% - 2px); }
2232
2233
&:active { background-position: center calc(100% - 0px); }
2234
}
2235
2236
@if $marks_infix == 'scale-has-marks-below' {
2237
margin-bottom: -16px;
2238
2239
background-position: center calc(4px);
2240
2241
&:hover { background-position: center calc(2px); }
2242
2243
&:active { background-position: center calc(0px); }
2244
}
2245
}
2246
2247
@if $dir_class == 'vertical' {
2248
min-height: $small_size;
2249
min-width: 30px;
2250
2251
@if $marks_infix == 'scale-has-marks-above' {
2252
margin-left: -16px;
2253
2254
background-position: calc(4px) center;
2255
2256
&:hover { background-position: calc(2px) center; }
2257
2258
&:active { background-position: calc(0px) center; }
2259
}
2260
2261
@if $marks_infix == 'scale-has-marks-below' {
2262
margin-right: -16px;
2263
2264
background-position: calc(100% - 4px) center;
2265
2266
&:hover { background-position: calc(100% - 2px) center; }
2267
2268
&:active { background-position: calc(100% - 0px) center; }
2269
}
2270
}
2271
}
2272
2273
@at-root %#{$marks_infix}-#{$dir_infix}-fine-tune,
2274
&.fine-tune contents#{$nth_child} > trough > slider {
2275
// bigger negative margins to make the trough grow here as well
2276
2277
@if $dir_class == 'horizontal' {
2278
@if $marks_infix == 'scale-has-marks-above' { background-position: center calc(100% - 6px); }
2279
2280
@if $marks_infix == 'scale-has-marks-below' { background-position: center calc(6px); }
2281
}
2282
2283
@if $dir_class == 'vertical' {
2284
@if $marks_infix == 'scale-has-marks-above' { background-position: calc(6px) center; }
2285
2286
@if $marks_infix == 'scale-has-marks-below' { background-position: calc(100% - 6px) center; }
2287
}
2288
}
2289
}
2290
}
2291
}
2292
}
2293
2294
&.color {
2295
min-height: 0;
2296
min-width: 0;
2297
2298
&.horizontal {
2299
padding: 0 0 12px 0;
2300
2301
trough {
2302
padding-bottom: $bar_size;
2303
}
2304
2305
slider {
2306
@extend %scale-has-marks-above-horz;
2307
2308
margin-bottom: -10px - $bar_size;
2309
margin-top: 0;
2310
}
2311
}
2312
2313
&.vertical {
2314
&:dir(ltr) {
2315
padding: 0 0 0 12px;
2316
2317
trough {
2318
padding-left: $bar_size;
2319
}
2320
2321
slider {
2322
@extend %scale-has-marks-below-vert;
2323
2324
margin-left: -10px - $bar_size;
2325
margin-right: 0;
2326
}
2327
}
2328
2329
&:dir(rtl) {
2330
padding: 0 12px 0 0;
2331
2332
trough {
2333
padding-right: $bar_size;
2334
}
2335
2336
slider {
2337
@extend %scale-has-marks-above-vert;
2338
2339
margin-right: -10px - $bar_size;
2340
margin-left: 0;
2341
}
2342
}
2343
}
2344
2345
&.fine-tune {
2346
&.horizontal {
2347
slider {
2348
@extend %scale-has-marks-above-horz-fine-tune;
2349
}
2350
}
2351
2352
&.vertical {
2353
&:dir(ltr) {
2354
slider {
2355
@extend %scale-has-marks-below-vert-fine-tune;
2356
}
2357
}
2358
2359
&:dir(rtl) {
2360
slider {
2361
@extend %scale-has-marks-above-vert-fine-tune;
2362
}
2363
}
2364
}
2365
}
2366
}
2367
}
2368
2369
2370
/*****************
2371
* Progress bars *
2372
*****************/
2373
progressbar {
2374
// sizing
2375
&.horizontal {
2376
trough,
2377
progress { min-height: $bar_size; }
2378
}
2379
2380
&.vertical {
2381
trough,
2382
progress { min-width: $bar_size; }
2383
}
2384
2385
// FIXME: insensitive state missing and some other state should be set probably
2386
color: $tertiary_fg_color;
2387
font-size: smaller;
2388
2389
trough { background-color: scale-alpha($selected_bg_color, $lower_opacity); }
2390
2391
progress { background-color: $selected_bg_color; }
2392
2393
&.osd { // progressbar.osd used for epiphany page loading progress
2394
// min-width: $bar_size;
2395
// min-height: $bar_size;
2396
// background-color: transparent;
2397
2398
// trough { background-color: transparent; }
2399
2400
progress {
2401
}
2402
}
2403
}
2404
2405
2406
/*************
2407
* Level Bar *
2408
*************/
2409
levelbar {
2410
block {
2411
min-width: $medium_size;
2412
min-height: $bar_size;
2413
}
2414
2415
&.vertical block {
2416
min-width: $bar_size;
2417
min-height: $medium_size;
2418
}
2419
2420
trough {
2421
padding: 2px;
2422
border-radius: 2px;
2423
2424
@include entry(normal);
2425
2426
&:disabled { @include entry(insensitive); }
2427
}
2428
2429
&.horizontal.discrete block { margin: 0 1px; }
2430
2431
&.vertical.discrete block { margin: 1px 0; }
2432
2433
&.horizontal.discrete trough { padding: 2px 1px; }
2434
2435
&.vertical.discrete trough { padding: 1px 2px; }
2436
2437
block {
2438
&.low {
2439
background-color: $warning_color;
2440
}
2441
2442
&.high {
2443
background-color: $selected_bg_color;
2444
}
2445
2446
&.full {
2447
background-color: $success_color;
2448
}
2449
2450
&.empty {
2451
background-color: $track_color;
2452
color: $insensitive_fg_color;
2453
}
2454
}
2455
}
2456
2457
2458
/****************
2459
* Print dialog *
2460
*****************/
2461
printdialog {
2462
paper {
2463
padding: 0;
2464
border: 1px solid $borders_color;
2465
background: $base_color;
2466
color: $fg_color;
2467
}
2468
2469
.dialog-action-box { margin: 12px; }
2470
}
2471
2472
2473
/**********
2474
* Frames *
2475
**********/
2476
frame > border,
2477
.frame {
2478
margin: 0;
2479
padding: 0;
2480
border: 1px solid $borders_color;
2481
border-radius: 0;
2482
box-shadow: none;
2483
2484
&.flat { border-style: none; }
2485
}
2486
2487
actionbar > revealer > box {
2488
padding: $container_padding;
2489
border-top: 1px solid $borders_color;
2490
}
2491
2492
scrolledwindow {
2493
viewport.frame { // avoid double borders when viewport inside scrolled window
2494
border-style: none;
2495
}
2496
2497
// This is used when content is touch-dragged past boundaries.
2498
// draws a box on top of the content, the size changes programmatically.
2499
overshoot {
2500
&.top { @include overshoot(top); }
2501
2502
&.bottom { @include overshoot(bottom); }
2503
2504
&.left { @include overshoot(left); }
2505
2506
&.right { @include overshoot(right); }
2507
}
2508
2509
// Overflow indication, works similarly to the overshoot, the size if fixed tho.
2510
undershoot {
2511
&.top { @include undershoot(top); }
2512
2513
&.bottom { @include undershoot(bottom); }
2514
2515
&.left { @include undershoot(left); }
2516
2517
&.right { @include undershoot(right); }
2518
}
2519
2520
junction { // the small square between two scrollbars
2521
border-style: solid none none solid;
2522
border-width: 1px;
2523
border-color: $borders_color;
2524
background-color: $base_color;
2525
2526
&:dir(rtl) { border-style: solid solid none none; }
2527
}
2528
}
2529
2530
//vbox and hbox separators
2531
separator {
2532
min-width: 1px;
2533
min-height: 1px;
2534
background: $borders_color;
2535
}
2536
2537
2538
/*********
2539
* Lists *
2540
*********/
2541
list {
2542
border-color: $borders_color;
2543
background-color: $base_color;
2544
2545
row { padding: 2px; }
2546
}
2547
2548
row {
2549
transition: $material_transition;
2550
2551
&:hover { transition: none; }
2552
2553
&.activatable {
2554
background-image: radial-gradient(circle farthest-corner at center,
2555
gtkalpha(currentColor, 0) 100%,
2556
transparent 0%),
2557
image(gtkalpha(currentColor, 0));
2558
2559
&:hover {
2560
background-image: radial-gradient(circle farthest-corner at center,
2561
gtkalpha(currentColor, 0) 100%,
2562
transparent 0%),
2563
image(gtkalpha(currentColor, 0.05));
2564
}
2565
2566
&.has-open-popup, // this is for indicathing which row generated a popover see https://bugzilla.gnome.org/show_bug.cgi?id=754411
2567
&:active {
2568
transition: $material_transition, background-image 0;
2569
animation: row_ripple_effect $material_slower $material_ease_out forwards;
2570
}
2571
}
2572
2573
&:selected { @extend %selected_items; }
2574
}
2575
2576
2577
/*********************
2578
* App Notifications *
2579
*********************/
2580
.app-notification,
2581
.app-notification.frame {
2582
@extend %osd;
2583
2584
@extend toolbar.osd;
2585
2586
margin: 8px;
2587
2588
border { border: none; }
2589
}
2590
2591
2592
/*************
2593
* Expanders *
2594
*************/
2595
expander {
2596
arrow {
2597
transition: all $material_faster $material_ease;
2598
min-width: 16px;
2599
min-height: 16px;
2600
-gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
2601
-gtk-icon-transform: rotate(-90deg);
2602
2603
&:dir(rtl) { -gtk-icon-transform: rotate(90deg); }
2604
2605
&:checked { -gtk-icon-transform: unset; }
2606
2607
color: $secondary_fg_color;
2608
2609
&:hover, &:active { color: $fg_color; }
2610
2611
&:disabled { color: $insensitive_secondary_fg_color; }
2612
2613
&:selected {
2614
color: $secondary_selected_fg_color;
2615
2616
&:hover, &:active { color: $selected_fg_color; }
2617
2618
&:disabled { color: $insensitive_secondary_selected_fg_color; }
2619
}
2620
}
2621
}
2622
2623
2624
/************
2625
* Calendar *
2626
***********/
2627
calendar {
2628
padding: 1px;
2629
border: 1px solid $borders_color;
2630
color: $fg_color;
2631
2632
&:disabled { color: $insensitive_fg_color; }
2633
2634
&:selected {
2635
@extend %selected_items;
2636
2637
border-radius: 2px + 1px;
2638
}
2639
2640
&.header {
2641
border-style: none none solid;
2642
border-radius: 0;
2643
}
2644
2645
&.button { @extend %button_basic.flat; }
2646
2647
&.highlight {
2648
color: gtkalpha(currentColor, $hint_opacity);
2649
font-weight: 500;
2650
}
2651
2652
&:indeterminate { color: gtkalpha(currentColor, $disabled_opacity); }
2653
}
2654
2655
2656
/***********
2657
* Dialogs *
2658
***********/
2659
messagedialog { // Message Dialog styling
2660
&.background { background-color: $light_color; }
2661
2662
.titlebar {
2663
min-height: $small_size;
2664
border-style: none;
2665
box-shadow: inset 0 1px $highlight_color;
2666
background-color: $light_color;
2667
}
2668
2669
&.csd { // rounded bottom border styling for csd version
2670
&.background {
2671
// bigger radius for better antialiasing
2672
border-bottom-left-radius: 2px;
2673
border-bottom-right-radius: 2px;
2674
}
2675
2676
.dialog-action-area button {
2677
padding: 8px 16px;
2678
border-top: 1px solid $borders_color;
2679
border-radius: 0;
2680
2681
@extend %button_basic.flat;
2682
2683
&:first-child{ border-bottom-left-radius: 2px; }
2684
2685
&:last-child { border-bottom-right-radius: 2px; }
2686
}
2687
}
2688
}
2689
2690
filechooser {
2691
.dialog-action-box { border-top: 1px solid $borders_color; }
2692
2693
#pathbarbox { border-bottom: 1px solid $borders_color; }
2694
}
2695
2696
filechooserbutton:drop(active) {
2697
box-shadow: none;
2698
}
2699
2700
2701
/***********
2702
* Sidebar *
2703
***********/
2704
.sidebar {
2705
border-style: none;
2706
background-color: $light_color;
2707
2708
@at-root %sidebar_left,
2709
&:dir(ltr),
2710
&.left,
2711
&.left:dir(rtl) {
2712
border-right: 1px solid $borders_color;
2713
border-left-style: none;
2714
}
2715
2716
@at-root %sidebar_right
2717
&:dir(rtl),
2718
&.right {
2719
border-left: 1px solid $borders_color;
2720
border-right-style: none;
2721
}
2722
2723
list { background-color: transparent; }
2724
2725
paned & { &.left, &.right, &.left:dir(rtl), &:dir(rtl), &:dir(ltr), & { border-style: none; }}
2726
}
2727
2728
stacksidebar {
2729
&.sidebar {
2730
&:dir(ltr),
2731
&.left,
2732
&.left:dir(rtl) { list { @extend %sidebar_left; }}
2733
2734
&:dir(rtl),
2735
&.right { list { @extend %sidebar_right; }}
2736
}
2737
2738
row {
2739
padding: 10px 4px;
2740
2741
> label {
2742
padding-left: 6px;
2743
padding-right: 6px;
2744
}
2745
2746
&.needs-attention > label { @extend %needs_attention; }
2747
}
2748
}
2749
2750
2751
/****************
2752
* File chooser *
2753
****************/
2754
placessidebar {
2755
> viewport.frame { border-style: none; }
2756
2757
row {
2758
// Needs overriding of the GtkListBoxRow padding
2759
min-height: 32px;
2760
padding: 0;
2761
2762
// Using margins/padding directly in the SidebarRow
2763
// will make the animation of the new bookmark row jump
2764
> revealer { padding: 0 12px; }
2765
2766
&:selected { color: $selected_fg_color; }
2767
2768
&:disabled { color: $insensitive_fg_color; }
2769
2770
image.sidebar-icon {
2771
opacity: $hint_opacity; // dim the device icons
2772
2773
&:dir(ltr) { padding-right: 8px; }
2774
&:dir(rtl) { padding-left: 8px; }
2775
}
2776
2777
label.sidebar-label {
2778
&:dir(ltr) { padding-right: 2px; }
2779
&:dir(rtl) { padding-left: 2px; }
2780
}
2781
2782
@at-root button.sidebar-button {
2783
@extend %button_basic.flat;
2784
2785
min-height: $small_size;
2786
min-width: $small_size;
2787
margin-top: 0;
2788
margin-bottom: 0;
2789
padding: 0;
2790
border-radius: 100%;
2791
-gtk-outline-radius: 100%;
2792
2793
row:selected & { @extend %button_selected.flat; }
2794
}
2795
2796
&.sidebar-placeholder-row {
2797
min-height: 2px;
2798
padding: 0 8px;
2799
background-image: image($accent_bg_color);
2800
background-clip: content-box;
2801
}
2802
2803
&.sidebar-new-bookmark-row { color: $accent_bg_color; }
2804
2805
&:drop(active):not(:disabled) {
2806
box-shadow: inset 0 0 0 2px $accent_bg_color;
2807
2808
&:selected {
2809
// background-color: $accent_bg_color;
2810
// color: $selected_fg_color;
2811
}
2812
}
2813
}
2814
}
2815
2816
placesview {
2817
.server-list-button > image { -gtk-icon-transform: rotate(0turn); }
2818
2819
.server-list-button:checked > image { -gtk-icon-transform: rotate(-0.5turn); }
2820
2821
// this selects the "connect to server" label
2822
> actionbar > revealer > box > label {
2823
padding-left: 8px;
2824
padding-right: 8px;
2825
}
2826
}
2827
2828
2829
/*********
2830
* Paned *
2831
*********/
2832
paned {
2833
> separator {
2834
min-width: 1px;
2835
min-height: 1px;
2836
-gtk-icon-source: none; // defeats the ugly default handle decoration
2837
border-style: none; // just to be sure
2838
background-color: transparent;
2839
// workaround, using background istead of a border since the border will get rendered twice (?)
2840
background-image: image($borders_color);
2841
background-size: 1px 1px;
2842
2843
&.wide {
2844
min-width: 6px;
2845
min-height: 6px;
2846
background-color: $bg_color;
2847
background-image: image($borders_color), image($borders_color);
2848
background-size: 1px 1px, 1px 1px;
2849
}
2850
}
2851
2852
&.horizontal > separator {
2853
background-repeat: repeat-y;
2854
2855
&:dir(ltr) {
2856
margin: 0 -8px 0 0;
2857
padding: 0 8px 0 0;
2858
background-position: left;
2859
}
2860
2861
&:dir(rtl) {
2862
margin: 0 0 0 -8px;
2863
padding: 0 0 0 8px;
2864
background-position: right;
2865
}
2866
2867
&.wide {
2868
margin: 0;
2869
padding: 0;
2870
background-repeat: repeat-y, repeat-y;
2871
background-position: left, right;
2872
}
2873
}
2874
2875
&.vertical > separator {
2876
margin: 0 0 -8px 0;
2877
padding: 0 0 8px 0;
2878
background-repeat: repeat-x;
2879
background-position: top;
2880
2881
&.wide {
2882
margin: 0;
2883
padding: 0;
2884
background-repeat: repeat-x, repeat-x;
2885
background-position: bottom, top;
2886
}
2887
}
2888
}
2889
2890
2891
/**************
2892
* GtkInfoBar *
2893
**************/
2894
infobar { border-style: none; }
2895
2896
.info { background-color: $info_bg_color; }
2897
2898
.question { background-color: $question_bg_color; }
2899
2900
.warning { background-color: $warning_bg_color; }
2901
2902
.error { background-color: $error_bg_color; }
2903
2904
.info,
2905
.question,
2906
.warning,
2907
.error {
2908
color: $selected_fg_color;
2909
2910
button { @extend %button_selected; }
2911
2912
label:selected {
2913
}
2914
2915
*:link { @extend %link_selected; }
2916
}
2917
2918
2919
/************
2920
* Tooltips *
2921
************/
2922
tooltip {
2923
&.background {
2924
// background-color needs to be set this way otherwise it gets drawn twice
2925
// see https://bugzilla.gnome.org/show_bug.cgi?id=736155 for details.
2926
background-color: scale-alpha($base_color, $higher_opacity);
2927
}
2928
2929
// @extend %osd;
2930
2931
// padding: 4px; /* not working */
2932
border-radius: 2px;
2933
box-shadow: none; // otherwise it gets inherited by windowframe.csd
2934
2935
// FIXME: we need a border or tooltips vanish on black background.
2936
decoration { background-color: transparent; }
2937
2938
label {
2939
min-height: 32px - 6px * 2;
2940
padding: 2px 8px - 6px;
2941
}
2942
2943
* { // Yeah this is ugly
2944
padding: 0;
2945
background-color: transparent;
2946
color: inherit;
2947
}
2948
}
2949
2950
2951
/*****************
2952
* Color Chooser *
2953
*****************/
2954
colorswatch {
2955
// This widget is made of two boxes one on top of the other, the lower box is colorswatch {} the other one
2956
// is colorswatch overlay {}, colorswatch has the programmatically set background, so most of the style is
2957
// applied to the overlay box.
2958
2959
// base color corners rounding
2960
// to avoid the artifacts caused by rounded corner anti-aliasing the base color
2961
// sports a bigger radius.
2962
// nth-child is needed by the custom color strip.
2963
2964
&.top {
2965
border-top-left-radius: $material_radius + 0.5px;
2966
border-top-right-radius: $material_radius + 0.5px;
2967
2968
overlay {
2969
border-top-left-radius: $material_radius;
2970
border-top-right-radius: $material_radius;
2971
}
2972
}
2973
2974
&.bottom {
2975
border-bottom-left-radius: $material_radius + 0.5px;
2976
border-bottom-right-radius: $material_radius + 0.5px;
2977
2978
overlay {
2979
border-bottom-left-radius: $material_radius;
2980
border-bottom-right-radius: $material_radius;
2981
}
2982
}
2983
2984
&.left,
2985
&:first-child:not(.top) {
2986
border-top-left-radius: $material_radius + 0.5px;
2987
border-bottom-left-radius: $material_radius + 0.5px;
2988
2989
overlay {
2990
border-top-left-radius: $material_radius;
2991
border-bottom-left-radius: $material_radius;
2992
}
2993
}
2994
2995
&.right,
2996
&:last-child:not(.bottom) {
2997
border-top-right-radius: $material_radius + 0.5px;
2998
border-bottom-right-radius: $material_radius + 0.5px;
2999
3000
overlay {
3001
border-top-right-radius: $material_radius;
3002
border-bottom-right-radius: $material_radius;
3003
}
3004
}
3005
3006
&.dark overlay { color: white; }
3007
3008
&.light overlay { color: scale-alpha(black, 0.8); }
3009
3010
&.dark { color: white; } // for focus ring
3011
3012
&.light { color: scale-alpha(black, 0.8); } // for focus ring
3013
3014
&:drop(active) {
3015
box-shadow: none;
3016
3017
&.light overlay {
3018
box-shadow: $z-depth-1, 0 0 0 2px $accent_bg_color;
3019
}
3020
3021
&.dark overlay {
3022
box-shadow: $z-depth-1, 0 0 0 2px $accent_bg_color;
3023
}
3024
}
3025
3026
overlay {
3027
transition: $shadow_transition;
3028
box-shadow: $z-depth-1;
3029
3030
&:hover { box-shadow: $z-depth-2; }
3031
}
3032
3033
&#add-color-button {
3034
border-radius: $material_radius $material_radius 0 0;
3035
color: white; // for focus ring
3036
3037
&:only-child { border-radius: $material_radius; }
3038
3039
overlay {
3040
background-image: linear-gradient(to right,
3041
$error_bg_color 25%,
3042
$warning_bg_color 25%, $warning_bg_color 50%,
3043
$info_bg_color 50%, $info_bg_color 75%,
3044
$question_bg_color 75%);
3045
color: white;
3046
}
3047
}
3048
3049
&:disabled {
3050
opacity: $disabled_opacity;
3051
3052
overlay { box-shadow: none; }
3053
}
3054
3055
row:selected & {
3056
}
3057
3058
&#editor-color-sample {
3059
border-radius: $material_radius + 0.5px;
3060
3061
overlay { border-radius: $material_radius; }
3062
3063
// overlay:hover { box-shadow: $z-depth-1; }
3064
}
3065
}
3066
3067
// colorscale popup
3068
colorchooser .popover.osd {
3069
transition: $shadow_transition;
3070
border-radius: 2px;
3071
box-shadow: $z-depth-2;
3072
background-color: $base_color;
3073
3074
&:backdrop { box-shadow: $z-depth-1; }
3075
3076
spinbutton:not(.vertical) { @extend %entry.flat; }
3077
}
3078
3079
3080
/********
3081
* Misc *
3082
********/
3083
//content view (grid/list)
3084
.content-view {
3085
background-color: $bg_color;
3086
3087
// &:hover { -gtk-icon-effect: highlight; }
3088
3089
rubberband { @extend rubberband; }
3090
}
3091
3092
.scale-popup {
3093
.osd & { @extend %osd; }
3094
3095
.osd & button.flat { //FIXME: quick hack, redo properly
3096
}
3097
3098
button { // +/- buttons on GtkVolumeButton popup
3099
}
3100
}
3101
3102
3103
/**********************
3104
* Window Decorations *
3105
*********************/
3106
decoration {
3107
transition: $shadow_transition;
3108
border-radius: 2px 2px 0 0;
3109
box-shadow: $z-depth-4, 0 16px 16px transparent;
3110
3111
// FIXME rationalize shadows
3112
3113
// this is used for the resize cursor area
3114
margin: 8px;
3115
3116
&:backdrop {
3117
// the transparent shadow here is to enforce that the shadow extents don't
3118
// change when we go to backdrop, to prevent jumping windows.
3119
// The biggest shadow should be in the same order then in the active state
3120
// or the jumping will happen during the transition.
3121
box-shadow: $z-depth-2, 0 16px 16px transparent;
3122
}
3123
3124
.fullscreen &,
3125
.tiled & { border-radius: 0; }
3126
3127
.popup & { box-shadow: none; }
3128
3129
// server-side decorations as used by mutter
3130
.ssd & { box-shadow: 0 3px 3px rgba(0, 0, 0, 0.16); } //just doing borders, wm draws actual shadows
3131
3132
.csd.popup & {
3133
border-radius: 2px;
3134
box-shadow: $z-depth-2;
3135
}
3136
3137
tooltip.csd & {
3138
border-radius: 2px;
3139
box-shadow: $z-depth-2;
3140
}
3141
3142
messagedialog.csd & {
3143
border-radius: 2px;
3144
// box-shadow: $z-depth-4, 0 16px 16px transparent;
3145
3146
// &:backdrop { box-shadow: $z-depth-2, 0 16px 16px transparent; }
3147
}
3148
3149
.solid-csd & {
3150
margin: 0;
3151
padding: 4px;
3152
// border: solid 1px $borders_color;
3153
border-radius: 0;
3154
box-shadow: inset 0 0 0 3px $headerbar_color, inset 0 1px $secondary_highlight_color;
3155
background-color: $borders_color;
3156
}
3157
}
3158
3159
// Window Close button
3160
button.titlebutton {
3161
// @extend %button_basic.flat;
3162
3163
@extend %button_basic.image-button;
3164
3165
.selection-mode & {
3166
}
3167
}
3168
3169
3170
// catch all extend :)
3171
3172
%selected_items {
3173
background-color: $selected_bg_color;
3174
3175
@at-root %nobg_selected_items, & {
3176
color: $selected_fg_color;
3177
3178
&:disabled { color: $insensitive_selected_fg_color; }
3179
}
3180
}
3181
3182
.monospace { font: Monospace; }
3183
3184
3185
/**********************
3186
* Touch Copy & Paste *
3187
*********************/
3188
//touch selection handlebars for the Popover.osd above
3189
cursor-handle {
3190
border-radius: 100px;
3191
background-color: $accent_bg_color;
3192
background-image: none;
3193
3194
&.top:dir(ltr), &.bottom:dir(rtl) {
3195
padding-left: 6px;
3196
border-top-right-radius: 0;
3197
}
3198
3199
&.bottom:dir(ltr), &.top:dir(rtl) {
3200
padding-right: 6px;
3201
border-top-left-radius: 0;
3202
}
3203
3204
&.insertion-cursor:dir(ltr), &.insertion-cursor:dir(rtl) {
3205
-GtkWidget-text-handle-width: 24;
3206
-GtkWidget-text-handle-height: 30;
3207
3208
$_url: 'assets/slider-horz-scale-has-marks-above#{$asset_suffix}';
3209
-gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
3210
url('#{$_url}@2.png'));
3211
}
3212
}
3213
3214
.context-menu { font: initial; } // Decouple the font of context menus from their entry/textview
3215
3216
button.circular { // FIXME: aggregate to buttons
3217
border-radius: 100px;
3218
-gtk-outline-radius: 100px;
3219
3220
label { padding: 0; }
3221
}
3222
3223
// shortcut window keys
3224
.keycap {
3225
min-width: 28px - 8px * 2;
3226
min-height: 28px - 2px;
3227
margin-top: 2px;
3228
padding-bottom: 2px;
3229
padding-left: 8px;
3230
padding-right: 8px;
3231
3232
border: solid 1px $borders_color;
3233
border-radius: 2px + 1px;
3234
box-shadow: inset 0 -2px $borders_color;
3235
background-color: $base_color;
3236
color: $fg_color;
3237
font-size: smaller;
3238
}
3239
3240
*:drop(active) { // FIXME needs to be done widget by widget, this wildcard should really die
3241
transition: $material_transition;
3242
box-shadow: $z-depth-1, inset 0 0 0 2px $accent_bg_color;
3243
caret-color: $accent_bg_color;
3244
}
3245
3246
stackswitcher button.text-button { min-width: 100px; } // FIXME aggregate with buttons
3247
3248
stackswitcher button.circular,
3249
stackswitcher button.text-button.circular { // FIXME aggregate with buttons
3250
min-width: $medium_size;
3251
min-height: $medium_size;
3252
padding: 0;
3253
}
3254