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