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