_common.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: 2px;
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: 2px; }
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: scale-alpha($alt_primary_color, $lower_opacity);
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: $tertiary_opacity;
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: $tertiary_opacity;
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: 2px;
158
&:selected { @extend %selected_items; }
159
}
160
161
%osd, .osd { opacity: $higher_opacity; }
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: $disabled_opacity;
181
}
182
}
183
}
184
185
/****************
186
* Text Entries *
187
****************/
188
189
.entry {
190
padding: 7px 8px 8px;
191
border-radius: 2px;
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, $secondary_opacity); }
244
&:insensitive { color: gtkalpha(currentColor, $tertiary_opacity); }
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($accent_color),
273
to(transparent));
274
}
275
to {
276
background-image: -gtk-gradient(radial,
277
center center, 0,
278
center center, 0.5,
279
to($accent_color),
280
to(transparent));
281
}
282
}
283
284
285
%button,
286
.button {
287
padding: 7px 10px 8px;
288
border-radius: 2px;
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($lower_opacity)); }
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: 2px;
352
border-radius: 2px;
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: 2px;
407
408
&.image-button {
409
outline-radius: $circular_radius;
410
border-radius: $circular_radius;
411
}
412
413
&.text-button.image-button {
414
outline-radius: 2px;
415
border-radius: 2px;
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: 2px;
452
border-radius: 0;
453
}
454
455
%linked {
456
@extend %linked_middle;
457
&:first-child {
458
border-top-left-radius: 2px;
459
border-bottom-left-radius: 2px;
460
}
461
&:last-child {
462
border-top-right-radius: 2px;
463
border-bottom-right-radius: 2px;
464
}
465
&:only-child {
466
border-radius: 2px;
467
}
468
}
469
470
%linked_vertical_middle {
471
outline-radius: 2px;
472
border-radius: 0;
473
}
474
475
%linked_vertical{
476
@extend %linked_vertical_middle;
477
&:first-child {
478
border-top-left-radius: 2px;
479
border-top-right-radius: 2px;
480
}
481
&:last-child {
482
border-bottom-left-radius: 2px;
483
border-bottom-right-radius: 2px;
484
}
485
&:only-child {
486
border-radius: 2px;
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: 2px;
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: gtkalpha(currentColor, $lower_opacity);
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: 2px 2px 0 0;
558
}
559
&:last-child {
560
border-radius: 0 0 2px 2px;
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: 2px;
663
// box-shadow: $shadow_2, inset 0 1px $highlight_color;
664
background-color: $base_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: 2px 2px 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: $secondary_titlebar_fg_color;
707
}
708
709
.title {
710
transition: $longer_transition;
711
padding-left: 12px;
712
padding-right: 12px;
713
font-weight: bold;
714
}
715
716
.subtitle {
717
transition: $longer_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, $disabled_opacity);
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: $secondary_inverse_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: $secondary_inverse_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: $disabled_inverse_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: scale-alpha($inverse_fg_color, $secondary_opacity);
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: scale-alpha($primary_color, $lower_opacity);
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: $secondary_titlebar_fg_color;
949
&:hover { //Seems like it :hover even with keyboard focus
950
transition: none;
951
background-color: gtkalpha(currentColor, $lower_opacity / 2);
952
color: $titlebar_fg_color;
953
}
954
&:insensitive {
955
color: $disabled_secondary_titlebar_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: $base_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: 2px;
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: gtkalpha(currentColor, $lower_opacity / 2);
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: gtkalpha(currentColor, $lower_opacity / 2); }
994
&:insensitive {
995
background-color: transparent;
996
border-color: transparent;
997
}
998
}
999
}
1000
1001
.menuitem .accelerator { color: gtkalpha(currentColor, $tertiary_opacity); }
1002
1003
.csd.popup { border-radius: 2px; }
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: 2px + 1px;
1016
background-color: $lighter_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: 2px;
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: gtkalpha(currentColor, $secondary_opacity); }
1233
&:insensitive {
1234
color: $disabled_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 scale-alpha($base_color, $lower_opacity);
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: scale-alpha($base_color, $higher_opacity);
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: $tertiary_fg_color;
1300
&:hover { background-color: $secondary_fg_color; }
1301
&:active { background-color: $fg_color; }
1302
&:insensitive {
1303
opacity: $disabled_opacity;
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: $small_size;
1371
-GtkSwitch-slider-height: $small_size;
1372
1373
outline-offset: -4px;
1374
outline-radius: 100px;
1375
font-size: 0;
1376
&.trough {
1377
// similar to the .scale
1378
border: 8px solid transparent;
1379
border-radius: 100px;
1380
background-color: $fill_color;
1381
// background-clip: padding-box;
1382
&:insensitive {
1383
color: gtkalpha(currentColor, $disabled_opacity);
1384
}
1385
&:active {
1386
background-color: scale-alpha($accent_color, 0.5);
1387
&:insensitive {
1388
background-color: scale-alpha($accent_color, 0.5 * $disabled_opacity);
1389
}
1390
}
1391
}
1392
&.slider {
1393
padding: 4px;
1394
border-radius: 100px;
1395
@include entry(normal);
1396
&:hover { @include entry(focus); }
1397
&:active { background-color: $accent_color; }
1398
&:insensitive { @include entry(insensitive); }
1399
}
1400
.list-row:selected & {
1401
}
1402
1403
}
1404
1405
/*************************
1406
* Check and Radio items *
1407
*************************/
1408
1409
// draw regular check and radio items using our PNG assets
1410
// all assets are rendered from assets.svg. never add pngs directly
1411
1412
@each $w,$a in ('check', 'checkbox'),
1413
('radio', 'radio') {
1414
1415
//standard checks and radios
1416
@each $s,$as in ('', '-unchecked'),
1417
(':hover', '-unchecked-hover'),
1418
(':active', '-unchecked-active'),
1419
(':insensitive', '-unchecked-disabled'),
1420
(':inconsistent', '-mixed'),
1421
(':inconsistent:hover', '-mixed-hover'),
1422
(':inconsistent:active', '-mixed-active'),
1423
(':inconsistent:insensitive', '-mixed-disabled'),
1424
(':checked', '-checked'),
1425
(':checked:hover', '-checked-hover'),
1426
(':checked:active', '-checked-active'),
1427
(':checked:insensitive', '-checked-disabled') {
1428
.#{$w}#{$s} {
1429
-gtk-icon-source: -gtk-scaled(url("assets/#{$a}#{$as}#{$asset_suffix}.png"),
1430
url("assets/#{$a}#{$as}#{$asset_suffix}@2.png"));
1431
&.button.flat {}
1432
}
1433
}
1434
1435
//menu
1436
@each $s,$as in ('', '-unchecked'),
1437
(':insensitive', '-unchecked-disabled'),
1438
(':inconsistent', '-mixed'),
1439
(':inconsistent:insensitive', '-mixed-disabled'),
1440
(':checked', '-checked'),
1441
(':checked:insensitive', '-checked-disabled') {
1442
.menu .menuitem.#{$w}#{$s} {
1443
// color: gtkalpha(currentColor, $tertiary_opacity);
1444
// -gtk-icon-source: -gtk-icontheme('#{$a}-symbolic');
1445
// &:active, &:checked { -gtk-icon-source: -gtk-icontheme('#{$a}-checked-symbolic'); }
1446
// &:inconsistent { -gtk-icon-source: -gtk-icontheme('#{$a}-mixed-symbolic'); }
1447
-gtk-icon-source: -gtk-scaled(url("assets/menu-#{$a}#{$as}#{$asset_suffix}.png"),
1448
url("assets/menu-#{$a}#{$as}#{$asset_suffix}@2.png"));
1449
}
1450
}
1451
}
1452
1453
//treeview and list-rows
1454
.view.check, .view.radio,
1455
.list-row .check, list-row .radio {
1456
}
1457
1458
//selection-mode
1459
@each $s,$as in ('', '-unchecked'),
1460
(':checked', '-checked') {
1461
.view.content-view.check#{$s}:not(.list) {
1462
-gtk-icon-source: -gtk-scaled(url("assets/selectionmode-checkbox#{$as}#{$asset_suffix}.png"),
1463
url("assets/selectionmode-checkbox#{$as}#{$asset_suffix}@2.png"));
1464
background-color: transparent;
1465
icon-shadow: $shadow_1;
1466
&:hover, &:active { icon-shadow: $shadow_2; }
1467
// &:insensitive { icon-shadow: none; }
1468
}
1469
}
1470
1471
GtkCheckButton.text-button, GtkRadioButton.text-button {
1472
// this is for a nice focus on check and radios text
1473
padding: 2px 4px;
1474
outline-offset: 0;
1475
&:insensitive,
1476
&:insensitive:active,
1477
&:insensitive:inconsistent {
1478
// set insensitive color, which is overriden otherwise
1479
// color: $disabled_fg_color;
1480
}
1481
}
1482
1483
/************
1484
* GtkScale *
1485
************/
1486
.scale,
1487
.scale.scale-has-marks-above.scale-has-marks-below,
1488
.scale.vertical.scale-has-marks-above.scale-has-marks-below {
1489
// FIXME: rationalize
1490
-GtkScale-slider-length: 20;
1491
-GtkRange-slider-width: 20;
1492
-GtkRange-trough-border: 2;
1493
outline-offset: -8px;
1494
outline-radius: 100px;
1495
1496
&.fine-tune {
1497
&.slider { background-size: 80%; }
1498
}
1499
1500
&.slider {
1501
// @include entry(normal);
1502
// border-radius: 50%;
1503
// background-color: $accent_color;
1504
@each $s,$as in ('', ''),
1505
(':insensitive', '-disabled') {
1506
&.slider#{$s} {
1507
$_url: 'assets/scale-slider#{$as}#{$asset_suffix}';
1508
border-style: none;
1509
border-radius: 0;
1510
background-color: transparent;
1511
background-image: -gtk-scaled(url('#{$_url}.png'),
1512
url('#{$_url}@2.png'));
1513
background-repeat: no-repeat;
1514
background-position: center;
1515
background-size: 80%;
1516
box-shadow: none;
1517
}
1518
}
1519
&:hover, &:active { background-size: 100%; }
1520
&:hover {
1521
// @include entry(focus);
1522
// border-radius: 50%; // needed for double marks scales
1523
}
1524
&:insensitive {
1525
// @include entry(insensitive);
1526
// border-radius: 50%; // overridden
1527
}
1528
//OSD sliders
1529
.osd & {
1530
}
1531
}
1532
&.trough {
1533
margin: 10px 12px;
1534
background-color: $fill_color;
1535
&.highlight {
1536
background-color: $accent_color;
1537
&:insensitive { background-color: $fill_color; }
1538
}
1539
&:insensitive { color: $disabled_fg_color; }
1540
&.vertical { margin: 12px 10px; }
1541
//OSD troughs
1542
.osd & {
1543
}
1544
}
1545
// marks color
1546
&.separator {
1547
color: $fill_color;
1548
}
1549
// scales on selected list rows
1550
.list-row:selected & {
1551
}
1552
}
1553
1554
@each $d,$dn in ('', 'horz'),
1555
('.vertical', 'vert') {
1556
@each $w,$we in ('scale-has-marks-below', 'marks-after'),
1557
('scale-has-marks-above', 'marks-before') {
1558
.scale#{$d}.#{$w} {
1559
-GtkScale-slider-length: 20;
1560
-GtkRange-slider-width: 25;
1561
-GtkRange-trough-border: 2;
1562
1563
@extend %#{$we}-#{$dn};
1564
1565
@each $s,$as in ('', ''),
1566
(':insensitive', '-disabled') {
1567
&.slider#{$s} {
1568
$_url: 'assets/scale-#{$dn}-#{$we}-slider#{$as}#{$asset_suffix}';
1569
border-style: none;
1570
border-radius: 0;
1571
background-color: transparent;
1572
background-image: -gtk-scaled(url('#{$_url}.png'),
1573
url('#{$_url}@2.png'));
1574
background-repeat: no-repeat;
1575
background-position: center;
1576
box-shadow: none;
1577
}
1578
}
1579
}
1580
}
1581
}
1582
1583
%marks-before-horz {
1584
.trough { margin: 15px 12px 10px; }
1585
}
1586
%marks-after-horz {
1587
.trough { margin: 10px 12px 15px; }
1588
}
1589
%marks-before-vert {
1590
.trough { margin: 12px 10px 12px 15px; }
1591
}
1592
%marks-after-vert {
1593
.trough { margin: 12px 15px 12px 10px; }
1594
}
1595
1596
/*****************
1597
* Progress bars *
1598
*****************/
1599
1600
GtkProgressBar {
1601
-GtkProgressBar-min-horizontal-bar-height: 4;
1602
-GtkProgressBar-min-vertical-bar-width: 4;
1603
padding: 0;
1604
font-size: smaller;
1605
color: $tertiary_fg_color;
1606
&.osd {
1607
-GtkProgressBar-xspacing: 0;
1608
-GtkProgressBar-yspacing: 0;
1609
-GtkProgressBar-min-horizontal-bar-height: 4;
1610
}
1611
&.trough { // background
1612
border-radius: 0;
1613
background-color: scale-alpha($primary_color, $lower_opacity);
1614
&.osd {
1615
border-style: none;
1616
box-shadow: none;
1617
// background-color: transparent;
1618
}
1619
}
1620
}
1621
1622
// moving bit
1623
.progressbar {
1624
border-radius: 0;
1625
background-color: $primary_color;
1626
&.left {
1627
border-top-left-radius: 0;
1628
border-bottom-left-radius: 0;
1629
}
1630
&.right {
1631
border-top-right-radius: 0;
1632
border-bottom-right-radius: 0;
1633
}
1634
&.left.right {
1635
box-shadow: none;
1636
}
1637
&.vertical {
1638
&.bottom {
1639
border-bottom-left-radius: 0;
1640
border-bottom-right-radius: 0;
1641
box-shadow: none;
1642
}
1643
&.top {
1644
border-top-left-radius: 0;
1645
border-top-right-radius: 0;
1646
}
1647
}
1648
&.osd {
1649
background-image: none;
1650
background-color: $primary_color;
1651
border-style: none;
1652
border-radius: 0;
1653
}
1654
}
1655
1656
1657
/*************
1658
* Level Bar *
1659
*************/
1660
1661
.level-bar {
1662
box-shadow: $shadow_1; // needs to be set here to avoid clipping
1663
color: $disabled_fg_color;
1664
-GtkLevelBar-min-block-width: 36;
1665
-GtkLevelBar-min-block-height: 4;
1666
&.vertical {
1667
-GtkLevelBar-min-block-width: 4;
1668
-GtkLevelBar-min-block-height: 36;
1669
}
1670
&.trough {
1671
padding: 2px;
1672
border-radius: 2px;
1673
@include entry(normal);
1674
&:insensitive { @include entry(insensitive); }
1675
&.indicator-discrete {
1676
&.horizontal { padding: 2px 1px; }
1677
&.vertical { padding: 1px 2px; }
1678
}
1679
}
1680
&.fill-block {
1681
// FIXME: it would be nice to set make fill blocks bigger, but we'd need
1682
// :nth-child working on discrete indicators
1683
background-color: $primary_color;
1684
border-radius: 0;
1685
box-shadow: none;
1686
&.indicator-discrete {
1687
&.horizontal { margin: 0 1px; }
1688
&.vertical { margin: 1px 0; }
1689
}
1690
&.level-high {
1691
background-color: $success_color;
1692
}
1693
&.level-low {
1694
background-color: $warning_color;
1695
}
1696
&.empty-fill-block {
1697
background-color: $fill_color;
1698
}
1699
}
1700
}
1701
1702
1703
/**********
1704
* Frames *
1705
**********/
1706
.frame {
1707
border: 1px solid $border_color;
1708
&.flat { border-style: none; }
1709
padding: 0;
1710
&.action-bar {
1711
padding: $container_padding;
1712
border-width: 1px 0 0;
1713
.button:not(.suggested-action):not(.destructive-action) { @extend %button.flat; }
1714
}
1715
}
1716
1717
GtkScrolledWindow {
1718
GtkViewport.frame { // avoid double borders when viewport inside
1719
// scrolled window
1720
border-style: none;
1721
}
1722
}
1723
1724
//vbox and hbox separators
1725
.separator {
1726
// always disable separators
1727
// -GtkWidget-wide-separators: true;
1728
color: $border_color;
1729
1730
// Font and File button separators
1731
GtkFileChooserButton &.vertical,
1732
GtkFontButton &.vertical {
1733
// always disable separators
1734
-GtkWidget-wide-separators: true;
1735
}
1736
}
1737
1738
/*********
1739
* Lists *
1740
*********/
1741
1742
.list {
1743
border-color: $border_color;
1744
background-color: $base_color;
1745
}
1746
1747
.list-row,
1748
.grid-child {
1749
padding: 2px;
1750
}
1751
1752
// FIXME
1753
$row_transition: $longer_transition, background-color 0, color 0;
1754
1755
.list-row.activatable {
1756
transition: $row_transition;
1757
box-shadow: inset 0 0 0 10000px gtkalpha(currentColor, 0);
1758
background-image: -gtk-gradient(radial,
1759
center center, 0,
1760
center center, 0.5,
1761
to(gtkalpha(currentColor, 0)),
1762
to(transparent)),
1763
linear-gradient(to bottom, gtkalpha(currentColor, 0));
1764
background-repeat: no-repeat;
1765
background-position: center, center;
1766
background-size: (192px / 0.8) (192px / 0.8), auto;
1767
&:hover {
1768
transition: $row_transition, box-shadow 0;
1769
box-shadow: inset 0 0 0 10000px gtkalpha(currentColor, 0.05);
1770
}
1771
&:active {
1772
transition: $row_transition, background-image 0;
1773
animation: list_ripple_effect $longer_duration $deceleration_curve forwards;
1774
box-shadow: inset 0 0 0 10000px gtkalpha(currentColor, $lower_opacity / 2);
1775
}
1776
}
1777
1778
.list-row:selected {
1779
@extend %selected_items;
1780
.button {
1781
&:insensitive { color: $disabled_secondary_inverse_fg_color; }
1782
&.flat {
1783
color: $secondary_inverse_fg_color;
1784
&:hover, &:active { color: $inverse_fg_color; }
1785
&:insensitive { color: $disabled_secondary_inverse_fg_color; }
1786
}
1787
}
1788
}
1789
1790
// transition
1791
.list-row {
1792
// &:hover { transition-duration: 0; }
1793
}
1794
1795
1796
/*********************
1797
* App Notifications *
1798
*********************/
1799
1800
.app-notification,
1801
.app-notification.frame {
1802
@extend %osd;
1803
@extend .toolbar.osd;
1804
.button { @extend %button.flat; }
1805
}
1806
1807
/*************
1808
* Expanders *
1809
*************/
1810
1811
.expander {
1812
-gtk-icon-source: -gtk-icontheme('pan-end-symbolic');
1813
&:dir(rtl) { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic-rtl'); }
1814
&:checked { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
1815
&:not(:hover):not(:active) { color: gtkalpha(currentColor, $secondary_opacity); }
1816
&:selected { color: $inverse_fg_color; }
1817
}
1818
1819
/************
1820
* Calendar *
1821
***********/
1822
GtkCalendar {
1823
padding: 1px;
1824
border: 1px solid $border_color;
1825
color: $fg_color;
1826
1827
&:insensitive { color: $disabled_fg_color; }
1828
1829
&:selected {
1830
@extend .view:selected;
1831
1832
border-radius: 2px + 1px;
1833
}
1834
1835
&.header {
1836
border-style: none none solid;
1837
border-radius: 0;
1838
}
1839
1840
&.button {
1841
@extend %simple_flat_button;
1842
}
1843
1844
&:inconsistent { color: gtkalpha(currentColor, $disabled_opacity); }
1845
&.highlight {
1846
font-size: smaller;
1847
color: gtkalpha(currentColor, $tertiary_opacity);
1848
}
1849
}
1850
1851
/***********
1852
* Dialogs *
1853
***********/
1854
1855
.message-dialog .dialog-action-area .button {
1856
padding: 8px;
1857
}
1858
1859
.message-dialog { // Message Dialog styling
1860
&.background { background-color: $lighter_bg_color; }
1861
.titlebar {
1862
border-style: none;
1863
box-shadow: inset 0 1px $highlight_color;
1864
background-color: $lighter_bg_color;
1865
}
1866
&.csd { // rounded bottom border styling for csd version
1867
&.background {
1868
// bigger radius for better antialiasing
1869
border-bottom-left-radius: 2px;
1870
border-bottom-right-radius: 2px;
1871
}
1872
.dialog-action-area .button {
1873
@extend %simple_flat_button;
1874
padding: 9px 16px 10px;
1875
border-top: 1px solid $border_color;
1876
border-radius: 0;
1877
background-size: (192px / 0.8) (192px / 0.8), auto;
1878
// &:first-child{ border-bottom-left-radius: 2px; }
1879
// &:last-child { border-bottom-right-radius: 2px; }
1880
&:first-child{ border-radius: 0 0 0 2px; }
1881
&:last-child { border-radius: 0 0 2px 0; }
1882
}
1883
}
1884
}
1885
1886
GtkFileChooserDialog {
1887
.search-bar {
1888
// background-color: $base_color;
1889
// border-color: $bg_color;
1890
}
1891
.dialog-action-box {
1892
border-top: 1px solid $border_color;
1893
}
1894
}
1895
1896
/***********
1897
* Sidebar *
1898
***********/
1899
1900
.sidebar {
1901
border: none;
1902
background-color: $lighter_bg_color;
1903
1904
&:selected {
1905
@extend %selected_items;
1906
}
1907
}
1908
1909
GtkSidebarRow {
1910
// Needs overriding of the GtkListBoxRow padding
1911
&.list-row {
1912
padding: 0px;
1913
}
1914
// Using margins/padding directly in the SidebarRow
1915
// will make the animation of the new bookmark row jump
1916
.sidebar-revealer {
1917
padding: 4px 14px 4px 12px;
1918
}
1919
.sidebar-icon {
1920
opacity: $tertiary_opacity; // dim the device icons
1921
&:dir(ltr) { padding-right: 8px; }
1922
&:dir(rtl) { padding-left: 8px; }
1923
}
1924
.sidebar-label {
1925
&:dir(ltr) { padding-right: 2px; }
1926
&:dir(rtl) { padding-left: 2px; }
1927
}
1928
}
1929
1930
GtkPlacesSidebar.sidebar {
1931
// looks like the label doesn't get all the states so work around
1932
.list-row:selected:insensitive .label { @extend %selected_items:insensitive; }
1933
1934
.sidebar-placeholder-row {
1935
border: solid 1px $primary_color;
1936
}
1937
1938
.sidebar-new-bookmark-row {
1939
color: $accent_color;
1940
}
1941
1942
@at-root .sidebar-button.button { // @at-root needded to not change the specificity making button styling inheritance broken
1943
// so istead of "GtkPlacesSidebar.sidebar .sidebar-button.button" [specificity 0,0,3,1]
1944
// the extended selector ".sidebar-button.button" [specificity 0,0,2,0]
1945
1946
&.image-button { padding: 4px; }
1947
1948
@extend %simple_flat_button;
1949
}
1950
// this is for indicating which sidebar row generated a popover
1951
// see https://bugzilla.gnome.org/show_bug.cgi?id=754411
1952
.has-open-popup { @extend .list-row.activatable:active; }
1953
}
1954
1955
.sidebar-item {
1956
padding: 10px 4px;
1957
> .label {
1958
padding-left: 6px;
1959
padding-right: 6px;
1960
}
1961
&.needs-attention > .label {
1962
@extend %needs_attention;
1963
}
1964
}
1965
1966
/*********
1967
* Paned *
1968
*********/
1969
1970
GtkPaned { // this is for the standard paned separator
1971
1972
-GtkPaned-handle-size: 1; // sets separator width
1973
1974
-gtk-icon-source: none; // removes handle decoration
1975
margin: 0 8px 8px 0; // drag area of the separator, not a real margin
1976
&:dir(rtl) {
1977
margin-right: 0;
1978
margin-left: 8px;
1979
}
1980
.pane-separator {
1981
background-color: $border_color;
1982
}
1983
}
1984
1985
GtkPaned.wide { // this is for the paned with wide separator
1986
-GtkPaned-handle-size: 6; // wider separator here
1987
margin: 0; // no need of the invisible drag area so, reset margin
1988
.pane-separator {
1989
background-color: transparent;
1990
border-style: none solid;
1991
border-color: $border_color;
1992
border-width: 1px;
1993
}
1994
&.vertical .pane-separator { border-style: solid none;}
1995
}
1996
1997
1998
/**************
1999
* GtkInfoBar *
2000
**************/
2001
GtkInfoBar {
2002
border-style: none;
2003
}
2004
2005
.info {
2006
background-color: $info_bg_color;
2007
}
2008
2009
.question {
2010
background-color: $question_bg_color;
2011
}
2012
2013
.warning {
2014
background-color: $warning_bg_color;
2015
}
2016
2017
.error {
2018
background-color: $error_bg_color;
2019
}
2020
2021
.info,
2022
.question,
2023
.warning,
2024
.error {
2025
color: $inverse_fg_color;
2026
.button {
2027
// @extend .list-row:selected.button;
2028
&:insensitive { color: $disabled_secondary_inverse_fg_color; }
2029
}
2030
.label:selected {
2031
}
2032
}
2033
2034
/************
2035
* Tooltips *
2036
************/
2037
2038
.tooltip {
2039
&.background {
2040
// background-color needs to be set this way otherwise it gets drawn twice
2041
// see https://bugzilla.gnome.org/show_bug.cgi?id=736155 for details.
2042
box-shadow: inset 0 1px $highlight_color;
2043
background-color: scale-alpha($base_color, $higher_opacity);
2044
}
2045
2046
// @extend %osd;
2047
color: $fg_color;
2048
padding: 4px; /* not working */
2049
border-radius: 2px;
2050
box-shadow: none; // otherwise it gets inherited by windowframe.csd
2051
// FIXME: we need a border or tooltips vanish on black background.
2052
&.window-frame.csd {
2053
background-color: transparent;
2054
}
2055
}
2056
2057
.tooltip * { //Yeah this is ugly
2058
padding: 4px;
2059
background-color: transparent;
2060
color: inherit; // just to be sure
2061
}
2062
2063
/*****************
2064
* Color Chooser *
2065
*****************/
2066
2067
GtkColorSwatch {
2068
// This widget is made of two boxes one on top of the other, the lower box is GtkColorSwatch {} the other one
2069
// is GtkColorSwatch > .overlay {}, GtkColorSwatch has the programmatically set background, so most of the style
2070
// is applied to the overlay box.
2071
2072
transition: $shadow_transition;
2073
box-shadow: $shadow_1;
2074
2075
// we need to re-set the shadow here since it get axed by the previous bit
2076
&:selected { }
2077
2078
// base color corners rounding
2079
// to avoid the artifacts caused by rounded corner anti-aliasing the base color
2080
// sports a bigger radius.
2081
// nth-child is needed by the custom color strip.
2082
// The :not() madness is needed since actually the overlay is selectable by GtkColorSwatch > .overlay
2083
// and GtkColorSwatch.overlay, I know it's weird, but this is gtk+, not a browser.
2084
&.top {
2085
border-top-left-radius: 2px;
2086
border-top-right-radius: 2px;
2087
}
2088
&.bottom {
2089
border-bottom-left-radius: 2px;
2090
border-bottom-right-radius: 2px;
2091
}
2092
&.left, &:first-child:not(.overlay):not(.top) {
2093
border-top-left-radius: 2px;
2094
border-bottom-left-radius: 2px;
2095
}
2096
&.right, &:last-child:not(.overlay):not(.bottom) {
2097
border-top-right-radius: 2px;
2098
border-bottom-right-radius: 2px;
2099
}
2100
&:only-child:not(.overlay) { border-radius: 2px; }
2101
2102
// overlay corner rounding
2103
&.top > .overlay {
2104
border-top-left-radius: 2px;
2105
border-top-right-radius: 2px;
2106
}
2107
&.bottom > .overlay {
2108
border-bottom-left-radius: 2px;
2109
border-bottom-right-radius: 2px;
2110
}
2111
&:first-child:not(.top) > .overlay {
2112
border-top-left-radius: 2px;
2113
border-bottom-left-radius: 2px;
2114
}
2115
&:last-child:not(.bottom) > .overlay {
2116
border-top-right-radius: 2px;
2117
border-bottom-right-radius: 2px;
2118
}
2119
&:only-child > .overlay { border-radius: 2px; }
2120
2121
// hover effect
2122
&:hover { box-shadow: $shadow_2; }
2123
2124
// no hover effect for the colorswatch in the color editor
2125
GtkColorEditor & {
2126
border-radius: 2px; // same radius as the entry
2127
&:hover { box-shadow: $shadow_1; }
2128
}
2129
2130
// indicator and keynav outline colors
2131
&.color-dark {
2132
color: $light_fg_color;
2133
}
2134
&.color-light {
2135
color: $dark_fg_color;
2136
}
2137
2138
// border color
2139
&.overlay,
2140
&.overlay:selected {
2141
}
2142
2143
// make the add color button looks like, well, a button
2144
&#add-color-button {
2145
background-image: linear-gradient(to right,
2146
$error_bg_color 25%,
2147
$warning_bg_color 25%, $warning_bg_color 50%,
2148
$info_bg_color 50%, $info_bg_color 75%,
2149
$question_bg_color 75%);
2150
color: $light_fg_color;
2151
}
2152
}
2153
2154
2155
/********
2156
* Misc *
2157
********/
2158
2159
//content view (grid/list)
2160
.content-view {
2161
background-color: $bg_color;
2162
// &:hover { -gtk-image-effect: highlight; }
2163
&.rubberband { @extend .rubberband; }
2164
}
2165
2166
.scale-popup {
2167
2168
.osd & { @extend %osd; }
2169
2170
.osd & .button.flat { //FIXME: quick hack, redo properly
2171
}
2172
2173
.button { // +/- buttons on GtkVolumeButton popup
2174
padding: 10px;
2175
}
2176
}
2177
2178
GtkScaleButton.button,
2179
GtkVolumeButton.button {
2180
// I assume both are image-button *by default*
2181
// with the image-button/text-button classes automagically applied depending on the button child these selectors can be deleted.
2182
@extend %image_button;
2183
2184
&.text-button { @extend .text-button }
2185
}
2186
2187
/**********************
2188
* Window Decorations *
2189
*********************/
2190
2191
.window-frame {
2192
transition: $shadow_transition;
2193
border-radius: 2px 2px 0 0;
2194
box-shadow: $shadow_4;
2195
2196
// FIXME rationalize window-frame shadows
2197
2198
/* this is used for the resize cursor area */
2199
margin: 8px;
2200
2201
&:backdrop {
2202
box-shadow: $shadow_2;
2203
}
2204
&.tiled {
2205
border-radius: 0;
2206
}
2207
&.popup {
2208
box-shadow: none;
2209
}
2210
// server-side decorations as used by mutter
2211
&.ssd {
2212
box-shadow: 0 3px 3px rgba(0, 0, 0, 0.16); //just doing borders, wm draws actual shadows
2213
}
2214
&.csd {
2215
&.popup {
2216
border-radius: 2px;
2217
box-shadow: $shadow_2;
2218
}
2219
&.tooltip {
2220
border-radius: 2px;
2221
box-shadow: $shadow_2;
2222
}
2223
&.message-dialog {
2224
border-radius: 2px;
2225
box-shadow: $shadow_4;
2226
&:backdrop { box-shadow: $shadow_2; }
2227
}
2228
}
2229
&.solid-csd {
2230
border-radius: 0;
2231
margin: 4px;
2232
background-color: $warning_color;
2233
// border: solid 1px $border_color;
2234
box-shadow: none;
2235
}
2236
}
2237
2238
// Window Close button
2239
.header-bar .button.titlebutton,
2240
.titlebar .button.titlebutton {
2241
// @extend %simple_flat_button;
2242
@extend %image_button;
2243
2244
&:active { // add fallback
2245
background-image: -gtk-gradient(radial,
2246
center center, 0,
2247
center center, 0.4,
2248
to(gtkalpha(currentColor, $lower_opacity / 2)),
2249
to(transparent)),
2250
linear-gradient(to bottom, gtkalpha(currentColor, $lower_opacity / 2));
2251
}
2252
}
2253
2254
// catch all extend :)
2255
2256
%selected_items {
2257
background-color: $primary_color;
2258
color: $inverse_fg_color;
2259
&:insensitive { color: $disabled_inverse_fg_color; }
2260
}
2261
2262
.monospace {
2263
font: Monospace;
2264
}
2265
2266
/**********************
2267
* Touch Copy & Paste *
2268
*********************/
2269
2270
//touch selection handlebars for the Popover.osd above
2271
.entry.cursor-handle,
2272
.cursor-handle {
2273
background-color: $accent_color;
2274
background-image: none;
2275
box-shadow: none;
2276
border-style: none;
2277
@each $s,$as in ('', ''),
2278
(':hover', '-hover'),
2279
(':active', '-active') { //no need for insensitive and backdrop
2280
&.top#{$s}:dir(ltr), &.bottom#{$s}:dir(rtl) {
2281
$_url: 'assets/text-select-start#{$as}#{$asset_suffix}';
2282
-gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
2283
url('#{$_url}@2.png'));
2284
padding-left: 10px;
2285
}
2286
&.bottom#{$s}:dir(ltr), &.top#{$s}:dir(rtl) {
2287
$_url: 'assets/text-select-end#{$as}#{$asset_suffix}';
2288
-gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
2289
url('#{$_url}@2.png'));
2290
padding-right: 10px;
2291
}
2292
&.insertion-cursor#{$s}:dir(ltr), &.insertion-cursor#{$s}:dir(rtl) {
2293
$_url: 'assets/scale-horz-marks-before-slider#{$as}#{$asset_suffix}';
2294
-gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
2295
url('#{$_url}@2.png'));
2296
}
2297
}
2298
}
2299
2300
/* Decouple the font of context menus from their entry/textview */
2301
.context-menu {
2302
font: initial;
2303
}
2304
2305
.touch-selection {
2306
font: initial;
2307
color: $fg_color;
2308
background-color: $base_color;
2309
box-shadow: $shadow_2;
2310
&:backdrop { box-shadow: $shadow_1; }
2311
.button {
2312
}
2313
}
2314
2315
// This is used by GtkScrolledWindow, when content is touch-dragged past boundaries.
2316
// This draws a box on top of the content, the size changes programmatically.
2317
.overshoot {
2318
&.top {
2319
@include overshoot(top);
2320
}
2321
&.bottom {
2322
@include overshoot(bottom);
2323
}
2324
&.left {
2325
@include overshoot(left);
2326
}
2327
&.right {
2328
@include overshoot(right);
2329
}
2330
}
2331
2332
// Overflow indication, works similarly to the overshoot, the size if fixed tho.
2333
.undershoot {
2334
&.top {
2335
@include undershoot(top);
2336
}
2337
2338
&.bottom {
2339
@include undershoot(bottom);
2340
}
2341
2342
&.left {
2343
@include undershoot(left);
2344
}
2345
2346
&.right {
2347
@include undershoot(right);
2348
}
2349
}
2350