_common-3.18.scss
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: $fill_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, center;
291
background-size: ($medium_size * 2 / 0.8) ($medium_size * 2 / 0.8), auto;
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), auto;
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: $fill_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), auto;
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), auto;
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: $fill_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
834
/************
835
* Pathbars *
836
************/
837
838
.path-bar .button {
839
padding: 7px 6px 8px;
840
841
// the following is for spacing the icon and the label inside the home button
842
.label:last-child { padding-left: 2px; }
843
.label:first-child { padding-right: 2px; }
844
// .label:only-child { padding-right: 0; padding-left: 0; }
845
846
GtkImage { padding-top: 1px; }
847
GtkImage:only-child { padding-right: 4px; padding-left: 4px; }
848
}
849
850
/**************
851
* Tree Views *
852
**************/
853
GtkTreeView.view {
854
-GtkTreeView-grid-line-width: 1;
855
-GtkTreeView-grid-line-pattern: '';
856
-GtkTreeView-tree-line-width: 1;
857
-GtkTreeView-tree-line-pattern: '';
858
-GtkTreeView-expander-size: 16;
859
860
border-left-color: $fill_color; // this is actually the tree lines color,
861
border-top-color: $border_color; // while this is the grid lines color, better then nothing
862
863
&.rubberband { @extend .rubberband; } // to avoid borders being overridden by the previously set props
864
865
border-radius: 0; // rest border radius in lists
866
867
&:hover, &:active, &:selected { border-radius: 0; }
868
869
&.dnd {
870
border-style: solid none;
871
border-width: 1px;
872
border-color: mix($fg_color, $primary_color, 50%);
873
}
874
875
&.expander {
876
-gtk-icon-source: -gtk-icontheme('pan-end-symbolic');
877
&:dir(rtl) { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic-rtl'); }
878
&:checked { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
879
&:selected {
880
color: $inverse_secondary_fg_color;
881
&:hover, &:active { color: $inverse_fg_color; }
882
}
883
}
884
885
&.progressbar { // progress bar in treeviews
886
@extend .entry.progressbar;
887
border-width: 4px;
888
&:selected {
889
border-color: currentColor;
890
}
891
}
892
893
&.trough { // progress bar trough in treeviews
894
@extend .entry.progressbar;
895
border-width: 4px;
896
border-color: rgba($primary_color, 0.3);
897
&:selected {
898
border-color: $fill_color;
899
}
900
}
901
}
902
903
column-header {
904
.button {
905
@extend .list-row.activatable;
906
padding: 3px 6px 4px;
907
border-style: none solid solid none;
908
border-width: 1px;
909
border-color: $border_color;
910
border-radius: 0;
911
box-shadow: none;
912
background-color: $base_color;
913
// font-weight: bold;
914
&:hover, &:active {
915
box-shadow: none;
916
}
917
&:insensitive {
918
background-color: $base_color;
919
}
920
&.dnd {
921
@extend column-header.button.dnd;
922
}
923
}
924
&:last-child .button,
925
&:last-child.button { //treeview-like derived widgets in Banshee and Evolution
926
border-right-style: none;
927
}
928
}
929
930
column-header.button.dnd { // for treeview-like derive widgets
931
border-left-style: solid;
932
background-clip: $extra_background_clip;
933
color: $primary_color;
934
}
935
936
937
/*********
938
* Menus *
939
*********/
940
.menubar {
941
-GtkWidget-window-dragging: true;
942
padding: 0;
943
// box-shadow: inset 0 -1px $border_color;
944
background-color: $titlebar_bg_color;
945
& > .menuitem {
946
transition: $shorter_transition;
947
padding: 4px 8px;
948
color: $titlebar_secondary_fg_color;
949
&:hover { //Seems like it :hover even with keyboard focus
950
transition: none;
951
background-color: $titlebar_divider_color;
952
color: $titlebar_fg_color;
953
}
954
&:insensitive {
955
color: $titlebar_disabled_secondary_fg_color;
956
box-shadow: none;
957
}
958
}
959
}
960
961
.menu {
962
margin: 4px 0;
963
padding: 4px 0;
964
box-shadow: inset 0 1px $highlight_color;
965
background-color: $popup_bg_color;
966
border: 1px solid $border_color; // adds borders in a non composited env
967
.csd & {
968
border: none; // axes borders in a composited env
969
border-radius: $material_radius;
970
}
971
.menuitem {
972
transition: $shorter_transition;
973
padding: 3px 4px 4px;
974
font: initial;
975
text-shadow: none;
976
&:hover {
977
transition: none;
978
background-color: $divider_color;
979
}
980
&:insensitive {
981
color: $disabled_fg_color;
982
}
983
//submenu indicators
984
&.arrow { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic'); }
985
&.arrow:dir(rtl) {-gtk-icon-source:-gtk-icontheme('pan-end-symbolic-rtl'); }
986
}
987
&.button { // overlow buttons
988
border-style: none;
989
border-radius: 0;
990
box-shadow: none;
991
&.top { border-bottom: 1px solid $border_color; }
992
&.bottom { border-top: 1px solid $border_color; }
993
&:hover { background-color: $divider_color; }
994
&:insensitive {
995
background-color: transparent;
996
border-color: transparent;
997
}
998
}
999
}
1000
1001
.menuitem .accelerator { color: $secondary_fg_color; }
1002
1003
.csd.popup { border-radius: $material_radius; }
1004
1005
1006
/***************
1007
* Popovers *
1008
***************/
1009
1010
.popover {
1011
transition: $shadow_transition;
1012
padding: 2px;
1013
border: 1px solid;
1014
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.3);
1015
border-radius: $material_radius + 1px;
1016
background-color: $popup_bg_color;
1017
box-shadow: $shadow_2; // TODO: this should really have a highlight
1018
&:backdrop { box-shadow: $shadow_1; }
1019
1020
> .list,
1021
> .view,
1022
> .toolbar,
1023
&.osd > .toolbar {
1024
border-style: none;
1025
border-image: none;
1026
background-color: transparent;
1027
}
1028
1029
.button.flat {
1030
padding: 5px 8px 6px;
1031
background-color: transparent;
1032
background-size: (128px / 0.8) (128px / 0.8), auto;
1033
color: $fg_color;
1034
font: initial;
1035
}
1036
1037
.linked > .button {
1038
border-radius: $material_radius;
1039
@extend %simple_flat_button;
1040
&:checked {
1041
background-color: $primary_color;
1042
color: $inverse_fg_color;
1043
}
1044
&.image-button {
1045
padding: 8px;
1046
background-size: ($medium_size * 2 / 0.8) ($medium_size * 2 / 0.8), auto;
1047
}
1048
}
1049
1050
// &.osd { @extend %osd; }
1051
}
1052
1053
/*****************
1054
* Notebooks and *
1055
* Tabs *
1056
*****************/
1057
1058
.notebook {
1059
// Through me you go to the grief wracked city;
1060
// Through me you go to everlasting pain;
1061
// Through me you go a pass among lost souls.
1062
// ...
1063
// Abandon all hope — Ye Who Enter Here
1064
padding: 0;
1065
background-color: $base_color;
1066
-GtkNotebook-initial-gap: 8;
1067
-GtkNotebook-arrow-spacing: 5;
1068
-GtkNotebook-tab-curvature: 0;
1069
-GtkNotebook-tab-overlap: 1;
1070
-GtkNotebook-has-tab-gap: false;
1071
-GtkWidget-focus-padding: 0;
1072
-GtkWidget-focus-line-width: 0;
1073
&.frame {
1074
border: 1px solid $border_color;
1075
// FIXME doesn't work
1076
&.top { border-top-width: 0; }
1077
&.bottom { border-bottom-width: 0; }
1078
&.right { border-right-width: 0; }
1079
&.left { border-left-width: 0; }
1080
}
1081
&.header {
1082
// FIXME: double borders in some case, can't fix it w/o a class tho
1083
// FIXME: doesn't work on dark var
1084
background-color: $bg_color;
1085
1086
// this is the shading of the header behind the tabs
1087
&.frame {
1088
border: 1px solid $border_color;
1089
&.top { border-bottom-width: 0; }
1090
&.bottom { border-top-width: 0; }
1091
&.right { border-left-width: 0; }
1092
&.left { border-right-width: 0; }
1093
}
1094
1095
&.top {
1096
box-shadow: inset 0 -1px $border_color; // border
1097
}
1098
&.bottom {
1099
box-shadow: inset 0 1px $border_color;
1100
}
1101
&.right {
1102
box-shadow: inset 1px 0 $border_color;
1103
}
1104
&.left {
1105
box-shadow: inset -1px 0 $border_color;
1106
}
1107
}
1108
tab {
1109
border-width: 0;
1110
border-style: solid;
1111
border-color: transparent;
1112
background-color: transparent;
1113
1114
outline-offset: 0;
1115
1116
$tab_indicator_size: 2px;
1117
// vertical tab sizing
1118
$vt_vpadding: 8px;
1119
$vt_hpadding: 12px;
1120
// horizontal tab sizing
1121
$ht_vpadding: 8px;
1122
$ht_hpadding: 12px;
1123
1124
//FIXME: we get double border in some cases, not considering the broken
1125
//notebook content frame...
1126
&.top, &.bottom { padding: $vt_vpadding $vt_hpadding; }
1127
&.left, &.right { padding: $ht_vpadding $ht_hpadding; }
1128
1129
1130
/* works for testnotebookdnd, but there's a superfluous border
1131
in gedit or web, commented out for now, needs gtk fixes
1132
&.reorderable-page {
1133
&.top {
1134
padding-top: ($vt_vpadding - 1px);
1135
border-top-width: 1px;
1136
border-left-width: 1px;
1137
border-right-width: 1px;
1138
}
1139
&.bottom {
1140
padding-bottom: ($vt_vpadding - 1px);
1141
border-bottom-width: 1px;
1142
border-left-width: 1px;
1143
border-right-width: 1px;
1144
}
1145
&.left {
1146
padding-left: ($ht_hpadding - 1px);
1147
border-left-width: 1px;
1148
border-top-width: 1px;
1149
border-bottom-width: 1px;
1150
}
1151
&.right {
1152
padding-right: ($ht_hpadding - 1px);
1153
border-right-width: 1px;
1154
border-top-width: 1px;
1155
border-bottom-width: 1px;
1156
}
1157
}
1158
*/
1159
&.reorderable-page {
1160
-GtkNotebook-tab-overlap: 1;
1161
&.top, &.bottom {
1162
padding-left: 12px; // for a nicer close button
1163
padding-right: 12px; // placement
1164
border-left-width: 1px;
1165
border-right-width: 1px;
1166
}
1167
&.left, &.right {
1168
border-bottom-width: 1px;
1169
border-top-width: 1px;
1170
}
1171
}
1172
&.top {
1173
&:hover, &.prelight-page { box-shadow: inset 0 -2px $fill_color; }
1174
&:active, &.active-page { box-shadow: inset 0 -2px $primary_color; }
1175
}
1176
&.bottom {
1177
&:hover, &.prelight-page { box-shadow: inset 0 2px $fill_color; }
1178
&:active, &.active-page { box-shadow: inset 0 2px $primary_color; }
1179
}
1180
&.left {
1181
&:hover, &.prelight-page { box-shadow: inset -2px 0 $fill_color; }
1182
&:active, &.active-page { box-shadow: inset -2px 0 $primary_color; }
1183
}
1184
&.right {
1185
&:hover, &.prelight-page { box-shadow: inset 2px 0 $fill_color; }
1186
&:active, &.active-page { box-shadow: inset 2px 0 $primary_color; }
1187
}
1188
@each $_tab, $_border in (top, bottom),
1189
(bottom, top),
1190
(left, right),
1191
(right, left) {
1192
&.reorderable-page.#{$_tab} {
1193
border-color: transparent;
1194
&:hover, &.prelight-page {
1195
border-color: $border_color;
1196
border-#{$_border}-width: 0;
1197
border-#{$_border}-color: transparent;
1198
background-color: $alt_base_color;
1199
}
1200
&:active, &.active-page {
1201
border-color: $border_color;
1202
border-#{$_border}-width: 0;
1203
border-#{$_border}-color: transparent;
1204
background-color: $base_color;
1205
}
1206
}
1207
}
1208
.label { //tab text
1209
padding: 0 2px; // needed for a nicer focus ring
1210
font-weight: 500;
1211
color: $secondary_fg_color;
1212
}
1213
.prelight-page .label, .label.prelight-page {
1214
// prelight tab text
1215
color: $fg_color;
1216
}
1217
.active-page .label, .label.active-page {
1218
// active tab text
1219
color: $fg_color;
1220
}
1221
.button { //tab close button
1222
padding: 0;
1223
@extend %image_button;
1224
background-size: ($small_size / 0.8) ($small_size / 0.8), auto;
1225
@extend %simple_flat_button;
1226
& > GtkImage { // this is a hack which makes tabs grow
1227
padding: 4px;
1228
}
1229
}
1230
}
1231
&.arrow {
1232
&:not(:hover):not(:active) { color: $secondary_fg_color; }
1233
&:insensitive {
1234
color: $disabled_secondary_fg_color;
1235
}
1236
}
1237
GtkGrid > .entry {
1238
@extend .entry.flat;
1239
}
1240
}
1241
1242
/**************
1243
* Scrollbars *
1244
**************/
1245
1246
$_slider_margin: 4px;
1247
$_slider_fine_tune_margin: 6px;
1248
1249
.scrollbar {
1250
-GtkRange-slider-width: 8 + $_slider_margin * 2 + 1;
1251
-GtkRange-trough-border: 0;
1252
-GtkScrollbar-has-backward-stepper: false;
1253
-GtkScrollbar-has-forward-stepper: false;
1254
-GtkScrollbar-min-slider-length: 24 + $_slider_margin * 2;
1255
// minimum size for the slider.
1256
// sadly can't be in '.slider'
1257
// where it belongs
1258
-GtkRange-stepper-spacing: 0;
1259
-GtkRange-trough-under-steppers: 1;
1260
1261
.button {
1262
border: none;
1263
}
1264
1265
&.overlay-indicator {
1266
&:not(.dragging):not(.hovering) { // Overlay scrolling indicator
1267
-GtkRange-slider-width: 4 + $_slider_margin * 2;
1268
1269
.slider {
1270
margin: $_slider_margin - 1px;
1271
border: 1px solid rgba($base_color, 0.3);
1272
// background-clip: padding-box;
1273
}
1274
1275
.trough {
1276
border-style: none;
1277
background-color: transparent;
1278
}
1279
1280
}
1281
1282
&.dragging,
1283
&.hovering {
1284
.trough {
1285
background-color: rgba($base_color, 0.9);
1286
}
1287
}
1288
}
1289
1290
// trough coloring
1291
.trough {
1292
border: 1px none $border_color;
1293
background-color: $base_color;
1294
background-clip: $extra_background_clip;
1295
}
1296
1297
// slider coloring
1298
.slider {
1299
background-color: $hint_fg_color;
1300
&:hover { background-color: $secondary_fg_color; }
1301
&:active { background-color: $fg_color; }
1302
&:insensitive {
1303
opacity: 0.5;
1304
}
1305
}
1306
1307
1308
// sizing
1309
.slider {
1310
border-radius: 100px;
1311
margin: $_slider_margin;
1312
}
1313
1314
&.fine-tune .slider { margin: $_slider_fine_tune_margin; }
1315
1316
&.vertical {
1317
1318
.slider {
1319
margin-left: 1px + $_slider_margin;
1320
1321
&:dir(rtl) {
1322
margin-left: $_slider_margin;
1323
margin-right: 1px + $_slider_margin;
1324
}
1325
}
1326
1327
&.fine-tune .slider {
1328
margin-left: 1px + $_slider_fine_tune_margin;
1329
1330
&:dir(rtl) {
1331
margin-left: $_slider_fine_tune_margin;
1332
margin-right: 1px + $_slider_fine_tune_margin;
1333
}
1334
}
1335
1336
.trough {
1337
border-left-style: solid;
1338
1339
&:dir(rtl) {
1340
border-left-style: none;
1341
border-right-style: solid;
1342
}
1343
}
1344
}
1345
1346
&.horizontal {
1347
1348
.slider { margin-top: 1px + $_slider_margin; }
1349
1350
&.fine-tune .slider { margin-top: 1px + $_slider_fine_tune_margin; }
1351
1352
.trough { border-top-style: solid; }
1353
}
1354
}
1355
1356
.scrollbars-junction,
1357
.scrollbars-junction.frame { // the small square between two scrollbars
1358
border-style: solid none none solid;
1359
background-color: $base_color;
1360
1361
&:dir(rtl) { border-style: solid solid none none; }
1362
}
1363
1364
1365
/**********
1366
* Switch *
1367
**********/
1368
1369
GtkSwitch {
1370
-GtkSwitch-slider-width: 20px;
1371
-GtkSwitch-slider-height: 20px;
1372
1373
outline-offset: -4px;
1374
outline-radius: 100px;
1375
font-size: 0;
1376
&:insensitive { opacity: 0.5; }
1377
&.trough {
1378
// similar to the .scale
1379
border: 8px solid transparent;
1380
border-radius: 100px;
1381
background-color: $track_color;
1382
// background-clip: padding-box;
1383
&:active {
1384
background-color: rgba($secondary_color, 0.5);
1385
}
1386
}
1387
&.slider {
1388
padding: 5px 4px;
1389
border-radius: 100px;
1390
box-shadow: 0 0 0 10px transparent, $shadow_1;
1391
background-color: $popup_bg_color;
1392
&:hover { box-shadow: 0 0 0 10px $semi_fill_color, $shadow_1; }
1393
&:active {
1394
background-color: $secondary_color;
1395
color: $secondary_color;
1396
}
1397
}
1398
.list-row:selected & {
1399
}
1400
1401
}
1402
1403
/*************************
1404
* Check and Radio items *
1405
*************************/
1406
1407
// draw regular check and radio items using our PNG assets
1408
// all assets are rendered from assets.svg. never add pngs directly
1409
1410
@each $w,$a in ('check', 'checkbox'),
1411
('radio', 'radio') {
1412
1413
//standard checks and radios
1414
@each $s,$as in ('', '-unchecked'),
1415
(':hover', '-unchecked-hover'),
1416
(':active', '-unchecked-active'),
1417
(':insensitive', '-unchecked-disabled'),
1418
(':inconsistent', '-mixed'),
1419
(':inconsistent:hover', '-mixed-hover'),
1420
(':inconsistent:active', '-mixed-active'),
1421
(':inconsistent:insensitive', '-mixed-disabled'),
1422
(':checked', '-checked'),
1423
(':checked:hover', '-checked-hover'),
1424
(':checked:active', '-checked-active'),
1425
(':checked:insensitive', '-checked-disabled') {
1426
.#{$w}#{$s} {
1427
-gtk-icon-source: -gtk-scaled(url("assets/#{$a}#{$as}#{$asset_suffix}.png"),
1428
url("assets/#{$a}#{$as}#{$asset_suffix}@2.png"));
1429
&.button.flat {}
1430
}
1431
}
1432
1433
//menu
1434
@each $s,$as in ('', '-unchecked'),
1435
(':insensitive', '-unchecked-disabled'),
1436
(':inconsistent', '-mixed'),
1437
(':inconsistent:insensitive', '-mixed-disabled'),
1438
(':checked', '-checked'),
1439
(':checked:insensitive', '-checked-disabled') {
1440
.menu .menuitem.#{$w}#{$s} {
1441
// color: $secondary_fg_color;
1442
// -gtk-icon-source: -gtk-icontheme('#{$a}-symbolic');
1443
// &:active, &:checked { -gtk-icon-source: -gtk-icontheme('#{$a}-checked-symbolic'); }
1444
// &:inconsistent { -gtk-icon-source: -gtk-icontheme('#{$a}-mixed-symbolic'); }
1445
-gtk-icon-source: -gtk-scaled(url("assets/menu-#{$a}#{$as}#{$asset_suffix}.png"),
1446
url("assets/menu-#{$a}#{$as}#{$asset_suffix}@2.png"));
1447
}
1448
}
1449
}
1450
1451
//treeview and list-rows
1452
.view.check, .view.radio,
1453
.list-row .check, list-row .radio {
1454
}
1455
1456
//selection-mode
1457
@each $s,$as in ('', '-unchecked'),
1458
(':checked', '-checked') {
1459
.view.content-view.check#{$s}:not(.list) {
1460
-gtk-icon-source: -gtk-scaled(url("assets/selectionmode-checkbox#{$as}#{$asset_suffix}.png"),
1461
url("assets/selectionmode-checkbox#{$as}#{$asset_suffix}@2.png"));
1462
background-color: transparent;
1463
icon-shadow: $shadow_1;
1464
&:hover, &:active { icon-shadow: $shadow_2; }
1465
// &:insensitive { icon-shadow: none; }
1466
}
1467
}
1468
1469
GtkCheckButton.text-button, GtkRadioButton.text-button {
1470
// this is for a nice focus on check and radios text
1471
padding: 2px 4px;
1472
outline-offset: 0;
1473
&:insensitive,
1474
&:insensitive:active,
1475
&:insensitive:inconsistent {
1476
// set insensitive color, which is overriden otherwise
1477
// color: $disabled_fg_color;
1478
}
1479
}
1480
1481
/************
1482
* GtkScale *
1483
************/
1484
.scale,
1485
.scale.scale-has-marks-above.scale-has-marks-below,
1486
.scale.vertical.scale-has-marks-above.scale-has-marks-below {
1487
// FIXME: rationalize
1488
-GtkScale-slider-length: 24;
1489
-GtkRange-slider-width: 24;
1490
-GtkRange-trough-border: 2;
1491
outline-offset: -8px;
1492
outline-radius: 100px;
1493
1494
&.fine-tune {
1495
&.slider { background-size: 50%; }
1496
}
1497
1498
&.slider {
1499
border-radius: 50%;
1500
background-repeat: no-repeat;
1501
background-position: center;
1502
@each $s,$as in ('', ''),
1503
(':insensitive', '-disabled') {
1504
&.slider#{$s} {
1505
$_url: 'assets/scale-slider#{$as}#{$asset_suffix}';
1506
background-image: -gtk-scaled(url('#{$_url}.png'),
1507
url('#{$_url}@2.png'));
1508
}
1509
}
1510
&:hover { background-color: rgba($secondary_color, 0.08); }
1511
&:active { background-color: rgba($secondary_color, 0.16); }
1512
//OSD sliders
1513
.osd & {
1514
}
1515
}
1516
&.trough {
1517
margin: 13px 14px;
1518
background-color: $fill_color;
1519
&.highlight {
1520
background-color: $secondary_color;
1521
&:insensitive { background-color: $fill_color; }
1522
}
1523
&:insensitive { color: $disabled_fg_color; }
1524
&.vertical { margin: 14px 13px; }
1525
//OSD troughs
1526
.osd & {
1527
}
1528
}
1529
// marks color
1530
&.separator {
1531
color: $fill_color;
1532
}
1533
// scales on selected list rows
1534
.list-row:selected & {
1535
}
1536
}
1537
1538
@each $d,$dn in ('', 'horz'),
1539
('.vertical', 'vert') {
1540
@each $w,$we in ('scale-has-marks-below', 'marks-after'),
1541
('scale-has-marks-above', 'marks-before') {
1542
.scale#{$d}.#{$w} {
1543
@each $s,$as in ('', ''),
1544
(':insensitive', '-disabled') {
1545
&.slider#{$s} {
1546
$_url: 'assets/scale-#{$dn}-#{$we}-slider#{$as}#{$asset_suffix}';
1547
background-image: -gtk-scaled(url('#{$_url}.png'),
1548
url('#{$_url}@2.png'));
1549
}
1550
}
1551
}
1552
}
1553
}
1554
1555
/*****************
1556
* Progress bars *
1557
*****************/
1558
1559
GtkProgressBar {
1560
-GtkProgressBar-min-horizontal-bar-height: 4;
1561
-GtkProgressBar-min-vertical-bar-width: 4;
1562
padding: 0;
1563
font-size: smaller;
1564
color: $hint_fg_color;
1565
&.osd {
1566
-GtkProgressBar-xspacing: 0;
1567
-GtkProgressBar-yspacing: 0;
1568
-GtkProgressBar-min-horizontal-bar-height: 4;
1569
}
1570
&.trough { // background
1571
border-radius: 0;
1572
background-color: rgba($primary_color, 0.3);
1573
&.osd {
1574
border-style: none;
1575
box-shadow: none;
1576
// background-color: transparent;
1577
}
1578
}
1579
}
1580
1581
// moving bit
1582
.progressbar {
1583
border-radius: 0;
1584
background-color: $primary_color;
1585
&.left {
1586
border-top-left-radius: 0;
1587
border-bottom-left-radius: 0;
1588
}
1589
&.right {
1590
border-top-right-radius: 0;
1591
border-bottom-right-radius: 0;
1592
}
1593
&.left.right {
1594
box-shadow: none;
1595
}
1596
&.vertical {
1597
&.bottom {
1598
border-bottom-left-radius: 0;
1599
border-bottom-right-radius: 0;
1600
box-shadow: none;
1601
}
1602
&.top {
1603
border-top-left-radius: 0;
1604
border-top-right-radius: 0;
1605
}
1606
}
1607
&.osd {
1608
background-image: none;
1609
background-color: $primary_color;
1610
border-style: none;
1611
border-radius: 0;
1612
}
1613
}
1614
1615
1616
/*************
1617
* Level Bar *
1618
*************/
1619
1620
.level-bar {
1621
box-shadow: $shadow_1; // needs to be set here to avoid clipping
1622
color: $disabled_fg_color;
1623
-GtkLevelBar-min-block-width: 36;
1624
-GtkLevelBar-min-block-height: 4;
1625
&.vertical {
1626
-GtkLevelBar-min-block-width: 4;
1627
-GtkLevelBar-min-block-height: 36;
1628
}
1629
&.trough {
1630
padding: 2px;
1631
border-radius: $material_radius;
1632
@include entry(normal);
1633
&:insensitive { @include entry(insensitive); }
1634
&.indicator-discrete {
1635
&.horizontal { padding: 2px 1px; }
1636
&.vertical { padding: 1px 2px; }
1637
}
1638
}
1639
&.fill-block {
1640
// FIXME: it would be nice to set make fill blocks bigger, but we'd need
1641
// :nth-child working on discrete indicators
1642
background-color: $primary_color;
1643
border-radius: 0;
1644
box-shadow: none;
1645
&.indicator-discrete {
1646
&.horizontal { margin: 0 1px; }
1647
&.vertical { margin: 1px 0; }
1648
}
1649
&.level-high {
1650
background-color: $success_color;
1651
}
1652
&.level-low {
1653
background-color: $warning_color;
1654
}
1655
&.empty-fill-block {
1656
background-color: $fill_color;
1657
}
1658
}
1659
}
1660
1661
1662
/**********
1663
* Frames *
1664
**********/
1665
.frame {
1666
border: 1px solid $border_color;
1667
&.flat { border-style: none; }
1668
padding: 0;
1669
&.action-bar {
1670
padding: $container_padding;
1671
border-width: 1px 0 0;
1672
.button:not(.suggested-action):not(.destructive-action) { @extend %button.flat; }
1673
}
1674
}
1675
1676
GtkScrolledWindow {
1677
GtkViewport.frame { // avoid double borders when viewport inside
1678
// scrolled window
1679
border-style: none;
1680
}
1681
}
1682
1683
//vbox and hbox separators
1684
.separator {
1685
// always disable separators
1686
// -GtkWidget-wide-separators: true;
1687
color: $border_color;
1688
1689
// Font and File button separators
1690
GtkFileChooserButton &.vertical,
1691
GtkFontButton &.vertical {
1692
// always disable separators
1693
-GtkWidget-wide-separators: true;
1694
}
1695
}
1696
1697
/*********
1698
* Lists *
1699
*********/
1700
1701
.list {
1702
border-color: $border_color;
1703
background-color: $base_color;
1704
}
1705
1706
.list-row,
1707
.grid-child {
1708
padding: 2px;
1709
}
1710
1711
// FIXME
1712
$row_transition: $shorter_transition, background-color 0, color 0;
1713
1714
.list-row.activatable {
1715
transition: $row_transition;
1716
box-shadow: inset 0 0 0 10000px transparent;
1717
background-image: -gtk-gradient(radial,
1718
center center, 0,
1719
center center, 0.5,
1720
to(transparent),
1721
to(transparent)),
1722
linear-gradient(to bottom, transparent);
1723
background-repeat: no-repeat;
1724
background-position: center, center;
1725
background-size: (192px / 0.8) (192px / 0.8), auto;
1726
&:hover {
1727
transition: $row_transition, box-shadow 0;
1728
box-shadow: inset 0 0 0 10000px $row_fill_color;
1729
}
1730
&:active {
1731
transition: $row_transition, background-image 0;
1732
animation: list_ripple_effect $longer_duration $deceleration_curve forwards;
1733
box-shadow: inset 0 0 0 10000px $semi_fill_color;
1734
}
1735
}
1736
1737
.list-row:selected {
1738
@extend %selected_items;
1739
.button {
1740
&:insensitive { color: $inverse_disabled_secondary_fg_color; }
1741
&.flat {
1742
color: $inverse_secondary_fg_color;
1743
&:hover, &:active { color: $inverse_fg_color; }
1744
&:insensitive { color: $inverse_disabled_secondary_fg_color; }
1745
}
1746
}
1747
}
1748
1749
// transition
1750
.list-row {
1751
// &:hover { transition-duration: 0; }
1752
}
1753
1754
1755
/*********************
1756
* App Notifications *
1757
*********************/
1758
1759
.app-notification,
1760
.app-notification.frame {
1761
// @extend %osd;
1762
@extend .toolbar.osd;
1763
.button { @extend %button.flat; }
1764
}
1765
1766
/*************
1767
* Expanders *
1768
*************/
1769
1770
.expander {
1771
-gtk-icon-source: -gtk-icontheme('pan-end-symbolic');
1772
&:dir(rtl) { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic-rtl'); }
1773
&:checked { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
1774
&:not(:hover):not(:active) { color: gtkalpha(currentColor, 0.7); }
1775
&:selected { color: $inverse_fg_color; }
1776
}
1777
1778
/************
1779
* Calendar *
1780
***********/
1781
GtkCalendar {
1782
padding: 1px;
1783
border: 1px solid $border_color;
1784
color: $fg_color;
1785
1786
&:insensitive { color: $disabled_fg_color; }
1787
1788
&:selected {
1789
@extend .view:selected;
1790
1791
border-radius: $material_radius + 1px;
1792
}
1793
1794
&.header {
1795
border-style: none none solid;
1796
border-radius: 0;
1797
}
1798
1799
&.button {
1800
@extend %simple_flat_button;
1801
}
1802
1803
&:inconsistent { color: $disabled_secondary_fg_color; }
1804
&.highlight {
1805
font-size: smaller;
1806
color: $secondary_fg_color;
1807
}
1808
}
1809
1810
/***********
1811
* Dialogs *
1812
***********/
1813
1814
.message-dialog .dialog-action-area .button {
1815
padding: 8px;
1816
}
1817
1818
.message-dialog { // Message Dialog styling
1819
&.background { background-color: $popup_bg_color; }
1820
.titlebar {
1821
border-style: none;
1822
box-shadow: inset 0 1px $highlight_color;
1823
background-color: $popup_bg_color;
1824
}
1825
&.csd { // rounded bottom border styling for csd version
1826
&.background {
1827
// bigger radius for better antialiasing
1828
border-bottom-left-radius: $material_radius;
1829
border-bottom-right-radius: $material_radius;
1830
}
1831
.dialog-action-area .button {
1832
@extend %simple_flat_button;
1833
padding: 9px 16px 10px;
1834
border-top: 1px solid $border_color;
1835
border-radius: 0;
1836
background-size: (192px / 0.8) (192px / 0.8), auto;
1837
// &:first-child{ border-bottom-left-radius: $material_radius; }
1838
// &:last-child { border-bottom-right-radius: $material_radius; }
1839
&:first-child{ border-radius: 0 0 0 $material_radius; }
1840
&:last-child { border-radius: 0 0 $material_radius 0; }
1841
}
1842
}
1843
}
1844
1845
GtkFileChooserDialog {
1846
.search-bar {
1847
// background-color: $base_color;
1848
// border-color: $bg_color;
1849
}
1850
.dialog-action-box {
1851
border-top: 1px solid $border_color;
1852
}
1853
}
1854
1855
/***********
1856
* Sidebar *
1857
***********/
1858
1859
.sidebar {
1860
border: none;
1861
background-color: $alt_base_color;
1862
1863
&:selected {
1864
@extend %selected_items;
1865
}
1866
}
1867
1868
GtkSidebarRow {
1869
// Needs overriding of the GtkListBoxRow padding
1870
&.list-row {
1871
padding: 0px;
1872
}
1873
// Using margins/padding directly in the SidebarRow
1874
// will make the animation of the new bookmark row jump
1875
.sidebar-revealer {
1876
padding: 4px 14px 4px 12px;
1877
}
1878
.sidebar-icon {
1879
opacity: 0.7; // dim the device icons
1880
&:dir(ltr) { padding-right: 8px; }
1881
&:dir(rtl) { padding-left: 8px; }
1882
}
1883
.sidebar-label {
1884
&:dir(ltr) { padding-right: 2px; }
1885
&:dir(rtl) { padding-left: 2px; }
1886
}
1887
}
1888
1889
GtkPlacesSidebar.sidebar {
1890
// looks like the label doesn't get all the states so work around
1891
.list-row:selected:insensitive .label { @extend %selected_items:insensitive; }
1892
1893
.sidebar-placeholder-row {
1894
border: solid 1px $primary_color;
1895
}
1896
1897
.sidebar-new-bookmark-row {
1898
color: $secondary_color;
1899
}
1900
1901
@at-root .sidebar-button.button { // @at-root needded to not change the specificity making button styling inheritance broken
1902
// so istead of "GtkPlacesSidebar.sidebar .sidebar-button.button" [specificity 0,0,3,1]
1903
// the extended selector ".sidebar-button.button" [specificity 0,0,2,0]
1904
1905
&.image-button { padding: 4px; }
1906
1907
@extend %simple_flat_button;
1908
}
1909
// this is for indicating which sidebar row generated a popover
1910
// see https://bugzilla.gnome.org/show_bug.cgi?id=754411
1911
.has-open-popup { @extend .list-row.activatable:active; }
1912
}
1913
1914
.sidebar-item {
1915
padding: 10px 4px;
1916
> .label {
1917
padding-left: 6px;
1918
padding-right: 6px;
1919
}
1920
&.needs-attention > .label {
1921
@extend %needs_attention;
1922
}
1923
}
1924
1925
1926
/****************
1927
* File chooser *
1928
****************/
1929
1930
GtkPlacesView {
1931
.server-list-button > GtkImage { -gtk-icon-transform: rotate(0turn); }
1932
1933
.server-list-button:checked > GtkImage { -gtk-icon-transform: rotate(-0.5turn); }
1934
}
1935
1936
1937
/*********
1938
* Paned *
1939
*********/
1940
1941
GtkPaned { // this is for the standard paned separator
1942
1943
-GtkPaned-handle-size: 1; // sets separator width
1944
1945
-gtk-icon-source: none; // removes handle decoration
1946
margin: 0 8px 8px 0; // drag area of the separator, not a real margin
1947
&:dir(rtl) {
1948
margin-right: 0;
1949
margin-left: 8px;
1950
}
1951
.pane-separator {
1952
background-color: $border_color;
1953
}
1954
}
1955
1956
GtkPaned.wide { // this is for the paned with wide separator
1957
-GtkPaned-handle-size: 6; // wider separator here
1958
margin: 0; // no need of the invisible drag area so, reset margin
1959
.pane-separator {
1960
background-color: transparent;
1961
border-style: none solid;
1962
border-color: $border_color;
1963
border-width: 1px;
1964
}
1965
&.vertical .pane-separator { border-style: solid none;}
1966
}
1967
1968
1969
/**************
1970
* GtkInfoBar *
1971
**************/
1972
GtkInfoBar {
1973
border-style: none;
1974
}
1975
1976
.info {
1977
background-color: $info_bg_color;
1978
}
1979
1980
.question {
1981
background-color: $question_bg_color;
1982
}
1983
1984
.warning {
1985
background-color: $warning_bg_color;
1986
}
1987
1988
.error {
1989
background-color: $error_bg_color;
1990
}
1991
1992
.info,
1993
.question,
1994
.warning,
1995
.error {
1996
color: $inverse_fg_color;
1997
.button {
1998
// @extend .list-row:selected.button;
1999
&:insensitive { color: $inverse_disabled_secondary_fg_color; }
2000
}
2001
.label:selected {
2002
}
2003
}
2004
2005
/************
2006
* Tooltips *
2007
************/
2008
2009
.tooltip {
2010
&.background {
2011
// background-color needs to be set this way otherwise it gets drawn twice
2012
// see https://bugzilla.gnome.org/show_bug.cgi?id=736155 for details.
2013
// box-shadow: inset 0 1px $highlight_color;
2014
background-color: $tooltip_bg_color;
2015
}
2016
2017
color: $tooltip_fg_color;
2018
padding: 4px; /* not working */
2019
border-radius: $material_radius;
2020
box-shadow: none; // otherwise it gets inherited by windowframe.csd
2021
// FIXME: we need a border or tooltips vanish on black background.
2022
&.window-frame.csd {
2023
background-color: transparent;
2024
}
2025
}
2026
2027
.tooltip * { //Yeah this is ugly
2028
padding: 4px;
2029
background-color: transparent;
2030
color: inherit; // just to be sure
2031
}
2032
2033
/*****************
2034
* Color Chooser *
2035
*****************/
2036
2037
GtkColorSwatch {
2038
// This widget is made of two boxes one on top of the other, the lower box is GtkColorSwatch {} the other one
2039
// is GtkColorSwatch > .overlay {}, GtkColorSwatch has the programmatically set background, so most of the style
2040
// is applied to the overlay box.
2041
2042
transition: $shadow_transition;
2043
box-shadow: $shadow_1;
2044
2045
// we need to re-set the shadow here since it get axed by the previous bit
2046
&:selected { }
2047
&:insensitive {
2048
opacity: 0.5;
2049
box-shadow: none;
2050
}
2051
2052
// base color corners rounding
2053
// to avoid the artifacts caused by rounded corner anti-aliasing the base color
2054
// sports a bigger radius.
2055
// nth-child is needed by the custom color strip.
2056
// The :not() madness is needed since actually the overlay is selectable by GtkColorSwatch > .overlay
2057
// and GtkColorSwatch.overlay, I know it's weird, but this is gtk+, not a browser.
2058
&.top {
2059
border-top-left-radius: $material_radius;
2060
border-top-right-radius: $material_radius;
2061
}
2062
&.bottom {
2063
border-bottom-left-radius: $material_radius;
2064
border-bottom-right-radius: $material_radius;
2065
}
2066
&.left, &:first-child:not(.overlay):not(.top) {
2067
border-top-left-radius: $material_radius;
2068
border-bottom-left-radius: $material_radius;
2069
}
2070
&.right, &:last-child:not(.overlay):not(.bottom) {
2071
border-top-right-radius: $material_radius;
2072
border-bottom-right-radius: $material_radius;
2073
}
2074
&:only-child:not(.overlay) { border-radius: $material_radius; }
2075
2076
// overlay corner rounding
2077
&.top > .overlay {
2078
border-top-left-radius: $material_radius;
2079
border-top-right-radius: $material_radius;
2080
}
2081
&.bottom > .overlay {
2082
border-bottom-left-radius: $material_radius;
2083
border-bottom-right-radius: $material_radius;
2084
}
2085
&:first-child:not(.top) > .overlay {
2086
border-top-left-radius: $material_radius;
2087
border-bottom-left-radius: $material_radius;
2088
}
2089
&:last-child:not(.bottom) > .overlay {
2090
border-top-right-radius: $material_radius;
2091
border-bottom-right-radius: $material_radius;
2092
}
2093
&:only-child > .overlay { border-radius: $material_radius; }
2094
2095
// hover effect
2096
&:hover { box-shadow: $shadow_2; }
2097
2098
// no hover effect for the colorswatch in the color editor
2099
GtkColorEditor & {
2100
border-radius: $material_radius; // same radius as the entry
2101
&:hover { box-shadow: $shadow_1; }
2102
}
2103
2104
// indicator and keynav outline colors
2105
&.color-dark {
2106
color: $light_fg_color;
2107
}
2108
&.color-light {
2109
color: $dark_fg_color;
2110
}
2111
2112
// border color
2113
&.overlay,
2114
&.overlay:selected {
2115
}
2116
2117
// make the add color button looks like, well, a button
2118
&#add-color-button {
2119
background-image: linear-gradient(to right,
2120
$error_bg_color 25%,
2121
$warning_bg_color 25%, $warning_bg_color 50%,
2122
$info_bg_color 50%, $info_bg_color 75%,
2123
$question_bg_color 75%);
2124
color: $light_fg_color;
2125
}
2126
}
2127
2128
2129
/********
2130
* Misc *
2131
********/
2132
2133
//content view (grid/list)
2134
.content-view {
2135
background-color: $bg_color;
2136
// &:hover { -gtk-image-effect: highlight; }
2137
&.rubberband { @extend .rubberband; }
2138
}
2139
2140
.scale-popup {
2141
2142
// .osd & { @extend %osd; }
2143
2144
.osd & .button.flat { //FIXME: quick hack, redo properly
2145
}
2146
2147
.button { // +/- buttons on GtkVolumeButton popup
2148
padding: 10px;
2149
}
2150
}
2151
2152
GtkScaleButton.button,
2153
GtkVolumeButton.button {
2154
// I assume both are image-button *by default*
2155
// with the image-button/text-button classes automagically applied depending on the button child these selectors can be deleted.
2156
@extend %image_button;
2157
2158
&.text-button { @extend .text-button }
2159
}
2160
2161
/**********************
2162
* Window Decorations *
2163
*********************/
2164
2165
.window-frame {
2166
transition: $shadow_transition;
2167
border-radius: $material_radius $material_radius 0 0;
2168
box-shadow: $shadow_4;
2169
2170
// FIXME rationalize window-frame shadows
2171
2172
/* this is used for the resize cursor area */
2173
margin: 8px;
2174
2175
&:backdrop {
2176
box-shadow: $shadow_2;
2177
}
2178
&.tiled {
2179
border-radius: 0;
2180
}
2181
&.popup {
2182
box-shadow: none;
2183
}
2184
// server-side decorations as used by mutter
2185
&.ssd {
2186
box-shadow: 0 3px 3px rgba(0, 0, 0, 0.16); //just doing borders, wm draws actual shadows
2187
}
2188
&.csd {
2189
&.popup {
2190
border-radius: $material_radius;
2191
box-shadow: $shadow_2;
2192
}
2193
&.tooltip {
2194
border-radius: $material_radius;
2195
box-shadow: none;
2196
}
2197
&.message-dialog {
2198
border-radius: $material_radius;
2199
box-shadow: $shadow_4;
2200
&:backdrop { box-shadow: $shadow_2; }
2201
}
2202
}
2203
&.solid-csd {
2204
border-radius: 0;
2205
margin: 0;
2206
background-color: $titlebar_bg_color;
2207
box-shadow: none;
2208
}
2209
}
2210
2211
// Window Close button
2212
.header-bar .button.titlebutton,
2213
.titlebar .button.titlebutton {
2214
// @extend %simple_flat_button;
2215
@extend %image_button;
2216
2217
&:active { // add fallback
2218
background-image: -gtk-gradient(radial,
2219
center center, 0,
2220
center center, 0.4,
2221
to($semi_fill_color),
2222
to(transparent)),
2223
linear-gradient(to bottom, $semi_fill_color);
2224
}
2225
}
2226
2227
// catch all extend :)
2228
2229
%selected_items {
2230
background-color: $primary_color;
2231
color: $inverse_fg_color;
2232
&:insensitive { color: $inverse_disabled_fg_color; }
2233
}
2234
2235
.monospace {
2236
font: Monospace;
2237
}
2238
2239
/**********************
2240
* Touch Copy & Paste *
2241
*********************/
2242
2243
//touch selection handlebars for the Popover.osd above
2244
.entry.cursor-handle,
2245
.cursor-handle {
2246
background-color: $secondary_color;
2247
background-image: none;
2248
box-shadow: none;
2249
border-style: none;
2250
@each $s,$as in ('', '') { //no need for insensitive and backdrop
2251
&.top#{$s}:dir(ltr), &.bottom#{$s}:dir(rtl) {
2252
// $_url: 'assets/text-select-start#{$as}#{$asset_suffix}';
2253
// -gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
2254
// url('#{$_url}@2.png'));
2255
// padding-left: 10px;
2256
}
2257
&.bottom#{$s}:dir(ltr), &.top#{$s}:dir(rtl) {
2258
// $_url: 'assets/text-select-end#{$as}#{$asset_suffix}';
2259
// -gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
2260
// url('#{$_url}@2.png'));
2261
// padding-right: 10px;
2262
}
2263
&.insertion-cursor#{$s}:dir(ltr), &.insertion-cursor#{$s}:dir(rtl) {
2264
$_url: 'assets/scale-horz-marks-before-slider#{$as}#{$asset_suffix}';
2265
-gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
2266
url('#{$_url}@2.png'));
2267
}
2268
}
2269
}
2270
2271
/* Decouple the font of context menus from their entry/textview */
2272
.context-menu {
2273
font: initial;
2274
}
2275
2276
.touch-selection {
2277
font: initial;
2278
color: $fg_color;
2279
background-color: $popup_bg_color;
2280
box-shadow: $shadow_2;
2281
&:backdrop { box-shadow: $shadow_1; }
2282
.button {
2283
}
2284
}
2285
2286
// This is used by GtkScrolledWindow, when content is touch-dragged past boundaries.
2287
// This draws a box on top of the content, the size changes programmatically.
2288
.overshoot {
2289
&.top {
2290
@include overshoot(top);
2291
}
2292
&.bottom {
2293
@include overshoot(bottom);
2294
}
2295
&.left {
2296
@include overshoot(left);
2297
}
2298
&.right {
2299
@include overshoot(right);
2300
}
2301
}
2302
2303
// Overflow indication, works similarly to the overshoot, the size if fixed tho.
2304
.undershoot {
2305
&.top {
2306
@include undershoot(top);
2307
}
2308
2309
&.bottom {
2310
@include undershoot(bottom);
2311
}
2312
2313
&.left {
2314
@include undershoot(left);
2315
}
2316
2317
&.right {
2318
@include undershoot(right);
2319
}
2320
}
2321