Debian Codegraph @

src/gtk3/widgets/_progressbar.scss

raw
1 @charset "UTF-8";
2
3 /*****************
4 * Progress bars *
5 *****************/
6 progressbar {
7 // sizing
8 &.horizontal {
9 trough,
10 progress {
11 min-height: 4px;
12 }
13 }
14
15 &.vertical {
16 trough,
17 progress {
18 min-width: 4px;
19 }
20 }
21
22 // FIXME: insensitive state missing and some other state should be set probably
23 font-size: smaller;
24 color: gtkalpha(
25 gtk("@theme_button_foreground_normal"),
26 0.3
27 );
28
29 trough {
30 border: 1px solid;
31 border-radius: $r;
32 background: gtkoverlay(
33 gtk("@theme_bg_color"),
34 gtkalpha(gtk("@theme_button_foreground_normal"), 0.5*0.2)
35 );
36
37 border-color: gtkalpha(
38 gtk("@theme_button_foreground_normal"),
39 0.2
40 );
41 }
42
43 progress {
44 border: 1px solid;
45 margin: -1px;
46 border-radius: $r;
47 box-shadow: none; //needed for clipping
48 background: gtkoverlay(
49 gtk("@theme_bg_color"),
50 gtkalpha(gtk("@theme_button_decoration_hover"), 0.5)
51 );
52
53 border: 1px solid gtk("@theme_button_decoration_hover");
54 }
55
56 &:backdrop progress {
57 background: gtkoverlay(
58 gtk("@theme_bg_color"),
59 gtkalpha(gtk("@theme_unfocused_selected_bg_color"), 0.5)
60 );
61
62 border-color: gtk(
63 "@theme_unfocused_selected_bg_color"
64 );
65 } // states not passed here as well
66
67 &.osd {
68 // progressbar.osd used for epiphany page loading progress
69 background-color: transparent;
70 }
71 }
72
73 treeview.view {
74 &.progressbar {
75 border: 0px solid transparent;
76 border-radius: $r;
77 background-color: gtk("@theme_selected_bg_color");
78 color: gtk("@theme_selected_fg_color");
79 background-image: none;
80 &:selected {
81 &:focus,
82 & {
83 background-color: gtkalpha(
84 gtk("@theme_selected_bg_color"),
85 0.25
86 );
87 }
88 }
89 }
90 &.trough {
91 background-color: $trough_color;
92 &:selected {
93 &:focus,
94 & {
95 background-color: gtkalpha(
96 gtk("@theme_selected_fg_color"),
97 0.3
98 );
99 }
100 }
101 }
102 }
103
104 /*************
105 * Level Bar *
106 *************/
107 @mixin levelbar($color) {
108 border: 1px solid $color;
109 background: gtkoverlay(
110 gtk("@theme_bg_color"),
111 gtkalpha($color, 0.5)
112 );
113 box-shadow: none;
114 border-radius: $r;
115 }
116
117 levelbar {
118 block {
119 min-height: 6px;
120 }
121
122 &.vertical block {
123 min-width: 6px;
124 min-height: 32px;
125 }
126
127 trough {
128 border: 1px solid;
129 padding: 2px;
130 border-radius: 3px;
131 @include entry(normal);
132
133 &:backdrop {
134 @include entry(backdrop);
135 }
136 }
137
138 &.horizontal.discrete block {
139 margin: 0 1px;
140 min-width: 32px;
141 }
142
143 &.vertical.discrete block {
144 margin: 1px 0;
145 }
146
147 block {
148 &:not(.empty) {
149 @include levelbar(gtk("@theme_button_decoration_hover"));
150
151 &:backdrop {
152 @include levelbar(gtk("@theme_unfocused_selected_bg_color"));
153 }
154 }
155
156 &.low {
157 @include levelbar(gtk("@warning_color"));
158 &:backdrop {
159 @include levelbar(gtk("@warning_color_backdrop"));
160 }
161 }
162
163 &.full, &.high {
164 @include levelbar(gtk("@success_color"));
165
166 &:backdrop {
167 @include levelbar(gtk("@success_color_backdrop"));
168 }
169 }
170
171 &.empty {
172 @include levelbar(gtkalpha(gtk("@theme_button_foreground_normal"), 0.2));
173 }
174 }
175 }