summaryrefslogtreecommitdiff
path: root/Redcore-nighttime/gtk-3.0/scss/widgets/_scrollbar.scss
blob: 2d1af41edbaaefa139fc955b47b9f03c402bee17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/***********
 ! Scrollbar
************/

@include exports("scrollbar") {
    * {
        -GtkRange-slider-width: 8;
        -GtkRange-stepper-spacing: 0;
        -GtkRange-trough-border: 2;
        -GtkRange-trough-under-steppers: 1;
        -GtkScrollbar-has-backward-stepper: false;
        -GtkScrollbar-has-forward-stepper: false;
        -GtkScrollbar-min-slider-length: 80;
        -GtkScrolledWindow-scrollbar-spacing: 0;
        -GtkScrolledWindow-scrollbars-within-bevel: 1;
    }

    .scrollbar {
        border: 0;
        padding: 0;

        &.button {
            &, &:active, &:active:hover {
                border-width: 0;
                border-radius: 0;
                background-color: transparent;
                background-image: none;
                color: alpha($fg_color, .5);
            }
        }

        &.slider, &.slider.vertical {
            border: 0;
            border-radius: $roundness;
            background-color: mix($bg_color, $fg_color, 0.21);

            &:hover { background-color: mix($bg_color, $fg_color, .31); }

            &:active { background-color: $selected_bg_color; }

            &.fine-tune:hover:active { border: 2px solid transparent; }
        }

        // overlay scrolling indicator
        &.overlay-indicator {
            &:not(.dragging):not(.hovering) {
                opacity: .5;

                -GtkRange-slider-width: 4px;

                .slider {
                    margin: 0;
                    background-color: $fg_color;
                    background-clip: padding-box;
                }

                .trough {
                    border-style: none;
                    background-color: transparent;
                }
            }

            &.dragging, &.hovering { opacity: .7; }
        }
    }

    .scrollbars-junction,
    .scrollbars-junction.frame,
    .scrollbar.trough {
        border: 0;
        border-radius: 0;
        background-color: $bg_color;
        background-image: none;
    }

    // ubuntu overlay scrollbars
    OsThumb, OsScrollbar {
        color: shade($bg_color, .7);

        &:selected { background-color: $selected_bg_color; }

        &:active { background-color: $selected_bg_color; }

        &:insensitive { background-color: shade($bg_color, .9); }
    }
}