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-3.18.scss

View raw Download
text/plain • 58.34 kiB
Unicode text, UTF-8 text
        
            
1
* {
2
padding: 0;
3
background-clip: padding-box;
4
5
-GtkToolButton-icon-spacing: 4;
6
-GtkTextView-error-underline-color: $error_color;
7
8
-GtkCheckButton-indicator-size: 24;
9
-GtkCheckMenuItem-indicator-size: 16;
10
11
// The size for scrollbars. The slider is 2px smaller, but we keep it
12
// up so that the whole area is sensitive to button presses for the
13
// slider. The stepper button is larger in both directions, the slider
14
// only in the width
15
16
-GtkScrolledWindow-scrollbar-spacing: 0;
17
-GtkScrolledWindow-scrollbars-within-bevel: 1;
18
19
-GtkToolItemGroup-expander-size: 11;
20
-GtkExpander-expander-size: 16;
21
-GtkTreeView-expander-size: 11;
22
23
-GtkTreeView-horizontal-separator: 4;
24
25
-GtkMenu-horizontal-padding: 0;
26
-GtkMenu-vertical-padding: 0;
27
28
-GtkWidget-link-color: $link_color;
29
-GtkWidget-visited-link-color: $visited_link_color;
30
31
-GtkWidget-focus-padding: 2; // FIXME: do we still need these?
32
-GtkWidget-focus-line-width: 1; //
33
34
-GtkWidget-text-handle-width: 20;
35
-GtkWidget-text-handle-height: 20;
36
37
-GtkDialog-button-spacing: 4;
38
-GtkDialog-action-area-border: 0;
39
40
-GtkStatusbar-shadow-type: none;
41
42
// We use the outline properties to signal the focus properties
43
// to the adwaita engine: using real CSS properties is faster,
44
// and we don't use any outlines for now.
45
46
outline-style: solid;
47
outline-width: 2px;
48
outline-color: $checked_bg_color;
49
outline-offset: -4px;
50
outline-radius: $material_radius;
51
}
52
53
54
/***************
55
* Base States *
56
***************/
57
58
.background {
59
background-color: $bg_color;
60
color: $fg_color;
61
}
62
63
/*
64
These wildcard seems unavoidable, need to investigate.
65
Wildcards are bad and troublesome, use them with care,
66
or better, just don't.
67
Everytime a wildcard is used a kitten dies, painfully.
68
*/
69
70
*:insensitive {
71
-gtk-image-effect: dim;
72
}
73
74
.gtkstyle-fallback {
75
background-color: $bg_color;
76
color: $fg_color;
77
&:prelight {
78
background-color: darken($bg_color, 5%);
79
color: $fg_color;
80
}
81
&:active {
82
background-color: darken($bg_color, 10%);
83
color: $fg_color;
84
}
85
&:insensitive {
86
background-color: $bg_color;
87
color: $disabled_fg_color;
88
}
89
&:selected {
90
background-color: $primary_color;
91
color: $inverse_fg_color;
92
}
93
}
94
95
.view {
96
@extend .list-row.activatable;
97
background-color: $base_color;
98
color: $fg_color;
99
100
&:hover, &:active, &:selected { border-radius: $material_radius; }
101
102
&:insensitive {
103
// background-color: $alt_base_color;
104
color: $disabled_fg_color;
105
}
106
107
&:selected { @extend %selected_items; }
108
}
109
110
.rubberband {
111
border: 1px solid $alt_primary_color;
112
background-color: rgba($alt_primary_color, 0.3);
113
}
114
115
.label {
116
&.separator {
117
color: $fg_color;
118
@extend .dim-label;
119
}
120
&:selected {
121
@extend %selected_items;
122
}
123
&:insensitive {
124
color: $disabled_fg_color;
125
}
126
}
127
128
.dim-label {
129
opacity: 0.6;
130
}
131
132
GtkAssistant {
133
.sidebar {
134
padding: 6px 0;
135
// border-top: 1px solid $border_color;
136
&:dir(ltr) { border-right: 1px solid $border_color; }
137
&:dir(rtl) { border-left: 1px solid $border_color; }
138
}
139
// &.csd .sidebar { border-top-style: none; }
140
.sidebar .label {
141
opacity: 0.5;
142
padding: 5px 12px 6px;
143
font-weight: 500;
144
}
145
.sidebar .label.highlight {
146
opacity: 1;
147
}
148
}
149
150
GtkTextView { // This will get overridden by .view, needed by gedit line numbers
151
background-color: $alt_base_color;
152
}
153
154
.grid-child {
155
// outline-offset: -2px;
156
padding: 4px;
157
border-radius: $material_radius;
158
&:selected { @extend %selected_items; }
159
}
160
161
// %osd, .osd { opacity: 0.9; }
162
163
/*********************
164
* Spinner Animation *
165
*********************/
166
167
@keyframes spin {
168
to { -gtk-icon-transform: rotate(1turn); }
169
}
170
171
.spinner {
172
background-color: blue;
173
background-image: none;
174
opacity: 0; // non spinning spinner makes no sense
175
-gtk-icon-source: -gtk-icontheme('process-working-symbolic');
176
&:active {
177
opacity: 1;
178
animation: spin 1s linear infinite;
179
&:insensitive {
180
opacity: 0.5;
181
}
182
}
183
}
184
185
/****************
186
* Text Entries *
187
****************/
188
189
.entry {
190
padding: 7px 8px 8px;
191
border-radius: $material_radius;
192
@include entry(normal);
193
&:focus { @include entry(focus); }
194
&:insensitive { @include entry(insensitive); }
195
&.flat {
196
border-radius: 0;
197
@include entry(flat-normal);
198
&:focus { @include entry(flat-focus); }
199
&:insensitive { @include entry(flat-insensitive); }
200
}
201
202
&:selected { @extend %selected_items; }
203
204
&.image { // icons inside the entry
205
&.left { padding-left: 2px; }
206
&.right { padding-right: 2px; }
207
}
208
209
&.progressbar {
210
margin: 2px;
211
border-style: none none solid;
212
border-width: 2px;
213
border-color: $primary_color;
214
border-radius: 0;
215
box-shadow: none;
216
background-color: transparent;
217
background-image: none;
218
}
219
220
.linked > & { @extend %linked; }
221
222
.linked.vertical > & { @extend %linked_vertical; }
223
224
.linked > &.flat,
225
.linked.vertical > &.flat { border-radius: 0; }
226
227
// entry error and warning style
228
@each $e_type, $e_color in (error, $error_color),
229
(warning, $warning_color) {
230
&.#{$e_type} {
231
@include entry(normal, $e_color);
232
&:focus { @include entry(focus, $e_color); }
233
&:insensitive { @include entry(insensitive, $e_color); }
234
&.flat {
235
@include entry(flat-normal, $e_color);
236
&:focus { @include entry(flat-focus, $e_color); }
237
&:insensitive { @include entry(flat-insensitive, $e_color); }
238
}
239
}
240
}
241
242
&.image { // entry icons colors
243
&:not(:hover):not(:active) { color: gtkalpha(currentColor, 0.7); }
244
&:insensitive { color: gtkalpha(currentColor, 0.5); }
245
}
246
247
.osd & {
248
}
249
250
GtkTreeView &:not(:selected) {
251
&, &:focus {
252
padding: 2px;
253
border-image: none;
254
border-radius: 0;
255
box-shadow: none;
256
background-color: $base_color;
257
}
258
}
259
}
260
261
262
/***********
263
* Buttons *
264
***********/
265
266
// stuff for .needs-attention
267
@keyframes needs_attention {
268
from {
269
background-image: -gtk-gradient(radial,
270
center center, 0,
271
center center, 0.001,
272
to($secondary_color),
273
to(transparent));
274
}
275
to {
276
background-image: -gtk-gradient(radial,
277
center center, 0,
278
center center, 0.5,
279
to($secondary_color),
280
to(transparent));
281
}
282
}
283
284
285
%button,
286
.button {
287
padding: 7px 10px 8px;
288
border-radius: $material_radius;
289
background-repeat: no-repeat;
290
background-position: center;
291
background-size: ($medium_size * 2 / 0.8) ($medium_size * 2 / 0.8);
292
font-weight: 500;
293
@include button(normal);
294
&:hover { @include button(hover); }
295
&:active { @include button(active); }
296
&:insensitive { @include button(insensitive); }
297
&:checked { @include button(checked); }
298
&:checked:insensitive { @include button(checked-insensitive); }
299
@at-root %flat_button, &.flat {
300
@at-root %simple_flat_button, & {
301
@include button(flat-normal);
302
&:hover { @include button(flat-hover); }
303
&:active { @include button(flat-active); }
304
&:insensitive { @include button(flat-insensitive); }
305
}
306
&:checked { @include button(flat-checked); }
307
&:checked:insensitive { @include button(flat-checked-insensitive); }
308
}
309
// big standalone buttons like in Documents pager
310
&.osd {
311
&.image-button {
312
padding: 16px;
313
background-size: ($large_size / 0.8) ($large_size / 0.8);
314
}
315
&:insensitive { opacity: 0; }
316
}
317
//overlay / OSD style
318
.osd & {
319
}
320
321
// Suggested and Destructive Action buttons
322
@each $b_type, $b_color in (suggested-action, $suggested_color),
323
(destructive-action, $destructive_color) {
324
&.#{$b_type} {
325
background-color: $b_color;
326
color: $inverse_fg_color;
327
&:insensitive { @include button(insensitive, $b_color); }
328
&:checked { background-color: mix($inverse_fg_color, $b_color, percentage(0.3)); }
329
&.flat {
330
background-color: transparent;
331
color: $b_color;
332
&:insensitive { @include button(flat-insensitive, $b_color); }
333
&:checked { background-color: $checked_bg_color; }
334
}
335
}
336
}
337
338
&.image-button { @extend %image_button; }
339
340
&.text-button {
341
padding-left: 16px;
342
padding-right: 16px;
343
}
344
345
&.text-button.image-button {
346
// those buttons needs uneven horizontal padding, we want the icon side
347
// to have the image-button padding, while the text side the text-button
348
// one, so we're adding the missing padding to the label depending on
349
// its position inside the button
350
padding: 7px 10px 8px; // same as .button
351
outline-radius: $material_radius;
352
border-radius: $material_radius;
353
background-size: ($medium_size * 2 / 0.8) ($medium_size * 2 / 0.8);
354
.label:first-child { padding-left: 6px; }
355
.label:last-child { padding-right: 6px; }
356
}
357
358
.stack-switcher > & {
359
// to position the needs attention dot, padding is added to the button
360
// child, a label needs just lateral padding while an icon needs vertical
361
// padding added too.
362
363
outline-offset: -4px; // needs to be set or it gets overriden by GtkRadioButton outline-offset
364
365
> .label {
366
padding-left: 6px; // label padding
367
padding-right: 6px; //
368
}
369
> GtkImage {
370
padding-left: 6px; // image padding
371
padding-right: 6px; //
372
padding-top: 3px; //
373
padding-bottom: 3px; //
374
}
375
&.text-button {
376
padding: 7px 10px 8px; // needed or it will get overridden
377
}
378
&.image-button {
379
// we want image buttons to have a 1:1 aspect ratio, so compensation
380
// of the padding added to the GtkImage is needed
381
padding: 7px 4px;
382
}
383
&.needs-attention > .label,
384
&.needs-attention > GtkImage { @extend %needs_attention; }
385
&.needs-attention:checked > .label,
386
&.needs-attention:checked > GtkImage {
387
animation: none;
388
background-image: none;
389
}
390
}
391
392
//inline-toolbar buttons
393
.inline-toolbar & {
394
// @extend %button.flat;
395
@extend %image_button;
396
}
397
398
.primary-toolbar & { icon-shadow: none; } // tango icons don't need shadows
399
400
.linked > & { @extend %linked; }
401
402
.linked.vertical > & { @extend %linked_vertical; }
403
404
.linked > &.flat,
405
.linked.vertical > &.flat {
406
border-radius: $material_radius;
407
408
&.image-button {
409
outline-radius: $circular_radius;
410
border-radius: $circular_radius;
411
}
412
413
&.text-button.image-button {
414
outline-radius: $material_radius;
415
border-radius: $material_radius;
416
}
417
}
418
}
419
420
%image_button {
421
padding: 10px;
422
outline-radius: 100px;
423
border-radius: 100px;
424
background-size: ($medium_size / 0.8) ($medium_size / 0.8);
425
}
426
427
%needs_attention {
428
animation: needs_attention $longer_duration $deceleration_curve forwards;
429
background-repeat: no-repeat;
430
background-position: right 3px;
431
background-size: 6px 6px;
432
&:dir(rtl) { background-position: left 3px; }
433
}
434
435
436
// all the following is for the +|- buttons on inline toolbars, that way
437
// should really be deprecated...
438
.inline-toolbar GtkToolButton > .button { // redefining the button look is
439
// needed since those are flat...
440
}
441
442
// More inline toolbar buttons
443
.inline-toolbar.toolbar GtkToolButton {
444
// & > .button.flat { @extend %linked_middle; }
445
// &:first-child > .button.flat { @extend %linked:first-child; }
446
// &:last-child > .button.flat { @extend %linked:last-child; }
447
// &:only-child > .button.flat { @extend %linked:only-child; }
448
}
449
450
%linked_middle {
451
outline-radius: $material_radius;
452
border-radius: 0;
453
}
454
455
%linked {
456
@extend %linked_middle;
457
&:first-child {
458
border-top-left-radius: $material_radius;
459
border-bottom-left-radius: $material_radius;
460
}
461
&:last-child {
462
border-top-right-radius: $material_radius;
463
border-bottom-right-radius: $material_radius;
464
}
465
&:only-child {
466
border-radius: $material_radius;
467
}
468
}
469
470
%linked_vertical_middle {
471
outline-radius: $material_radius;
472
border-radius: 0;
473
}
474
475
%linked_vertical{
476
@extend %linked_vertical_middle;
477
&:first-child {
478
border-top-left-radius: $material_radius;
479
border-top-right-radius: $material_radius;
480
}
481
&:last-child {
482
border-bottom-left-radius: $material_radius;
483
border-bottom-right-radius: $material_radius;
484
}
485
&:only-child {
486
border-radius: $material_radius;
487
}
488
}
489
490
/* menu buttons */
491
.menuitem.button.flat {
492
&:selected { @extend %selected_items; }
493
}
494
495
496
GtkColorButton.button {
497
padding: 7px 8px 8px; // Uniform padding on the GtkColorButton
498
499
GtkColorSwatch:first-child:last-child { // :first-child:last-child for a specificity bump, it gets overridden by the
500
// colorpicker style, otherwise
501
border-radius: $material_radius;
502
box-shadow: $shadow_1;
503
}
504
}
505
506
/*********
507
* Links *
508
*********/
509
510
*:link {
511
color: $link_color;
512
&:hover, &:active { color: $link_color; }
513
&:visited {
514
color: $visited_link_color;
515
&:hover, &:active { color: $visited_link_color; }
516
*:selected & { color: mix($inverse_fg_color, $primary_color, 60%); }
517
}
518
&:selected, *:selected & {
519
color: mix($inverse_fg_color, $primary_color, 80%);
520
}
521
}
522
523
.button:link, .button:visited {
524
@extend *:link;
525
& > .label {
526
text-decoration-line: underline;
527
}
528
}
529
530
/*****************
531
* GtkSpinButton *
532
*****************/
533
534
.spinbutton {
535
.button {
536
padding: 4px;
537
border: solid $container_padding transparent;
538
color: $secondary_fg_color;
539
&:hover, &:active { color: $fg_color; }
540
&:insensitive { color: $disabled_secondary_fg_color; }
541
&:active { // add fallback
542
background-color: $active_bg_color;
543
}
544
@extend %image_button;
545
@extend %simple_flat_button;
546
}
547
.osd & {
548
.button {
549
}
550
}
551
&.vertical { //FIXME: try using linking templates for vertically linked stuff
552
.button {
553
padding-top: 10px; // Same vertical padding as image-buttons
554
padding-bottom: 10px; //
555
border: none;
556
&:first-child {
557
border-radius: $material_radius $material_radius 0 0;
558
}
559
&:last-child {
560
border-radius: 0 0 $material_radius $material_radius;
561
}
562
}
563
&.entry {
564
}
565
}
566
GtkTreeView & {
567
&.entry, &.entry:focus {
568
// padding: 1px;
569
// border-width: 1px 0;
570
// border-color: $primary_color;
571
// border-radius: 0;
572
// box-shadow: none;
573
}
574
}
575
}
576
577
/**************
578
* ComboBoxes *
579
**************/
580
GtkComboBox {
581
> .the-button-in-the-combobox { padding: 5px 6px 6px; } // Otherwise combos
582
// are bigger then
583
// buttons
584
-GtkComboBox-arrow-scaling: 0.5;
585
-GtkComboBox-shadow-type: none;
586
587
.menu { padding: 2px 0; }
588
.menu .menuitem { padding: 5px 6px 6px; }
589
.separator.vertical {
590
// always disable separators
591
-GtkWidget-wide-separators: true;
592
}
593
&.combobox-entry .entry {
594
&:dir(ltr) {
595
border-top-right-radius: 0;
596
border-bottom-right-radius: 0;
597
}
598
&:dir(rtl) {
599
border-top-left-radius: 0;
600
border-bottom-left-radius: 0;
601
}
602
}
603
&.combobox-entry .button {
604
padding: 10px;
605
&:dir(ltr) {
606
border-top-left-radius: 0;
607
border-bottom-left-radius: 0;
608
}
609
&:dir(rtl) {
610
border-top-right-radius: 0;
611
border-bottom-right-radius: 0;
612
}
613
}
614
}
615
616
.linked > GtkComboBox > .the-button-in-the-combobox,
617
.linked > GtkComboBoxText > .the-button-in-the-combobox {
618
// the combo is a composite widget so the way we do button linkind doesn't
619
// work, special case needed. See
620
// https://bugzilla.gnome.org/show_bug.cgi?id=733979
621
&:dir(ltr),
622
&:dir(rtl) { @extend %linked_middle; } // specificity bump
623
}
624
.linked > GtkComboBox:first-child > .the-button-in-the-combobox,
625
.linked > GtkComboBoxText:first-child > .the-button-in-the-combobox {
626
@extend %linked:first-child;
627
}
628
.linked > GtkComboBox:last-child > .the-button-in-the-combobox,
629
.linked > GtkComboBoxText:last-child > .the-button-in-the-combobox {
630
@extend %linked:last-child;
631
}
632
.linked > GtkComboBox:only-child > .the-button-in-the-combobox,
633
.linked > GtkComboBoxText:only-child > .the-button-in-the-combobox {
634
@extend %linked:only-child;
635
}
636
637
.linked.vertical > GtkComboBoxText > .the-button-in-the-combobox,
638
.linked.vertical > GtkComboBox > .the-button-in-the-combobox { @extend %linked_vertical_middle; }
639
.linked.vertical > GtkComboBoxText:first-child > .the-button-in-the-combobox,
640
.linked.vertical > GtkComboBox:first-child > .the-button-in-the-combobox { @extend %linked_vertical:first-child; }
641
.linked.vertical > GtkComboBoxText:last-child > .the-button-in-the-combobox,
642
.linked.vertical > GtkComboBox:last-child > .the-button-in-the-combobox { @extend %linked_vertical:last-child; }
643
.linked.vertical > GtkComboBoxText:only-child > .the-button-in-the-combobox,
644
.linked.vertical > GtkComboBox:only-child > .the-button-in-the-combobox { @extend %linked_vertical:only-child; }
645
646
/************
647
* Toolbars *
648
************/
649
.toolbar {
650
-GtkWidget-window-dragging: true;
651
padding: 4px;
652
background-color: $bg_color;
653
&:not(.search-bar) .button { @extend %button.flat; }
654
.osd &, &.osd {
655
transition: border-image $shorter_duration $deceleration_curve;
656
padding: $container_padding;
657
border-style: solid;
658
border-width: 8px;
659
border-image: -gtk-scaled(url("assets/box-shadow#{$asset_suffix}.png"),
660
url("assets/box-shadow#{$asset_suffix}@2.png"))
661
10 / 10px stretch;
662
border-radius: $material_radius;
663
// box-shadow: $shadow_2, inset 0 1px $highlight_color;
664
background-color: $popup_bg_color;
665
&:backdrop {
666
border-image: -gtk-scaled(url("assets/box-shadow-backdrop#{$asset_suffix}.png"),
667
url("assets/box-shadow-backdrop#{$asset_suffix}@2.png"))
668
10 / 10px stretch;
669
// box-shadow: $shadow_1, inset 0 1px $highlight_color;
670
}
671
}
672
}
673
674
//searchbar, location-bar & inline-toolbar
675
.inline-toolbar {
676
padding: $container_padding;
677
border-style: solid;
678
border-width: 0 1px 1px;
679
border-color: $border_color;
680
background-color: $alt_base_color;
681
}
682
683
.search-bar, .location-bar {
684
padding: $container_padding;
685
border-style: solid;
686
border-width: 0 0 1px;
687
border-color: $border_color;
688
background-color: $bg_color;
689
background-clip: border-box;
690
}
691
692
/***************
693
* Header bars *
694
***************/
695
696
.titlebar,
697
.header-bar {
698
transition: background-color $shorter_duration $deceleration_curve;
699
padding: $container_padding;
700
border-radius: $material_radius $material_radius 0 0;
701
box-shadow: $shadow_1, inset 0 1px $titlebar_highlight_color;
702
background-color: $titlebar_bg_color;
703
color: $titlebar_fg_color;
704
705
&:backdrop {
706
color: $titlebar_secondary_fg_color;
707
}
708
709
.title {
710
transition: $shorter_transition;
711
padding-left: 12px;
712
padding-right: 12px;
713
font-weight: bold;
714
}
715
716
.subtitle {
717
transition: $shorter_transition;
718
@extend .dim-label;
719
padding-left: 12px;
720
padding-right: 12px;
721
font-size: smaller;
722
}
723
724
.header-bar-separator,
725
& > GtkBox > .separator.vertical {
726
-GtkWidget-wide-separators: true;
727
-GtkWidget-separator-width: 1px;
728
border-style: solid;
729
border-width: 0 1px;
730
border-color: $border_color;
731
}
732
733
& .button:not(.suggested-action):not(.destructive-action) {
734
@extend %button.flat;
735
border-image: -gtk-gradient(radial,
736
center bottom, 0,
737
center bottom, 0.001,
738
to($titlebar_indicator_color),
739
to(transparent))
740
0 0 0 / 0 0 0px;
741
&:checked {
742
border-image: -gtk-gradient(radial,
743
center bottom, 0,
744
center bottom, 0.5,
745
to($titlebar_indicator_color),
746
to(transparent))
747
0 0 2 / 0 0 2px;
748
&, &:insensitive {
749
background-color: transparent;
750
}
751
}
752
}
753
754
.button.suggested-action, .button.destructive-action {
755
&:insensitive {
756
color: gtkalpha(currentColor, 0.5);
757
758
> .label { color: inherit; }
759
}
760
}
761
762
&.selection-mode {
763
// transition: background-color $shorter_duration $deceleration_curve;
764
box-shadow: $shadow_1, inset 0 1px $alt_highlight_color;
765
background-color: $primary_color;
766
color: $inverse_fg_color;
767
&:backdrop {
768
color: $inverse_secondary_fg_color;
769
}
770
771
.subtitle:link { @extend *:link:selected; }
772
773
.button {
774
border-image: -gtk-gradient(radial,
775
center bottom, 0,
776
center bottom, 0.001,
777
to($inverse_fg_color),
778
to(transparent))
779
0 0 0 / 0 0 0px;
780
color: $inverse_secondary_fg_color;
781
&:hover, &:active, &:checked {
782
color: $inverse_fg_color;
783
}
784
785
&:insensitive {
786
}
787
788
&:checked {
789
border-image: -gtk-gradient(radial,
790
center bottom, 0,
791
center bottom, 0.5,
792
to($inverse_fg_color),
793
to(transparent))
794
0 0 2 / 0 0 2px;
795
color: $inverse_fg_color;
796
&:insensitive {
797
color: $inverse_disabled_fg_color;
798
> .label { color: inherit; }
799
}
800
}
801
&.suggested-action {
802
// NOTE: do not use @extend .button;
803
@include button(normal);
804
&:hover { @include button(hover); }
805
&:active { @include button(active); }
806
&:insensitive { @include button(insensitive); }
807
}
808
}
809
810
.selection-menu {
811
padding-left: 16px;
812
padding-right: 16px;
813
814
GtkArrow { -GtkArrow-arrow-scaling: 1; }
815
816
.arrow {
817
-gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
818
}
819
}
820
}
821
822
.tiled &, .maximized & {
823
border-radius: 0; // squared corners when the window is max'd or tiled
824
box-shadow: none;
825
}
826
827
&.default-decoration {
828
padding: $container_padding;
829
border-width: 0;
830
.button { padding: 4px; }
831
}
832
833
// workaround for non-animatable buttons
834
.background:not(.csd) & .button.titlebutton:active {
835
background-image: -gtk-gradient(radial,
836
center center, 0,
837
center center, 0.4,
838
to($active_bg_color),
839
to(transparent));
840
}
841
}
842
843
/************
844
* Pathbars *
845
************/
846
847
.path-bar .button {
848
padding: 7px 6px 8px;
849
850
// the following is for spacing the icon and the label inside the home button
851
.label:last-child { padding-left: 2px; }
852
.label:first-child { padding-right: 2px; }
853
// .label:only-child { padding-right: 0; padding-left: 0; }
854
855
GtkImage { padding-top: 1px; }
856
GtkImage:only-child { padding-right: 4px; padding-left: 4px; }
857
}
858
859
/**************
860
* Tree Views *
861
**************/
862
GtkTreeView.view {
863
-GtkTreeView-grid-line-width: 1;
864
-GtkTreeView-grid-line-pattern: '';
865
-GtkTreeView-tree-line-width: 1;
866
-GtkTreeView-tree-line-pattern: '';
867
-GtkTreeView-expander-size: 16;
868
869
border-left-color: $checked_bg_color; // this is actually the tree lines color,
870
border-top-color: $border_color; // while this is the grid lines color, better then nothing
871
872
&.rubberband { @extend .rubberband; } // to avoid borders being overridden by the previously set props
873
874
border-radius: 0; // rest border radius in lists
875
876
&:hover, &:active, &:selected { border-radius: 0; }
877
878
&.dnd {
879
border-style: solid none;
880
border-width: 1px;
881
border-color: mix($fg_color, $primary_color, 50%);
882
}
883
884
&.expander {
885
-gtk-icon-source: -gtk-icontheme('pan-end-symbolic');
886
&:dir(rtl) { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic-rtl'); }
887
&:checked { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
888
&:selected {
889
color: $inverse_secondary_fg_color;
890
&:hover, &:active { color: $inverse_fg_color; }
891
}
892
}
893
894
&.progressbar { // progress bar in treeviews
895
@extend .entry.progressbar;
896
border-width: 4px;
897
&:selected {
898
border-color: currentColor;
899
}
900
}
901
902
&.trough { // progress bar trough in treeviews
903
@extend .entry.progressbar;
904
border-width: 4px;
905
border-color: rgba($primary_color, 0.3);
906
&:selected {
907
border-color: $checked_bg_color;
908
}
909
}
910
}
911
912
column-header {
913
.button {
914
@extend .list-row.activatable;
915
padding: 3px 6px 4px;
916
border-style: none solid solid none;
917
border-width: 1px;
918
border-color: $border_color;
919
border-radius: 0;
920
box-shadow: none;
921
background-color: $base_color;
922
// font-weight: bold;
923
&:hover, &:active {
924
box-shadow: none;
925
}
926
&:insensitive {
927
background-color: $base_color;
928
}
929
&.dnd {
930
@extend column-header.button.dnd;
931
}
932
}
933
&:last-child .button,
934
&:last-child.button { //treeview-like derived widgets in Banshee and Evolution
935
border-right-style: none;
936
}
937
}
938
939
column-header.button.dnd { // for treeview-like derive widgets
940
border-left-style: solid;
941
background-clip: $extra_background_clip;
942
color: $primary_color;
943
}
944
945
946
/*********
947
* Menus *
948
*********/
949
.menubar {
950
-GtkWidget-window-dragging: true;
951
padding: 0;
952
// box-shadow: inset 0 -1px $border_color;
953
background-color: $titlebar_bg_color;
954
& > .menuitem {
955
transition: $shorter_transition;
956
padding: 4px 8px;
957
color: $titlebar_secondary_fg_color;
958
&:hover { //Seems like it :hover even with keyboard focus
959
transition: none;
960
background-color: $titlebar_divider_color;
961
color: $titlebar_fg_color;
962
}
963
&:insensitive {
964
color: $titlebar_disabled_secondary_fg_color;
965
box-shadow: none;
966
}
967
}
968
}
969
970
.menu {
971
margin: 4px 0;
972
padding: 4px 0;
973
box-shadow: inset 0 1px $highlight_color;
974
background-color: $popup_bg_color;
975
border: 1px solid $border_color; // adds borders in a non composited env
976
.csd & {
977
border: none; // axes borders in a composited env
978
border-radius: $material_radius;
979
}
980
.menuitem {
981
transition: $shorter_transition;
982
padding: 3px 4px 4px;
983
font: initial;
984
text-shadow: none;
985
&:hover {
986
transition: none;
987
background-color: $divider_color;
988
}
989
&:insensitive {
990
color: $disabled_fg_color;
991
}
992
//submenu indicators
993
&.arrow { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic'); }
994
&.arrow:dir(rtl) {-gtk-icon-source:-gtk-icontheme('pan-end-symbolic-rtl'); }
995
}
996
&.button { // overlow buttons
997
border-style: none;
998
border-radius: 0;
999
box-shadow: none;
1000
&.top { border-bottom: 1px solid $border_color; }
1001
&.bottom { border-top: 1px solid $border_color; }
1002
&:hover { background-color: $divider_color; }
1003
&:insensitive {
1004
background-color: transparent;
1005
border-color: transparent;
1006
}
1007
}
1008
}
1009
1010
.menuitem .accelerator { color: $secondary_fg_color; }
1011
1012
.csd.popup { border-radius: $material_radius; }
1013
1014
1015
/***************
1016
* Popovers *
1017
***************/
1018
1019
.popover {
1020
transition: $shadow_transition;
1021
padding: 2px;
1022
border: 1px solid;
1023
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.3);
1024
border-radius: $material_radius + 1px;
1025
background-color: $popup_bg_color;
1026
box-shadow: $shadow_2; // TODO: this should really have a highlight
1027
&:backdrop { box-shadow: $shadow_1; }
1028
1029
> .list,
1030
> .view,
1031
> .toolbar,
1032
&.osd > .toolbar {
1033
border-style: none;
1034
border-image: none;
1035
background-color: transparent;
1036
}
1037
1038
.button.flat {
1039
padding: 5px 8px 6px;
1040
background-color: transparent;
1041
background-size: (128px / 0.8) (128px / 0.8);
1042
color: $fg_color;
1043
font: initial;
1044
}
1045
1046
.linked > .button {
1047
border-radius: $material_radius;
1048
@extend %simple_flat_button;
1049
&:checked {
1050
background-color: $primary_color;
1051
color: $inverse_fg_color;
1052
}
1053
&.image-button {
1054
padding: 8px;
1055
background-size: ($medium_size * 2 / 0.8) ($medium_size * 2 / 0.8);
1056
}
1057
}
1058
1059
// &.osd { @extend %osd; }
1060
}
1061
1062
/*****************
1063
* Notebooks and *
1064
* Tabs *
1065
*****************/
1066
1067
.notebook {
1068
// Through me you go to the grief wracked city;
1069
// Through me you go to everlasting pain;
1070
// Through me you go a pass among lost souls.
1071
// ...
1072
// Abandon all hope — Ye Who Enter Here
1073
padding: 0;
1074
background-color: $base_color;
1075
-GtkNotebook-initial-gap: 8;
1076
-GtkNotebook-arrow-spacing: 5;
1077
-GtkNotebook-tab-curvature: 0;
1078
-GtkNotebook-tab-overlap: 0;
1079
-GtkNotebook-has-tab-gap: false;
1080
-GtkWidget-focus-padding: 0;
1081
-GtkWidget-focus-line-width: 0;
1082
&.frame {
1083
border: 1px solid $border_color;
1084
// FIXME doesn't work
1085
&.top { border-top-width: 0; }
1086
&.bottom { border-bottom-width: 0; }
1087
&.right { border-right-width: 0; }
1088
&.left { border-left-width: 0; }
1089
}
1090
&.header {
1091
// FIXME: double borders in some case, can't fix it w/o a class tho
1092
// FIXME: doesn't work on dark var
1093
background-color: $bg_color;
1094
1095
// this is the shading of the header behind the tabs
1096
&.frame {
1097
border: 1px solid $border_color;
1098
&.top { border-bottom-width: 0; }
1099
&.bottom { border-top-width: 0; }
1100
&.right { border-left-width: 0; }
1101
&.left { border-right-width: 0; }
1102
}
1103
1104
&.top {
1105
box-shadow: inset 0 -1px $border_color; // border
1106
}
1107
&.bottom {
1108
box-shadow: inset 0 1px $border_color;
1109
}
1110
&.right {
1111
box-shadow: inset 1px 0 $border_color;
1112
}
1113
&.left {
1114
box-shadow: inset -1px 0 $border_color;
1115
}
1116
}
1117
tab {
1118
border-width: 0;
1119
border-style: solid;
1120
border-color: transparent;
1121
background-color: transparent;
1122
background-clip: border-box;
1123
1124
outline-offset: 0;
1125
1126
$tab_indicator_size: 2px;
1127
// vertical tab sizing
1128
$vt_vpadding: 8px;
1129
$vt_hpadding: 12px;
1130
// horizontal tab sizing
1131
$ht_vpadding: 8px;
1132
$ht_hpadding: 12px;
1133
1134
//FIXME: we get double border in some cases, not considering the broken
1135
//notebook content frame...
1136
&.top, &.bottom { padding: $vt_vpadding $vt_hpadding; }
1137
&.left, &.right { padding: $ht_vpadding $ht_hpadding; }
1138
1139
1140
/* works for testnotebookdnd, but there's a superfluous border
1141
in gedit or web, commented out for now, needs gtk fixes
1142
&.reorderable-page {
1143
&.top {
1144
padding-top: ($vt_vpadding - 1px);
1145
border-top-width: 1px;
1146
border-left-width: 1px;
1147
border-right-width: 1px;
1148
}
1149
&.bottom {
1150
padding-bottom: ($vt_vpadding - 1px);
1151
border-bottom-width: 1px;
1152
border-left-width: 1px;
1153
border-right-width: 1px;
1154
}
1155
&.left {
1156
padding-left: ($ht_hpadding - 1px);
1157
border-left-width: 1px;
1158
border-top-width: 1px;
1159
border-bottom-width: 1px;
1160
}
1161
&.right {
1162
padding-right: ($ht_hpadding - 1px);
1163
border-right-width: 1px;
1164
border-top-width: 1px;
1165
border-bottom-width: 1px;
1166
}
1167
}
1168
*/
1169
&.reorderable-page {
1170
&.top, &.bottom {
1171
padding-left: 12px; // for a nicer close button
1172
padding-right: 12px; // placement
1173
border-left-width: 1px;
1174
border-right-width: 1px;
1175
}
1176
&.left, &.right {
1177
border-bottom-width: 1px;
1178
border-top-width: 1px;
1179
}
1180
}
1181
&:hover, &.prelight-page { background-color: $hover_bg_color; }
1182
&:active, &.active-page { background-color: transparent; }
1183
&.top {
1184
&:active, &.active-page { box-shadow: inset 0 -2px $primary_color; }
1185
}
1186
&.bottom {
1187
&:active, &.active-page { box-shadow: inset 0 2px $primary_color; }
1188
}
1189
&.left {
1190
&:active, &.active-page { box-shadow: inset -2px 0 $primary_color; }
1191
}
1192
&.right {
1193
&:active, &.active-page { box-shadow: inset 2px 0 $primary_color; }
1194
}
1195
&.reorderable-page {
1196
&:active, &.active-page {
1197
border-color: $border_color;
1198
background-color: $base_color;
1199
background-clip: padding-box;
1200
}
1201
}
1202
.label { //tab text
1203
padding: 0 2px; // needed for a nicer focus ring
1204
font-weight: 500;
1205
color: $secondary_fg_color;
1206
}
1207
.prelight-page .label, .label.prelight-page {
1208
// prelight tab text
1209
color: $fg_color;
1210
}
1211
.active-page .label, .label.active-page {
1212
// active tab text
1213
color: $fg_color;
1214
}
1215
.button { //tab close button
1216
padding: 0;
1217
@extend %image_button;
1218
background-size: ($small_size / 0.8) ($small_size / 0.8);
1219
@extend %simple_flat_button;
1220
& > GtkImage { // this is a hack which makes tabs grow
1221
padding: 4px;
1222
}
1223
}
1224
}
1225
&.arrow {
1226
&:not(:hover):not(:active) { color: $secondary_fg_color; }
1227
&:insensitive {
1228
color: $disabled_secondary_fg_color;
1229
}
1230
}
1231
GtkGrid > .entry {
1232
@extend .entry.flat;
1233
}
1234
}
1235
1236
/**************
1237
* Scrollbars *
1238
**************/
1239
1240
$_slider_margin: 4px;
1241
$_slider_fine_tune_margin: 6px;
1242
1243
.scrollbar {
1244
-GtkRange-slider-width: 8 + $_slider_margin * 2 + 1;
1245
-GtkRange-trough-border: 0;
1246
-GtkScrollbar-has-backward-stepper: false;
1247
-GtkScrollbar-has-forward-stepper: false;
1248
-GtkScrollbar-min-slider-length: 24 + $_slider_margin * 2;
1249
// minimum size for the slider.
1250
// sadly can't be in '.slider'
1251
// where it belongs
1252
-GtkRange-stepper-spacing: 0;
1253
-GtkRange-trough-under-steppers: 1;
1254
1255
.button {
1256
border: none;
1257
}
1258
1259
&.overlay-indicator {
1260
&:not(.dragging):not(.hovering) { // Overlay scrolling indicator
1261
-GtkRange-slider-width: 4 + $_slider_margin * 2;
1262
1263
.slider {
1264
margin: $_slider_margin - 1px;
1265
border: 1px solid rgba($base_color, 0.3);
1266
// background-clip: padding-box;
1267
}
1268
1269
.trough {
1270
border-style: none;
1271
background-color: transparent;
1272
}
1273
1274
}
1275
1276
&.dragging,
1277
&.hovering {
1278
.trough {
1279
background-color: rgba($base_color, 0.9);
1280
}
1281
}
1282
}
1283
1284
// trough coloring
1285
.trough {
1286
border: 1px none $border_color;
1287
background-color: $base_color;
1288
background-clip: $extra_background_clip;
1289
}
1290
1291
// slider coloring
1292
.slider {
1293
background-color: $hint_fg_color;
1294
&:hover { background-color: $secondary_fg_color; }
1295
&:active { background-color: $fg_color; }
1296
&:insensitive {
1297
opacity: 0.5;
1298
}
1299
}
1300
1301
1302
// sizing
1303
.slider {
1304
border-radius: 100px;
1305
margin: $_slider_margin;
1306
}
1307
1308
&.fine-tune .slider { margin: $_slider_fine_tune_margin; }
1309
1310
&.vertical {
1311
1312
.slider {
1313
margin-left: 1px + $_slider_margin;
1314
1315
&:dir(rtl) {
1316
margin-left: $_slider_margin;
1317
margin-right: 1px + $_slider_margin;
1318
}
1319
}
1320
1321
&.fine-tune .slider {
1322
margin-left: 1px + $_slider_fine_tune_margin;
1323
1324
&:dir(rtl) {
1325
margin-left: $_slider_fine_tune_margin;
1326
margin-right: 1px + $_slider_fine_tune_margin;
1327
}
1328
}
1329
1330
.trough {
1331
border-left-style: solid;
1332
1333
&:dir(rtl) {
1334
border-left-style: none;
1335
border-right-style: solid;
1336
}
1337
}
1338
}
1339
1340
&.horizontal {
1341
1342
.slider { margin-top: 1px + $_slider_margin; }
1343
1344
&.fine-tune .slider { margin-top: 1px + $_slider_fine_tune_margin; }
1345
1346
.trough { border-top-style: solid; }
1347
}
1348
}
1349
1350
.scrollbars-junction,
1351
.scrollbars-junction.frame { // the small square between two scrollbars
1352
border-style: solid none none solid;
1353
background-color: $base_color;
1354
1355
&:dir(rtl) { border-style: solid solid none none; }
1356
}
1357
1358
1359
/**********
1360
* Switch *
1361
**********/
1362
1363
GtkSwitch {
1364
-GtkSwitch-slider-width: 20px;
1365
-GtkSwitch-slider-height: 20px;
1366
1367
outline-offset: -4px;
1368
outline-radius: 100px;
1369
font-size: 0;
1370
&:insensitive { opacity: 0.5; }
1371
&.trough {
1372
// similar to the .scale
1373
border: 8px solid transparent;
1374
border-radius: 100px;
1375
background-color: $track_color;
1376
// background-clip: padding-box;
1377
&:active {
1378
background-color: rgba($secondary_color, 0.5);
1379
}
1380
}
1381
&.slider {
1382
padding: 5px 4px;
1383
border-radius: 100px;
1384
box-shadow: 0 0 0 10px transparent, $shadow_1;
1385
background-color: $popup_bg_color;
1386
&:hover { box-shadow: 0 0 0 10px $hover_bg_color, $shadow_1; }
1387
&:active {
1388
background-color: $secondary_color;
1389
color: $secondary_color;
1390
}
1391
}
1392
.list-row:selected & {
1393
}
1394
1395
}
1396
1397
/*************************
1398
* Check and Radio items *
1399
*************************/
1400
1401
// draw regular check and radio items using our PNG assets
1402
// all assets are rendered from assets.svg. never add pngs directly
1403
1404
@each $w,$a in ('check', 'checkbox'),
1405
('radio', 'radio') {
1406
1407
//standard checks and radios
1408
@each $s,$as in ('', '-unchecked'),
1409
(':hover', '-unchecked-hover'),
1410
(':active', '-unchecked-active'),
1411
(':insensitive', '-unchecked-disabled'),
1412
(':inconsistent', '-mixed'),
1413
(':inconsistent:hover', '-mixed-hover'),
1414
(':inconsistent:active', '-mixed-active'),
1415
(':inconsistent:insensitive', '-mixed-disabled'),
1416
(':checked', '-checked'),
1417
(':checked:hover', '-checked-hover'),
1418
(':checked:active', '-checked-active'),
1419
(':checked:insensitive', '-checked-disabled') {
1420
.#{$w}#{$s} {
1421
-gtk-icon-source: -gtk-scaled(url("assets/#{$a}#{$as}#{$asset_suffix}.png"),
1422
url("assets/#{$a}#{$as}#{$asset_suffix}@2.png"));
1423
&.button.flat {}
1424
}
1425
}
1426
1427
//menu
1428
@each $s,$as in ('', '-unchecked'),
1429
(':insensitive', '-unchecked-disabled'),
1430
(':inconsistent', '-mixed'),
1431
(':inconsistent:insensitive', '-mixed-disabled'),
1432
(':checked', '-checked'),
1433
(':checked:insensitive', '-checked-disabled') {
1434
.menu .menuitem.#{$w}#{$s} {
1435
// color: $secondary_fg_color;
1436
// -gtk-icon-source: -gtk-icontheme('#{$a}-symbolic');
1437
// &:active, &:checked { -gtk-icon-source: -gtk-icontheme('#{$a}-checked-symbolic'); }
1438
// &:inconsistent { -gtk-icon-source: -gtk-icontheme('#{$a}-mixed-symbolic'); }
1439
-gtk-icon-source: -gtk-scaled(url("assets/menu-#{$a}#{$as}#{$asset_suffix}.png"),
1440
url("assets/menu-#{$a}#{$as}#{$asset_suffix}@2.png"));
1441
}
1442
}
1443
}
1444
1445
//treeview and list-rows
1446
.view.check, .view.radio,
1447
.list-row .check, list-row .radio {
1448
}
1449
1450
//selection-mode
1451
@each $s,$as in ('', '-unchecked'),
1452
(':checked', '-checked') {
1453
.view.content-view.check#{$s}:not(.list) {
1454
-gtk-icon-source: -gtk-scaled(url("assets/selectionmode-checkbox#{$as}#{$asset_suffix}.png"),
1455
url("assets/selectionmode-checkbox#{$as}#{$asset_suffix}@2.png"));
1456
background-color: transparent;
1457
icon-shadow: $shadow_1;
1458
&:hover, &:active { icon-shadow: $shadow_2; }
1459
// &:insensitive { icon-shadow: none; }
1460
}
1461
}
1462
1463
GtkCheckButton.text-button, GtkRadioButton.text-button {
1464
// this is for a nice focus on check and radios text
1465
padding: 2px 4px;
1466
outline-offset: 0;
1467
&:insensitive,
1468
&:insensitive:active,
1469
&:insensitive:inconsistent {
1470
// set insensitive color, which is overriden otherwise
1471
// color: $disabled_fg_color;
1472
}
1473
}
1474
1475
/************
1476
* GtkScale *
1477
************/
1478
.scale,
1479
.scale.scale-has-marks-above.scale-has-marks-below,
1480
.scale.vertical.scale-has-marks-above.scale-has-marks-below {
1481
// FIXME: rationalize
1482
-GtkScale-slider-length: 24;
1483
-GtkRange-slider-width: 24;
1484
-GtkRange-trough-border: 2;
1485
outline-offset: -8px;
1486
outline-radius: 100px;
1487
1488
&.fine-tune {
1489
&.slider { background-size: 50%; }
1490
}
1491
1492
&.slider {
1493
border-radius: 50%;
1494
background-repeat: no-repeat;
1495
background-position: center;
1496
@each $s,$as in ('', ''),
1497
(':insensitive', '-disabled') {
1498
&.slider#{$s} {
1499
$_url: 'assets/scale-slider#{$as}#{$asset_suffix}';
1500
background-image: -gtk-scaled(url('#{$_url}.png'),
1501
url('#{$_url}@2.png'));
1502
}
1503
}
1504
&:hover { background-color: rgba($secondary_color, 0.08); }
1505
&:active { background-color: rgba($secondary_color, 0.16); }
1506
//OSD sliders
1507
.osd & {
1508
}
1509
}
1510
&.trough {
1511
margin: 13px 14px;
1512
background-color: $checked_bg_color;
1513
&.highlight {
1514
background-color: $secondary_color;
1515
&:insensitive { background-color: $checked_bg_color; }
1516
}
1517
&:insensitive { color: $disabled_fg_color; }
1518
&.vertical { margin: 14px 13px; }
1519
//OSD troughs
1520
.osd & {
1521
}
1522
}
1523
// marks color
1524
&.separator {
1525
color: $checked_bg_color;
1526
}
1527
// scales on selected list rows
1528
.list-row:selected & {
1529
}
1530
}
1531
1532
@each $d,$dn in ('', 'horz'),
1533
('.vertical', 'vert') {
1534
@each $w,$we in ('scale-has-marks-below', 'marks-after'),
1535
('scale-has-marks-above', 'marks-before') {
1536
.scale#{$d}.#{$w} {
1537
@each $s,$as in ('', ''),
1538
(':insensitive', '-disabled') {
1539
&.slider#{$s} {
1540
$_url: 'assets/scale-#{$dn}-#{$we}-slider#{$as}#{$asset_suffix}';
1541
background-image: -gtk-scaled(url('#{$_url}.png'),
1542
url('#{$_url}@2.png'));
1543
}
1544
}
1545
}
1546
}
1547
}
1548
1549
/*****************
1550
* Progress bars *
1551
*****************/
1552
1553
GtkProgressBar {
1554
-GtkProgressBar-min-horizontal-bar-height: 4;
1555
-GtkProgressBar-min-vertical-bar-width: 4;
1556
padding: 0;
1557
font-size: smaller;
1558
color: $hint_fg_color;
1559
&.osd {
1560
-GtkProgressBar-xspacing: 0;
1561
-GtkProgressBar-yspacing: 0;
1562
-GtkProgressBar-min-horizontal-bar-height: 4;
1563
}
1564
&.trough { // background
1565
border-radius: 0;
1566
background-color: rgba($primary_color, 0.3);
1567
&.osd {
1568
border-style: none;
1569
box-shadow: none;
1570
// background-color: transparent;
1571
}
1572
}
1573
}
1574
1575
// moving bit
1576
.progressbar {
1577
border-radius: 0;
1578
background-color: $primary_color;
1579
&.left {
1580
border-top-left-radius: 0;
1581
border-bottom-left-radius: 0;
1582
}
1583
&.right {
1584
border-top-right-radius: 0;
1585
border-bottom-right-radius: 0;
1586
}
1587
&.left.right {
1588
box-shadow: none;
1589
}
1590
&.vertical {
1591
&.bottom {
1592
border-bottom-left-radius: 0;
1593
border-bottom-right-radius: 0;
1594
box-shadow: none;
1595
}
1596
&.top {
1597
border-top-left-radius: 0;
1598
border-top-right-radius: 0;
1599
}
1600
}
1601
&.osd {
1602
background-image: none;
1603
background-color: $primary_color;
1604
border-style: none;
1605
border-radius: 0;
1606
}
1607
}
1608
1609
1610
/*************
1611
* Level Bar *
1612
*************/
1613
1614
.level-bar {
1615
-GtkLevelBar-min-block-width: 36;
1616
-GtkLevelBar-min-block-height: 4;
1617
&.vertical {
1618
-GtkLevelBar-min-block-width: 4;
1619
-GtkLevelBar-min-block-height: 36;
1620
}
1621
&.trough {
1622
}
1623
&.fill-block {
1624
// FIXME: it would be nice to set make fill blocks bigger, but we'd need
1625
// :nth-child working on discrete indicators
1626
background-color: $primary_color;
1627
&.indicator-discrete {
1628
&.horizontal { margin: 0 1px; }
1629
&.vertical { margin: 1px 0; }
1630
}
1631
&.level-high {
1632
background-color: $success_color;
1633
}
1634
&.level-low {
1635
background-color: $warning_color;
1636
}
1637
&.empty-fill-block {
1638
background-color: $divider_color;
1639
}
1640
}
1641
}
1642
1643
1644
/**********
1645
* Frames *
1646
**********/
1647
.frame {
1648
border: 1px solid $border_color;
1649
&.flat { border-style: none; }
1650
padding: 0;
1651
&.action-bar {
1652
padding: $container_padding;
1653
border-width: 1px 0 0;
1654
.button:not(.suggested-action):not(.destructive-action) { @extend %button.flat; }
1655
}
1656
}
1657
1658
GtkScrolledWindow {
1659
GtkViewport.frame { // avoid double borders when viewport inside
1660
// scrolled window
1661
border-style: none;
1662
}
1663
}
1664
1665
//vbox and hbox separators
1666
.separator {
1667
// always disable separators
1668
// -GtkWidget-wide-separators: true;
1669
color: $border_color;
1670
1671
// Font and File button separators
1672
GtkFileChooserButton &.vertical,
1673
GtkFontButton &.vertical {
1674
// always disable separators
1675
-GtkWidget-wide-separators: true;
1676
}
1677
}
1678
1679
/*********
1680
* Lists *
1681
*********/
1682
1683
.list {
1684
border-color: $border_color;
1685
background-color: $base_color;
1686
}
1687
1688
.list-row,
1689
.grid-child {
1690
padding: 2px;
1691
}
1692
1693
// FIXME
1694
$row_transition: $shorter_transition, background-color 0, color 0;
1695
1696
.list-row.activatable {
1697
transition: $row_transition, background-image $longer_duration * 4 $deceleration_curve;
1698
box-shadow: inset 0 0 0 10000px transparent;
1699
background-image: -gtk-gradient(radial,
1700
center center, 0,
1701
center center, 0.5,
1702
to(transparent),
1703
to(transparent));
1704
background-repeat: no-repeat;
1705
background-position: center;
1706
background-size: (192px / 0.8) (192px / 0.8);
1707
&:hover {
1708
transition: $row_transition, background-image $longer_duration * 4 $deceleration_curve, box-shadow 0;
1709
box-shadow: inset 0 0 0 10000px $hover_bg_color;
1710
}
1711
&:active {
1712
transition: $row_transition, background-image 0;
1713
animation: ripple_effect $longer_duration $deceleration_curve forwards;
1714
box-shadow: inset 0 0 0 10000px $hover_bg_color;
1715
}
1716
}
1717
1718
.list-row:selected {
1719
@extend %selected_items;
1720
.button {
1721
&:insensitive { color: $inverse_disabled_secondary_fg_color; }
1722
&.flat {
1723
color: $inverse_secondary_fg_color;
1724
&:hover, &:active { color: $inverse_fg_color; }
1725
&:insensitive { color: $inverse_disabled_secondary_fg_color; }
1726
}
1727
}
1728
}
1729
1730
// transition
1731
.list-row {
1732
// &:hover { transition-duration: 0; }
1733
}
1734
1735
1736
/*********************
1737
* App Notifications *
1738
*********************/
1739
1740
.app-notification,
1741
.app-notification.frame {
1742
// @extend %osd;
1743
@extend .toolbar.osd;
1744
.button { @extend %button.flat; }
1745
}
1746
1747
/*************
1748
* Expanders *
1749
*************/
1750
1751
.expander {
1752
-gtk-icon-source: -gtk-icontheme('pan-end-symbolic');
1753
&:dir(rtl) { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic-rtl'); }
1754
&:checked { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
1755
&:not(:hover):not(:active) { color: gtkalpha(currentColor, 0.7); }
1756
&:selected { color: $inverse_fg_color; }
1757
}
1758
1759
/************
1760
* Calendar *
1761
***********/
1762
GtkCalendar {
1763
padding: 1px;
1764
border: 1px solid $border_color;
1765
color: $fg_color;
1766
1767
&:insensitive { color: $disabled_fg_color; }
1768
1769
&:selected {
1770
@extend .view:selected;
1771
1772
border-radius: $material_radius + 1px;
1773
}
1774
1775
&.header {
1776
border-style: none none solid;
1777
border-radius: 0;
1778
}
1779
1780
&.button {
1781
@extend %simple_flat_button;
1782
}
1783
1784
&:inconsistent { color: $disabled_secondary_fg_color; }
1785
&.highlight {
1786
font-size: smaller;
1787
color: $secondary_fg_color;
1788
}
1789
}
1790
1791
/***********
1792
* Dialogs *
1793
***********/
1794
1795
.message-dialog .dialog-action-area .button {
1796
padding: 8px;
1797
}
1798
1799
.message-dialog { // Message Dialog styling
1800
&.background { background-color: $popup_bg_color; }
1801
.titlebar {
1802
border-style: none;
1803
box-shadow: inset 0 1px $highlight_color;
1804
background-color: $popup_bg_color;
1805
}
1806
&.csd { // rounded bottom border styling for csd version
1807
&.background {
1808
// bigger radius for better antialiasing
1809
border-bottom-left-radius: $material_radius;
1810
border-bottom-right-radius: $material_radius;
1811
}
1812
.dialog-action-area .button {
1813
@extend %simple_flat_button;
1814
padding: 9px 16px 10px;
1815
border-top: 1px solid $border_color;
1816
border-radius: 0;
1817
background-size: (192px / 0.8) (192px / 0.8);
1818
// &:first-child{ border-bottom-left-radius: $material_radius; }
1819
// &:last-child { border-bottom-right-radius: $material_radius; }
1820
&:first-child{ border-radius: 0 0 0 $material_radius; }
1821
&:last-child { border-radius: 0 0 $material_radius 0; }
1822
}
1823
}
1824
}
1825
1826
GtkFileChooserDialog {
1827
.search-bar {
1828
// background-color: $base_color;
1829
// border-color: $bg_color;
1830
}
1831
.dialog-action-box {
1832
border-top: 1px solid $border_color;
1833
}
1834
}
1835
1836
/***********
1837
* Sidebar *
1838
***********/
1839
1840
.sidebar {
1841
border: none;
1842
background-color: $alt_base_color;
1843
1844
&:selected {
1845
@extend %selected_items;
1846
}
1847
}
1848
1849
GtkSidebarRow {
1850
// Needs overriding of the GtkListBoxRow padding
1851
&.list-row {
1852
padding: 0px;
1853
}
1854
// Using margins/padding directly in the SidebarRow
1855
// will make the animation of the new bookmark row jump
1856
.sidebar-revealer {
1857
padding: 4px 14px 4px 12px;
1858
}
1859
.sidebar-icon {
1860
opacity: 0.7; // dim the device icons
1861
&:dir(ltr) { padding-right: 8px; }
1862
&:dir(rtl) { padding-left: 8px; }
1863
}
1864
.sidebar-label {
1865
&:dir(ltr) { padding-right: 2px; }
1866
&:dir(rtl) { padding-left: 2px; }
1867
}
1868
}
1869
1870
GtkPlacesSidebar.sidebar {
1871
// looks like the label doesn't get all the states so work around
1872
.list-row:selected:insensitive .label { @extend %selected_items:insensitive; }
1873
1874
.sidebar-placeholder-row {
1875
border: solid 1px $primary_color;
1876
}
1877
1878
.sidebar-new-bookmark-row {
1879
color: $secondary_color;
1880
}
1881
1882
@at-root .sidebar-button.button { // @at-root needded to not change the specificity making button styling inheritance broken
1883
// so istead of "GtkPlacesSidebar.sidebar .sidebar-button.button" [specificity 0,0,3,1]
1884
// the extended selector ".sidebar-button.button" [specificity 0,0,2,0]
1885
1886
&.image-button { padding: 4px; }
1887
1888
@extend %simple_flat_button;
1889
}
1890
// this is for indicating which sidebar row generated a popover
1891
// see https://bugzilla.gnome.org/show_bug.cgi?id=754411
1892
.has-open-popup { @extend .list-row.activatable:active; }
1893
}
1894
1895
.sidebar-item {
1896
padding: 10px 4px;
1897
> .label {
1898
padding-left: 6px;
1899
padding-right: 6px;
1900
}
1901
&.needs-attention > .label {
1902
@extend %needs_attention;
1903
}
1904
}
1905
1906
1907
/****************
1908
* File chooser *
1909
****************/
1910
1911
GtkPlacesView {
1912
.server-list-button > GtkImage { -gtk-icon-transform: rotate(0turn); }
1913
1914
.server-list-button:checked > GtkImage { -gtk-icon-transform: rotate(-0.5turn); }
1915
}
1916
1917
1918
/*********
1919
* Paned *
1920
*********/
1921
1922
GtkPaned { // this is for the standard paned separator
1923
1924
-GtkPaned-handle-size: 1; // sets separator width
1925
1926
-gtk-icon-source: none; // removes handle decoration
1927
margin: 0 8px 8px 0; // drag area of the separator, not a real margin
1928
&:dir(rtl) {
1929
margin-right: 0;
1930
margin-left: 8px;
1931
}
1932
.pane-separator {
1933
background-color: $border_color;
1934
}
1935
}
1936
1937
GtkPaned.wide { // this is for the paned with wide separator
1938
-GtkPaned-handle-size: 6; // wider separator here
1939
margin: 0; // no need of the invisible drag area so, reset margin
1940
.pane-separator {
1941
background-color: transparent;
1942
border-style: none solid;
1943
border-color: $border_color;
1944
border-width: 1px;
1945
}
1946
&.vertical .pane-separator { border-style: solid none;}
1947
}
1948
1949
1950
/**************
1951
* GtkInfoBar *
1952
**************/
1953
GtkInfoBar {
1954
border-style: none;
1955
}
1956
1957
.info {
1958
background-color: $info_bg_color;
1959
}
1960
1961
.question {
1962
background-color: $question_bg_color;
1963
}
1964
1965
.warning {
1966
background-color: $warning_bg_color;
1967
}
1968
1969
.error {
1970
background-color: $error_bg_color;
1971
}
1972
1973
.info,
1974
.question,
1975
.warning,
1976
.error {
1977
color: $inverse_fg_color;
1978
.button {
1979
// @extend .list-row:selected.button;
1980
&:insensitive { color: $inverse_disabled_secondary_fg_color; }
1981
}
1982
.label:selected {
1983
}
1984
}
1985
1986
/************
1987
* Tooltips *
1988
************/
1989
1990
.tooltip {
1991
&.background {
1992
// background-color needs to be set this way otherwise it gets drawn twice
1993
// see https://bugzilla.gnome.org/show_bug.cgi?id=736155 for details.
1994
// box-shadow: inset 0 1px $highlight_color;
1995
background-color: $tooltip_bg_color;
1996
}
1997
1998
color: $tooltip_fg_color;
1999
padding: 4px; /* not working */
2000
border-radius: $material_radius;
2001
box-shadow: none; // otherwise it gets inherited by windowframe.csd
2002
// FIXME: we need a border or tooltips vanish on black background.
2003
&.window-frame.csd {
2004
background-color: transparent;
2005
}
2006
}
2007
2008
.tooltip * { //Yeah this is ugly
2009
padding: 0 2px;
2010
background-color: transparent;
2011
color: inherit; // just to be sure
2012
}
2013
2014
/*****************
2015
* Color Chooser *
2016
*****************/
2017
2018
GtkColorSwatch {
2019
// This widget is made of two boxes one on top of the other, the lower box is GtkColorSwatch {} the other one
2020
// is GtkColorSwatch > .overlay {}, GtkColorSwatch has the programmatically set background, so most of the style
2021
// is applied to the overlay box.
2022
2023
transition: $shadow_transition;
2024
box-shadow: $shadow_1;
2025
2026
// we need to re-set the shadow here since it get axed by the previous bit
2027
&:selected { }
2028
&:insensitive {
2029
opacity: 0.5;
2030
box-shadow: none;
2031
}
2032
2033
// base color corners rounding
2034
// to avoid the artifacts caused by rounded corner anti-aliasing the base color
2035
// sports a bigger radius.
2036
// nth-child is needed by the custom color strip.
2037
// The :not() madness is needed since actually the overlay is selectable by GtkColorSwatch > .overlay
2038
// and GtkColorSwatch.overlay, I know it's weird, but this is gtk+, not a browser.
2039
&.top {
2040
border-top-left-radius: $material_radius;
2041
border-top-right-radius: $material_radius;
2042
}
2043
&.bottom {
2044
border-bottom-left-radius: $material_radius;
2045
border-bottom-right-radius: $material_radius;
2046
}
2047
&.left, &:first-child:not(.overlay):not(.top) {
2048
border-top-left-radius: $material_radius;
2049
border-bottom-left-radius: $material_radius;
2050
}
2051
&.right, &:last-child:not(.overlay):not(.bottom) {
2052
border-top-right-radius: $material_radius;
2053
border-bottom-right-radius: $material_radius;
2054
}
2055
&:only-child:not(.overlay) { border-radius: $material_radius; }
2056
2057
// overlay corner rounding
2058
&.top > .overlay {
2059
border-top-left-radius: $material_radius;
2060
border-top-right-radius: $material_radius;
2061
}
2062
&.bottom > .overlay {
2063
border-bottom-left-radius: $material_radius;
2064
border-bottom-right-radius: $material_radius;
2065
}
2066
&:first-child:not(.top) > .overlay {
2067
border-top-left-radius: $material_radius;
2068
border-bottom-left-radius: $material_radius;
2069
}
2070
&:last-child:not(.bottom) > .overlay {
2071
border-top-right-radius: $material_radius;
2072
border-bottom-right-radius: $material_radius;
2073
}
2074
&:only-child > .overlay { border-radius: $material_radius; }
2075
2076
// hover effect
2077
&:hover { box-shadow: $shadow_2; }
2078
2079
// no hover effect for the colorswatch in the color editor
2080
GtkColorEditor & {
2081
border-radius: $material_radius; // same radius as the entry
2082
&:hover { box-shadow: $shadow_1; }
2083
}
2084
2085
// indicator and keynav outline colors
2086
&.color-dark {
2087
color: $light_fg_color;
2088
}
2089
&.color-light {
2090
color: $dark_fg_color;
2091
}
2092
2093
// border color
2094
&.overlay,
2095
&.overlay:selected {
2096
}
2097
2098
// make the add color button looks like, well, a button
2099
&#add-color-button {
2100
background-image: linear-gradient(to right,
2101
$error_bg_color 25%,
2102
$warning_bg_color 25%, $warning_bg_color 50%,
2103
$info_bg_color 50%, $info_bg_color 75%,
2104
$question_bg_color 75%);
2105
color: $light_fg_color;
2106
}
2107
}
2108
2109
2110
/********
2111
* Misc *
2112
********/
2113
2114
//content view (grid/list)
2115
.content-view {
2116
background-color: $bg_color;
2117
// &:hover { -gtk-image-effect: highlight; }
2118
&.rubberband { @extend .rubberband; }
2119
}
2120
2121
.scale-popup {
2122
2123
// .osd & { @extend %osd; }
2124
2125
.osd & .button.flat { //FIXME: quick hack, redo properly
2126
}
2127
2128
.button { // +/- buttons on GtkVolumeButton popup
2129
padding: 10px;
2130
}
2131
}
2132
2133
GtkScaleButton.button,
2134
GtkVolumeButton.button {
2135
// I assume both are image-button *by default*
2136
// with the image-button/text-button classes automagically applied depending on the button child these selectors can be deleted.
2137
@extend %image_button;
2138
2139
&.text-button { @extend .text-button }
2140
}
2141
2142
/**********************
2143
* Window Decorations *
2144
*********************/
2145
2146
.window-frame {
2147
transition: $shadow_transition;
2148
border-radius: $material_radius $material_radius 0 0;
2149
box-shadow: $shadow_4;
2150
2151
// FIXME rationalize window-frame shadows
2152
2153
/* this is used for the resize cursor area */
2154
margin: 8px;
2155
2156
&:backdrop {
2157
box-shadow: $shadow_2;
2158
}
2159
&.tiled {
2160
border-radius: 0;
2161
}
2162
&.popup {
2163
box-shadow: none;
2164
}
2165
// server-side decorations as used by mutter
2166
&.ssd {
2167
box-shadow: 0 3px 3px rgba(0, 0, 0, 0.16); //just doing borders, wm draws actual shadows
2168
}
2169
&.csd {
2170
&.popup {
2171
border-radius: $material_radius;
2172
box-shadow: $shadow_2;
2173
}
2174
&.tooltip {
2175
border-radius: $material_radius;
2176
box-shadow: none;
2177
}
2178
&.message-dialog {
2179
border-radius: $material_radius;
2180
box-shadow: $shadow_4;
2181
&:backdrop { box-shadow: $shadow_2; }
2182
}
2183
}
2184
&.solid-csd {
2185
border-radius: 0;
2186
margin: 0;
2187
background-color: $titlebar_bg_color;
2188
box-shadow: none;
2189
}
2190
}
2191
2192
// Window Close button
2193
.header-bar .button.titlebutton,
2194
.titlebar .button.titlebutton {
2195
// @extend %simple_flat_button;
2196
@extend %image_button;
2197
}
2198
2199
// catch all extend :)
2200
2201
%selected_items {
2202
background-color: $primary_color;
2203
color: $inverse_fg_color;
2204
&:insensitive { color: $inverse_disabled_fg_color; }
2205
}
2206
2207
.monospace {
2208
font: Monospace;
2209
}
2210
2211
/**********************
2212
* Touch Copy & Paste *
2213
*********************/
2214
2215
//touch selection handlebars for the Popover.osd above
2216
.entry.cursor-handle,
2217
.cursor-handle {
2218
background-color: $secondary_color;
2219
background-image: none;
2220
box-shadow: none;
2221
border-style: none;
2222
@each $s,$as in ('', '') { //no need for insensitive and backdrop
2223
&.top#{$s}:dir(ltr), &.bottom#{$s}:dir(rtl) {
2224
// $_url: 'assets/text-select-start#{$as}#{$asset_suffix}';
2225
// -gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
2226
// url('#{$_url}@2.png'));
2227
// padding-left: 10px;
2228
}
2229
&.bottom#{$s}:dir(ltr), &.top#{$s}:dir(rtl) {
2230
// $_url: 'assets/text-select-end#{$as}#{$asset_suffix}';
2231
// -gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
2232
// url('#{$_url}@2.png'));
2233
// padding-right: 10px;
2234
}
2235
&.insertion-cursor#{$s}:dir(ltr), &.insertion-cursor#{$s}:dir(rtl) {
2236
$_url: 'assets/scale-horz-marks-before-slider#{$as}#{$asset_suffix}';
2237
-gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
2238
url('#{$_url}@2.png'));
2239
}
2240
}
2241
}
2242
2243
/* Decouple the font of context menus from their entry/textview */
2244
.context-menu {
2245
font: initial;
2246
}
2247
2248
.touch-selection {
2249
font: initial;
2250
color: $fg_color;
2251
background-color: $popup_bg_color;
2252
box-shadow: $shadow_2;
2253
&:backdrop { box-shadow: $shadow_1; }
2254
.button {
2255
}
2256
}
2257
2258
// This is used by GtkScrolledWindow, when content is touch-dragged past boundaries.
2259
// This draws a box on top of the content, the size changes programmatically.
2260
.overshoot {
2261
&.top {
2262
@include overshoot(top);
2263
}
2264
&.bottom {
2265
@include overshoot(bottom);
2266
}
2267
&.left {
2268
@include overshoot(left);
2269
}
2270
&.right {
2271
@include overshoot(right);
2272
}
2273
}
2274
2275
// Overflow indication, works similarly to the overshoot, the size if fixed tho.
2276
.undershoot {
2277
&.top {
2278
@include undershoot(top);
2279
}
2280
2281
&.bottom {
2282
@include undershoot(bottom);
2283
}
2284
2285
&.left {
2286
@include undershoot(left);
2287
}
2288
2289
&.right {
2290
@include undershoot(right);
2291
}
2292
}
2293