_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: 0;
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
background-clip: border-box;
1114
1115
outline-offset: 0;
1116
1117
$tab_indicator_size: 2px;
1118
// vertical tab sizing
1119
$vt_vpadding: 8px;
1120
$vt_hpadding: 12px;
1121
// horizontal tab sizing
1122
$ht_vpadding: 8px;
1123
$ht_hpadding: 12px;
1124
1125
//FIXME: we get double border in some cases, not considering the broken
1126
//notebook content frame...
1127
&.top, &.bottom { padding: $vt_vpadding $vt_hpadding; }
1128
&.left, &.right { padding: $ht_vpadding $ht_hpadding; }
1129
1130
1131
/* works for testnotebookdnd, but there's a superfluous border
1132
in gedit or web, commented out for now, needs gtk fixes
1133
&.reorderable-page {
1134
&.top {
1135
padding-top: ($vt_vpadding - 1px);
1136
border-top-width: 1px;
1137
border-left-width: 1px;
1138
border-right-width: 1px;
1139
}
1140
&.bottom {
1141
padding-bottom: ($vt_vpadding - 1px);
1142
border-bottom-width: 1px;
1143
border-left-width: 1px;
1144
border-right-width: 1px;
1145
}
1146
&.left {
1147
padding-left: ($ht_hpadding - 1px);
1148
border-left-width: 1px;
1149
border-top-width: 1px;
1150
border-bottom-width: 1px;
1151
}
1152
&.right {
1153
padding-right: ($ht_hpadding - 1px);
1154
border-right-width: 1px;
1155
border-top-width: 1px;
1156
border-bottom-width: 1px;
1157
}
1158
}
1159
*/
1160
&.reorderable-page {
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
&:hover, &.prelight-page { background-color: $semi_fill_color; }
1173
&.top {
1174
&:active, &.active-page { box-shadow: inset 0 -2px $primary_color; }
1175
}
1176
&.bottom {
1177
&:active, &.active-page { box-shadow: inset 0 2px $primary_color; }
1178
}
1179
&.left {
1180
&:active, &.active-page { box-shadow: inset -2px 0 $primary_color; }
1181
}
1182
&.right {
1183
&:active, &.active-page { box-shadow: inset 2px 0 $primary_color; }
1184
}
1185
&.reorderable-page {
1186
&:active, &.active-page {
1187
border-color: $border_color;
1188
background-color: $base_color;
1189
background-clip: padding-box;
1190
}
1191
}
1192
.label { //tab text
1193
padding: 0 2px; // needed for a nicer focus ring
1194
font-weight: 500;
1195
color: $secondary_fg_color;
1196
}
1197
.prelight-page .label, .label.prelight-page {
1198
// prelight tab text
1199
color: $fg_color;
1200
}
1201
.active-page .label, .label.active-page {
1202
// active tab text
1203
color: $fg_color;
1204
}
1205
.button { //tab close button
1206
padding: 0;
1207
@extend %image_button;
1208
background-size: ($small_size / 0.8) ($small_size / 0.8), auto;
1209
@extend %simple_flat_button;
1210
& > GtkImage { // this is a hack which makes tabs grow
1211
padding: 4px;
1212
}
1213
}
1214
}
1215
&.arrow {
1216
&:not(:hover):not(:active) { color: $secondary_fg_color; }
1217
&:insensitive {
1218
color: $disabled_secondary_fg_color;
1219
}
1220
}
1221
GtkGrid > .entry {
1222
@extend .entry.flat;
1223
}
1224
}
1225
1226
/**************
1227
* Scrollbars *
1228
**************/
1229
1230
$_slider_margin: 4px;
1231
$_slider_fine_tune_margin: 6px;
1232
1233
.scrollbar {
1234
-GtkRange-slider-width: 8 + $_slider_margin * 2 + 1;
1235
-GtkRange-trough-border: 0;
1236
-GtkScrollbar-has-backward-stepper: false;
1237
-GtkScrollbar-has-forward-stepper: false;
1238
-GtkScrollbar-min-slider-length: 24 + $_slider_margin * 2;
1239
// minimum size for the slider.
1240
// sadly can't be in '.slider'
1241
// where it belongs
1242
-GtkRange-stepper-spacing: 0;
1243
-GtkRange-trough-under-steppers: 1;
1244
1245
.button {
1246
border: none;
1247
}
1248
1249
&.overlay-indicator {
1250
&:not(.dragging):not(.hovering) { // Overlay scrolling indicator
1251
-GtkRange-slider-width: 4 + $_slider_margin * 2;
1252
1253
.slider {
1254
margin: $_slider_margin - 1px;
1255
border: 1px solid rgba($base_color, 0.3);
1256
// background-clip: padding-box;
1257
}
1258
1259
.trough {
1260
border-style: none;
1261
background-color: transparent;
1262
}
1263
1264
}
1265
1266
&.dragging,
1267
&.hovering {
1268
.trough {
1269
background-color: rgba($base_color, 0.9);
1270
}
1271
}
1272
}
1273
1274
// trough coloring
1275
.trough {
1276
border: 1px none $border_color;
1277
background-color: $base_color;
1278
background-clip: $extra_background_clip;
1279
}
1280
1281
// slider coloring
1282
.slider {
1283
background-color: $hint_fg_color;
1284
&:hover { background-color: $secondary_fg_color; }
1285
&:active { background-color: $fg_color; }
1286
&:insensitive {
1287
opacity: 0.5;
1288
}
1289
}
1290
1291
1292
// sizing
1293
.slider {
1294
border-radius: 100px;
1295
margin: $_slider_margin;
1296
}
1297
1298
&.fine-tune .slider { margin: $_slider_fine_tune_margin; }
1299
1300
&.vertical {
1301
1302
.slider {
1303
margin-left: 1px + $_slider_margin;
1304
1305
&:dir(rtl) {
1306
margin-left: $_slider_margin;
1307
margin-right: 1px + $_slider_margin;
1308
}
1309
}
1310
1311
&.fine-tune .slider {
1312
margin-left: 1px + $_slider_fine_tune_margin;
1313
1314
&:dir(rtl) {
1315
margin-left: $_slider_fine_tune_margin;
1316
margin-right: 1px + $_slider_fine_tune_margin;
1317
}
1318
}
1319
1320
.trough {
1321
border-left-style: solid;
1322
1323
&:dir(rtl) {
1324
border-left-style: none;
1325
border-right-style: solid;
1326
}
1327
}
1328
}
1329
1330
&.horizontal {
1331
1332
.slider { margin-top: 1px + $_slider_margin; }
1333
1334
&.fine-tune .slider { margin-top: 1px + $_slider_fine_tune_margin; }
1335
1336
.trough { border-top-style: solid; }
1337
}
1338
}
1339
1340
.scrollbars-junction,
1341
.scrollbars-junction.frame { // the small square between two scrollbars
1342
border-style: solid none none solid;
1343
background-color: $base_color;
1344
1345
&:dir(rtl) { border-style: solid solid none none; }
1346
}
1347
1348
1349
/**********
1350
* Switch *
1351
**********/
1352
1353
GtkSwitch {
1354
-GtkSwitch-slider-width: 20px;
1355
-GtkSwitch-slider-height: 20px;
1356
1357
outline-offset: -4px;
1358
outline-radius: 100px;
1359
font-size: 0;
1360
&:insensitive { opacity: 0.5; }
1361
&.trough {
1362
// similar to the .scale
1363
border: 8px solid transparent;
1364
border-radius: 100px;
1365
background-color: $track_color;
1366
// background-clip: padding-box;
1367
&:active {
1368
background-color: rgba($secondary_color, 0.5);
1369
}
1370
}
1371
&.slider {
1372
padding: 5px 4px;
1373
border-radius: 100px;
1374
box-shadow: 0 0 0 10px transparent, $shadow_1;
1375
background-color: $popup_bg_color;
1376
&:hover { box-shadow: 0 0 0 10px $semi_fill_color, $shadow_1; }
1377
&:active {
1378
background-color: $secondary_color;
1379
color: $secondary_color;
1380
}
1381
}
1382
.list-row:selected & {
1383
}
1384
1385
}
1386
1387
/*************************
1388
* Check and Radio items *
1389
*************************/
1390
1391
// draw regular check and radio items using our PNG assets
1392
// all assets are rendered from assets.svg. never add pngs directly
1393
1394
@each $w,$a in ('check', 'checkbox'),
1395
('radio', 'radio') {
1396
1397
//standard checks and radios
1398
@each $s,$as in ('', '-unchecked'),
1399
(':hover', '-unchecked-hover'),
1400
(':active', '-unchecked-active'),
1401
(':insensitive', '-unchecked-disabled'),
1402
(':inconsistent', '-mixed'),
1403
(':inconsistent:hover', '-mixed-hover'),
1404
(':inconsistent:active', '-mixed-active'),
1405
(':inconsistent:insensitive', '-mixed-disabled'),
1406
(':checked', '-checked'),
1407
(':checked:hover', '-checked-hover'),
1408
(':checked:active', '-checked-active'),
1409
(':checked:insensitive', '-checked-disabled') {
1410
.#{$w}#{$s} {
1411
-gtk-icon-source: -gtk-scaled(url("assets/#{$a}#{$as}#{$asset_suffix}.png"),
1412
url("assets/#{$a}#{$as}#{$asset_suffix}@2.png"));
1413
&.button.flat {}
1414
}
1415
}
1416
1417
//menu
1418
@each $s,$as in ('', '-unchecked'),
1419
(':insensitive', '-unchecked-disabled'),
1420
(':inconsistent', '-mixed'),
1421
(':inconsistent:insensitive', '-mixed-disabled'),
1422
(':checked', '-checked'),
1423
(':checked:insensitive', '-checked-disabled') {
1424
.menu .menuitem.#{$w}#{$s} {
1425
// color: $secondary_fg_color;
1426
// -gtk-icon-source: -gtk-icontheme('#{$a}-symbolic');
1427
// &:active, &:checked { -gtk-icon-source: -gtk-icontheme('#{$a}-checked-symbolic'); }
1428
// &:inconsistent { -gtk-icon-source: -gtk-icontheme('#{$a}-mixed-symbolic'); }
1429
-gtk-icon-source: -gtk-scaled(url("assets/menu-#{$a}#{$as}#{$asset_suffix}.png"),
1430
url("assets/menu-#{$a}#{$as}#{$asset_suffix}@2.png"));
1431
}
1432
}
1433
}
1434
1435
//treeview and list-rows
1436
.view.check, .view.radio,
1437
.list-row .check, list-row .radio {
1438
}
1439
1440
//selection-mode
1441
@each $s,$as in ('', '-unchecked'),
1442
(':checked', '-checked') {
1443
.view.content-view.check#{$s}:not(.list) {
1444
-gtk-icon-source: -gtk-scaled(url("assets/selectionmode-checkbox#{$as}#{$asset_suffix}.png"),
1445
url("assets/selectionmode-checkbox#{$as}#{$asset_suffix}@2.png"));
1446
background-color: transparent;
1447
icon-shadow: $shadow_1;
1448
&:hover, &:active { icon-shadow: $shadow_2; }
1449
// &:insensitive { icon-shadow: none; }
1450
}
1451
}
1452
1453
GtkCheckButton.text-button, GtkRadioButton.text-button {
1454
// this is for a nice focus on check and radios text
1455
padding: 2px 4px;
1456
outline-offset: 0;
1457
&:insensitive,
1458
&:insensitive:active,
1459
&:insensitive:inconsistent {
1460
// set insensitive color, which is overriden otherwise
1461
// color: $disabled_fg_color;
1462
}
1463
}
1464
1465
/************
1466
* GtkScale *
1467
************/
1468
.scale,
1469
.scale.scale-has-marks-above.scale-has-marks-below,
1470
.scale.vertical.scale-has-marks-above.scale-has-marks-below {
1471
// FIXME: rationalize
1472
-GtkScale-slider-length: 24;
1473
-GtkRange-slider-width: 24;
1474
-GtkRange-trough-border: 2;
1475
outline-offset: -8px;
1476
outline-radius: 100px;
1477
1478
&.fine-tune {
1479
&.slider { background-size: 50%; }
1480
}
1481
1482
&.slider {
1483
border-radius: 50%;
1484
background-repeat: no-repeat;
1485
background-position: center;
1486
@each $s,$as in ('', ''),
1487
(':insensitive', '-disabled') {
1488
&.slider#{$s} {
1489
$_url: 'assets/scale-slider#{$as}#{$asset_suffix}';
1490
background-image: -gtk-scaled(url('#{$_url}.png'),
1491
url('#{$_url}@2.png'));
1492
}
1493
}
1494
&:hover { background-color: rgba($secondary_color, 0.08); }
1495
&:active { background-color: rgba($secondary_color, 0.16); }
1496
//OSD sliders
1497
.osd & {
1498
}
1499
}
1500
&.trough {
1501
margin: 13px 14px;
1502
background-color: $fill_color;
1503
&.highlight {
1504
background-color: $secondary_color;
1505
&:insensitive { background-color: $fill_color; }
1506
}
1507
&:insensitive { color: $disabled_fg_color; }
1508
&.vertical { margin: 14px 13px; }
1509
//OSD troughs
1510
.osd & {
1511
}
1512
}
1513
// marks color
1514
&.separator {
1515
color: $fill_color;
1516
}
1517
// scales on selected list rows
1518
.list-row:selected & {
1519
}
1520
}
1521
1522
@each $d,$dn in ('', 'horz'),
1523
('.vertical', 'vert') {
1524
@each $w,$we in ('scale-has-marks-below', 'marks-after'),
1525
('scale-has-marks-above', 'marks-before') {
1526
.scale#{$d}.#{$w} {
1527
@each $s,$as in ('', ''),
1528
(':insensitive', '-disabled') {
1529
&.slider#{$s} {
1530
$_url: 'assets/scale-#{$dn}-#{$we}-slider#{$as}#{$asset_suffix}';
1531
background-image: -gtk-scaled(url('#{$_url}.png'),
1532
url('#{$_url}@2.png'));
1533
}
1534
}
1535
}
1536
}
1537
}
1538
1539
/*****************
1540
* Progress bars *
1541
*****************/
1542
1543
GtkProgressBar {
1544
-GtkProgressBar-min-horizontal-bar-height: 4;
1545
-GtkProgressBar-min-vertical-bar-width: 4;
1546
padding: 0;
1547
font-size: smaller;
1548
color: $hint_fg_color;
1549
&.osd {
1550
-GtkProgressBar-xspacing: 0;
1551
-GtkProgressBar-yspacing: 0;
1552
-GtkProgressBar-min-horizontal-bar-height: 4;
1553
}
1554
&.trough { // background
1555
border-radius: 0;
1556
background-color: rgba($primary_color, 0.3);
1557
&.osd {
1558
border-style: none;
1559
box-shadow: none;
1560
// background-color: transparent;
1561
}
1562
}
1563
}
1564
1565
// moving bit
1566
.progressbar {
1567
border-radius: 0;
1568
background-color: $primary_color;
1569
&.left {
1570
border-top-left-radius: 0;
1571
border-bottom-left-radius: 0;
1572
}
1573
&.right {
1574
border-top-right-radius: 0;
1575
border-bottom-right-radius: 0;
1576
}
1577
&.left.right {
1578
box-shadow: none;
1579
}
1580
&.vertical {
1581
&.bottom {
1582
border-bottom-left-radius: 0;
1583
border-bottom-right-radius: 0;
1584
box-shadow: none;
1585
}
1586
&.top {
1587
border-top-left-radius: 0;
1588
border-top-right-radius: 0;
1589
}
1590
}
1591
&.osd {
1592
background-image: none;
1593
background-color: $primary_color;
1594
border-style: none;
1595
border-radius: 0;
1596
}
1597
}
1598
1599
1600
/*************
1601
* Level Bar *
1602
*************/
1603
1604
.level-bar {
1605
-GtkLevelBar-min-block-width: 36;
1606
-GtkLevelBar-min-block-height: 4;
1607
&.vertical {
1608
-GtkLevelBar-min-block-width: 4;
1609
-GtkLevelBar-min-block-height: 36;
1610
}
1611
&.trough {
1612
}
1613
&.fill-block {
1614
// FIXME: it would be nice to set make fill blocks bigger, but we'd need
1615
// :nth-child working on discrete indicators
1616
background-color: $primary_color;
1617
&.indicator-discrete {
1618
&.horizontal { margin: 0 1px; }
1619
&.vertical { margin: 1px 0; }
1620
}
1621
&.level-high {
1622
background-color: $success_color;
1623
}
1624
&.level-low {
1625
background-color: $warning_color;
1626
}
1627
&.empty-fill-block {
1628
background-color: $divider_color;
1629
}
1630
}
1631
}
1632
1633
1634
/**********
1635
* Frames *
1636
**********/
1637
.frame {
1638
border: 1px solid $border_color;
1639
&.flat { border-style: none; }
1640
padding: 0;
1641
&.action-bar {
1642
padding: $container_padding;
1643
border-width: 1px 0 0;
1644
.button:not(.suggested-action):not(.destructive-action) { @extend %button.flat; }
1645
}
1646
}
1647
1648
GtkScrolledWindow {
1649
GtkViewport.frame { // avoid double borders when viewport inside
1650
// scrolled window
1651
border-style: none;
1652
}
1653
}
1654
1655
//vbox and hbox separators
1656
.separator {
1657
// always disable separators
1658
// -GtkWidget-wide-separators: true;
1659
color: $border_color;
1660
1661
// Font and File button separators
1662
GtkFileChooserButton &.vertical,
1663
GtkFontButton &.vertical {
1664
// always disable separators
1665
-GtkWidget-wide-separators: true;
1666
}
1667
}
1668
1669
/*********
1670
* Lists *
1671
*********/
1672
1673
.list {
1674
border-color: $border_color;
1675
background-color: $base_color;
1676
}
1677
1678
.list-row,
1679
.grid-child {
1680
padding: 2px;
1681
}
1682
1683
// FIXME
1684
$row_transition: $shorter_transition, background-color 0, color 0;
1685
1686
.list-row.activatable {
1687
transition: $row_transition;
1688
box-shadow: inset 0 0 0 10000px transparent;
1689
background-image: -gtk-gradient(radial,
1690
center center, 0,
1691
center center, 0.5,
1692
to(transparent),
1693
to(transparent)),
1694
linear-gradient(to bottom, transparent);
1695
background-repeat: no-repeat;
1696
background-position: center, center;
1697
background-size: (192px / 0.8) (192px / 0.8), auto;
1698
&:hover {
1699
transition: $row_transition, box-shadow 0;
1700
box-shadow: inset 0 0 0 10000px $row_fill_color;
1701
}
1702
&:active {
1703
transition: $row_transition, background-image 0;
1704
animation: list_ripple_effect $longer_duration $deceleration_curve forwards;
1705
box-shadow: inset 0 0 0 10000px $semi_fill_color;
1706
}
1707
}
1708
1709
.list-row:selected {
1710
@extend %selected_items;
1711
.button {
1712
&:insensitive { color: $inverse_disabled_secondary_fg_color; }
1713
&.flat {
1714
color: $inverse_secondary_fg_color;
1715
&:hover, &:active { color: $inverse_fg_color; }
1716
&:insensitive { color: $inverse_disabled_secondary_fg_color; }
1717
}
1718
}
1719
}
1720
1721
// transition
1722
.list-row {
1723
// &:hover { transition-duration: 0; }
1724
}
1725
1726
1727
/*********************
1728
* App Notifications *
1729
*********************/
1730
1731
.app-notification,
1732
.app-notification.frame {
1733
// @extend %osd;
1734
@extend .toolbar.osd;
1735
.button { @extend %button.flat; }
1736
}
1737
1738
/*************
1739
* Expanders *
1740
*************/
1741
1742
.expander {
1743
-gtk-icon-source: -gtk-icontheme('pan-end-symbolic');
1744
&:dir(rtl) { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic-rtl'); }
1745
&:checked { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
1746
&:not(:hover):not(:active) { color: gtkalpha(currentColor, 0.7); }
1747
&:selected { color: $inverse_fg_color; }
1748
}
1749
1750
/************
1751
* Calendar *
1752
***********/
1753
GtkCalendar {
1754
padding: 1px;
1755
border: 1px solid $border_color;
1756
color: $fg_color;
1757
1758
&:insensitive { color: $disabled_fg_color; }
1759
1760
&:selected {
1761
@extend .view:selected;
1762
1763
border-radius: $material_radius + 1px;
1764
}
1765
1766
&.header {
1767
border-style: none none solid;
1768
border-radius: 0;
1769
}
1770
1771
&.button {
1772
@extend %simple_flat_button;
1773
}
1774
1775
&:inconsistent { color: $disabled_secondary_fg_color; }
1776
&.highlight {
1777
font-size: smaller;
1778
color: $secondary_fg_color;
1779
}
1780
}
1781
1782
/***********
1783
* Dialogs *
1784
***********/
1785
1786
.message-dialog .dialog-action-area .button {
1787
padding: 8px;
1788
}
1789
1790
.message-dialog { // Message Dialog styling
1791
&.background { background-color: $popup_bg_color; }
1792
.titlebar {
1793
border-style: none;
1794
box-shadow: inset 0 1px $highlight_color;
1795
background-color: $popup_bg_color;
1796
}
1797
&.csd { // rounded bottom border styling for csd version
1798
&.background {
1799
// bigger radius for better antialiasing
1800
border-bottom-left-radius: $material_radius;
1801
border-bottom-right-radius: $material_radius;
1802
}
1803
.dialog-action-area .button {
1804
@extend %simple_flat_button;
1805
padding: 9px 16px 10px;
1806
border-top: 1px solid $border_color;
1807
border-radius: 0;
1808
background-size: (192px / 0.8) (192px / 0.8), auto;
1809
// &:first-child{ border-bottom-left-radius: $material_radius; }
1810
// &:last-child { border-bottom-right-radius: $material_radius; }
1811
&:first-child{ border-radius: 0 0 0 $material_radius; }
1812
&:last-child { border-radius: 0 0 $material_radius 0; }
1813
}
1814
}
1815
}
1816
1817
GtkFileChooserDialog {
1818
.search-bar {
1819
// background-color: $base_color;
1820
// border-color: $bg_color;
1821
}
1822
.dialog-action-box {
1823
border-top: 1px solid $border_color;
1824
}
1825
}
1826
1827
/***********
1828
* Sidebar *
1829
***********/
1830
1831
.sidebar {
1832
border: none;
1833
background-color: $alt_base_color;
1834
1835
&:selected {
1836
@extend %selected_items;
1837
}
1838
}
1839
1840
GtkSidebarRow {
1841
// Needs overriding of the GtkListBoxRow padding
1842
&.list-row {
1843
padding: 0px;
1844
}
1845
// Using margins/padding directly in the SidebarRow
1846
// will make the animation of the new bookmark row jump
1847
.sidebar-revealer {
1848
padding: 4px 14px 4px 12px;
1849
}
1850
.sidebar-icon {
1851
opacity: 0.7; // dim the device icons
1852
&:dir(ltr) { padding-right: 8px; }
1853
&:dir(rtl) { padding-left: 8px; }
1854
}
1855
.sidebar-label {
1856
&:dir(ltr) { padding-right: 2px; }
1857
&:dir(rtl) { padding-left: 2px; }
1858
}
1859
}
1860
1861
GtkPlacesSidebar.sidebar {
1862
// looks like the label doesn't get all the states so work around
1863
.list-row:selected:insensitive .label { @extend %selected_items:insensitive; }
1864
1865
.sidebar-placeholder-row {
1866
border: solid 1px $primary_color;
1867
}
1868
1869
.sidebar-new-bookmark-row {
1870
color: $secondary_color;
1871
}
1872
1873
@at-root .sidebar-button.button { // @at-root needded to not change the specificity making button styling inheritance broken
1874
// so istead of "GtkPlacesSidebar.sidebar .sidebar-button.button" [specificity 0,0,3,1]
1875
// the extended selector ".sidebar-button.button" [specificity 0,0,2,0]
1876
1877
&.image-button { padding: 4px; }
1878
1879
@extend %simple_flat_button;
1880
}
1881
// this is for indicating which sidebar row generated a popover
1882
// see https://bugzilla.gnome.org/show_bug.cgi?id=754411
1883
.has-open-popup { @extend .list-row.activatable:active; }
1884
}
1885
1886
.sidebar-item {
1887
padding: 10px 4px;
1888
> .label {
1889
padding-left: 6px;
1890
padding-right: 6px;
1891
}
1892
&.needs-attention > .label {
1893
@extend %needs_attention;
1894
}
1895
}
1896
1897
1898
/****************
1899
* File chooser *
1900
****************/
1901
1902
GtkPlacesView {
1903
.server-list-button > GtkImage { -gtk-icon-transform: rotate(0turn); }
1904
1905
.server-list-button:checked > GtkImage { -gtk-icon-transform: rotate(-0.5turn); }
1906
}
1907
1908
1909
/*********
1910
* Paned *
1911
*********/
1912
1913
GtkPaned { // this is for the standard paned separator
1914
1915
-GtkPaned-handle-size: 1; // sets separator width
1916
1917
-gtk-icon-source: none; // removes handle decoration
1918
margin: 0 8px 8px 0; // drag area of the separator, not a real margin
1919
&:dir(rtl) {
1920
margin-right: 0;
1921
margin-left: 8px;
1922
}
1923
.pane-separator {
1924
background-color: $border_color;
1925
}
1926
}
1927
1928
GtkPaned.wide { // this is for the paned with wide separator
1929
-GtkPaned-handle-size: 6; // wider separator here
1930
margin: 0; // no need of the invisible drag area so, reset margin
1931
.pane-separator {
1932
background-color: transparent;
1933
border-style: none solid;
1934
border-color: $border_color;
1935
border-width: 1px;
1936
}
1937
&.vertical .pane-separator { border-style: solid none;}
1938
}
1939
1940
1941
/**************
1942
* GtkInfoBar *
1943
**************/
1944
GtkInfoBar {
1945
border-style: none;
1946
}
1947
1948
.info {
1949
background-color: $info_bg_color;
1950
}
1951
1952
.question {
1953
background-color: $question_bg_color;
1954
}
1955
1956
.warning {
1957
background-color: $warning_bg_color;
1958
}
1959
1960
.error {
1961
background-color: $error_bg_color;
1962
}
1963
1964
.info,
1965
.question,
1966
.warning,
1967
.error {
1968
color: $inverse_fg_color;
1969
.button {
1970
// @extend .list-row:selected.button;
1971
&:insensitive { color: $inverse_disabled_secondary_fg_color; }
1972
}
1973
.label:selected {
1974
}
1975
}
1976
1977
/************
1978
* Tooltips *
1979
************/
1980
1981
.tooltip {
1982
&.background {
1983
// background-color needs to be set this way otherwise it gets drawn twice
1984
// see https://bugzilla.gnome.org/show_bug.cgi?id=736155 for details.
1985
// box-shadow: inset 0 1px $highlight_color;
1986
background-color: $tooltip_bg_color;
1987
}
1988
1989
color: $tooltip_fg_color;
1990
padding: 4px; /* not working */
1991
border-radius: $material_radius;
1992
box-shadow: none; // otherwise it gets inherited by windowframe.csd
1993
// FIXME: we need a border or tooltips vanish on black background.
1994
&.window-frame.csd {
1995
background-color: transparent;
1996
}
1997
}
1998
1999
.tooltip * { //Yeah this is ugly
2000
padding: 0 2px;
2001
background-color: transparent;
2002
color: inherit; // just to be sure
2003
}
2004
2005
/*****************
2006
* Color Chooser *
2007
*****************/
2008
2009
GtkColorSwatch {
2010
// This widget is made of two boxes one on top of the other, the lower box is GtkColorSwatch {} the other one
2011
// is GtkColorSwatch > .overlay {}, GtkColorSwatch has the programmatically set background, so most of the style
2012
// is applied to the overlay box.
2013
2014
transition: $shadow_transition;
2015
box-shadow: $shadow_1;
2016
2017
// we need to re-set the shadow here since it get axed by the previous bit
2018
&:selected { }
2019
&:insensitive {
2020
opacity: 0.5;
2021
box-shadow: none;
2022
}
2023
2024
// base color corners rounding
2025
// to avoid the artifacts caused by rounded corner anti-aliasing the base color
2026
// sports a bigger radius.
2027
// nth-child is needed by the custom color strip.
2028
// The :not() madness is needed since actually the overlay is selectable by GtkColorSwatch > .overlay
2029
// and GtkColorSwatch.overlay, I know it's weird, but this is gtk+, not a browser.
2030
&.top {
2031
border-top-left-radius: $material_radius;
2032
border-top-right-radius: $material_radius;
2033
}
2034
&.bottom {
2035
border-bottom-left-radius: $material_radius;
2036
border-bottom-right-radius: $material_radius;
2037
}
2038
&.left, &:first-child:not(.overlay):not(.top) {
2039
border-top-left-radius: $material_radius;
2040
border-bottom-left-radius: $material_radius;
2041
}
2042
&.right, &:last-child:not(.overlay):not(.bottom) {
2043
border-top-right-radius: $material_radius;
2044
border-bottom-right-radius: $material_radius;
2045
}
2046
&:only-child:not(.overlay) { border-radius: $material_radius; }
2047
2048
// overlay corner rounding
2049
&.top > .overlay {
2050
border-top-left-radius: $material_radius;
2051
border-top-right-radius: $material_radius;
2052
}
2053
&.bottom > .overlay {
2054
border-bottom-left-radius: $material_radius;
2055
border-bottom-right-radius: $material_radius;
2056
}
2057
&:first-child:not(.top) > .overlay {
2058
border-top-left-radius: $material_radius;
2059
border-bottom-left-radius: $material_radius;
2060
}
2061
&:last-child:not(.bottom) > .overlay {
2062
border-top-right-radius: $material_radius;
2063
border-bottom-right-radius: $material_radius;
2064
}
2065
&:only-child > .overlay { border-radius: $material_radius; }
2066
2067
// hover effect
2068
&:hover { box-shadow: $shadow_2; }
2069
2070
// no hover effect for the colorswatch in the color editor
2071
GtkColorEditor & {
2072
border-radius: $material_radius; // same radius as the entry
2073
&:hover { box-shadow: $shadow_1; }
2074
}
2075
2076
// indicator and keynav outline colors
2077
&.color-dark {
2078
color: $light_fg_color;
2079
}
2080
&.color-light {
2081
color: $dark_fg_color;
2082
}
2083
2084
// border color
2085
&.overlay,
2086
&.overlay:selected {
2087
}
2088
2089
// make the add color button looks like, well, a button
2090
&#add-color-button {
2091
background-image: linear-gradient(to right,
2092
$error_bg_color 25%,
2093
$warning_bg_color 25%, $warning_bg_color 50%,
2094
$info_bg_color 50%, $info_bg_color 75%,
2095
$question_bg_color 75%);
2096
color: $light_fg_color;
2097
}
2098
}
2099
2100
2101
/********
2102
* Misc *
2103
********/
2104
2105
//content view (grid/list)
2106
.content-view {
2107
background-color: $bg_color;
2108
// &:hover { -gtk-image-effect: highlight; }
2109
&.rubberband { @extend .rubberband; }
2110
}
2111
2112
.scale-popup {
2113
2114
// .osd & { @extend %osd; }
2115
2116
.osd & .button.flat { //FIXME: quick hack, redo properly
2117
}
2118
2119
.button { // +/- buttons on GtkVolumeButton popup
2120
padding: 10px;
2121
}
2122
}
2123
2124
GtkScaleButton.button,
2125
GtkVolumeButton.button {
2126
// I assume both are image-button *by default*
2127
// with the image-button/text-button classes automagically applied depending on the button child these selectors can be deleted.
2128
@extend %image_button;
2129
2130
&.text-button { @extend .text-button }
2131
}
2132
2133
/**********************
2134
* Window Decorations *
2135
*********************/
2136
2137
.window-frame {
2138
transition: $shadow_transition;
2139
border-radius: $material_radius $material_radius 0 0;
2140
box-shadow: $shadow_4;
2141
2142
// FIXME rationalize window-frame shadows
2143
2144
/* this is used for the resize cursor area */
2145
margin: 8px;
2146
2147
&:backdrop {
2148
box-shadow: $shadow_2;
2149
}
2150
&.tiled {
2151
border-radius: 0;
2152
}
2153
&.popup {
2154
box-shadow: none;
2155
}
2156
// server-side decorations as used by mutter
2157
&.ssd {
2158
box-shadow: 0 3px 3px rgba(0, 0, 0, 0.16); //just doing borders, wm draws actual shadows
2159
}
2160
&.csd {
2161
&.popup {
2162
border-radius: $material_radius;
2163
box-shadow: $shadow_2;
2164
}
2165
&.tooltip {
2166
border-radius: $material_radius;
2167
box-shadow: none;
2168
}
2169
&.message-dialog {
2170
border-radius: $material_radius;
2171
box-shadow: $shadow_4;
2172
&:backdrop { box-shadow: $shadow_2; }
2173
}
2174
}
2175
&.solid-csd {
2176
border-radius: 0;
2177
margin: 0;
2178
background-color: $titlebar_bg_color;
2179
box-shadow: none;
2180
}
2181
}
2182
2183
// Window Close button
2184
.header-bar .button.titlebutton,
2185
.titlebar .button.titlebutton {
2186
// @extend %simple_flat_button;
2187
@extend %image_button;
2188
2189
&:active { // add fallback
2190
background-image: -gtk-gradient(radial,
2191
center center, 0,
2192
center center, 0.4,
2193
to($semi_fill_color),
2194
to(transparent)),
2195
linear-gradient(to bottom, $semi_fill_color);
2196
}
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