Debian Codegraph @

src/gtk4/widgets/_scale.scss

raw
1 @charset "UTF-8";
2
3 /************
4 * GtkScale *
5 ************/
6 scale {
7 padding: 12px;
8
9 &.fine-tune {
10 &.trough {
11 margin: 8px;
12 border-radius: $r;
13 }
14 }
15
16 slider {
17 min-width: 16px;
18 min-height: 16px;
19 border: 1px solid gtkmix(gtk("@theme_bg_color"),gtk("@theme_button_foreground_normal"), 0.4);
20 border-radius: 50%;
21 box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.125);
22
23 background: gtk("@theme_button_background_normal");
24 margin: -9px;
25
26 &:hover {
27 border-color: gtk("@theme_button_decoration_hover");
28 border-radius: 50%; // needed for double marks scales
29
30 &:backdrop {
31 border-color: gtk(
32 "@theme_button_decoration_hover_insensitive"
33 );
34 }
35 }
36
37 &:disabled {
38 border-style: solid; // needed for double marks scales or they'll get
39 border-radius: 50%; // overridden
40 background-color: gtk("@theme_button_background_insensitive");
41 opacity: 1;
42 border-color: gtk("@insensitive_borders");
43 &:backdrop {
44 background-color: gtkalpha(
45 gtk(
46 "@theme_button_background_backdrop_insensitive"
47 ),
48 100
49 );
50 border-color: gtk("@unfocused_insensitive_borders");
51 }
52 }
53 &:active {
54 box-shadow: none;
55 background-color: gtk("@theme_button_background_normal");
56 &:backdrop {
57 background-color: gtk(
58 "@theme_button_background_normal"
59 );
60 border-color: gtk(
61 "@theme_button_decoration_focus_backdrop"
62 );
63 }
64 }
65 &:backdrop {
66 background-color: gtk(
67 "@theme_button_background_backdrop"
68 );
69 border-color: gtk("@unfocused_borders");
70 }
71 }
72
73 &:focus-within slider {
74 border-color: gtk("@theme_button_decoration_focus");
75 border-radius: 50%; // needed for double marks scales
76
77 &:backdrop {
78 border-color: gtk(
79 "@theme_button_decoration_focus_insensitive"
80 );
81 }
82 }
83
84 trough {
85 min-width: 4px;
86 min-height: 4px;
87 border: 1px solid;
88 border-radius: $r;
89
90 background: gtkoverlay(
91 gtk("@theme_bg_color"),
92 gtkalpha(gtk("@theme_button_foreground_normal"), 0.5*0.2)
93 );
94
95 border-color: gtkalpha(
96 gtk("@theme_button_foreground_normal"),
97 0.2
98 );
99
100 &:disabled, &.vertical:disabled {
101 background: gtkoverlayalpha(
102 gtk("@theme_bg_color"),
103 gtkalpha(gtk("@theme_button_foreground_normal"), 0.5*0.2),
104 0.5
105 );
106 border-color: gtkalpha(
107 gtk("@theme_button_foreground_normal"),
108 0.2 * 0.5
109 );
110 }
111 }
112
113 highlight {
114 margin: -1px;
115 border-radius: $r;
116 background: gtkoverlay(
117 gtk("@theme_bg_color"),
118 gtkalpha(gtk("@theme_button_decoration_hover"), 0.5)
119 );
120
121 border: 1px solid gtk("@theme_button_decoration_hover");
122
123 &:disabled {
124 background: none;
125 border-color: transparent;
126 }
127
128 &:backdrop {
129 background: gtkoverlay(
130 gtk("@theme_bg_color"),
131 gtkalpha(gtk("@theme_unfocused_selected_bg_color"), 0.5)
132 );
133
134 border-color: gtk(
135 "@theme_unfocused_selected_bg_color"
136 );
137
138 &:disabled {
139 background: none;
140 border-color: transparent;
141 }
142 }
143 }
144
145 $_marks_length: 8px;
146 $_marks_distance: 1px;
147
148
149 > label {
150 color: gtk("@theme_button_foreground_normal")
151 }
152
153 &.horizontal {
154 > marks {
155 color: gtkalpha(
156 gtk("@theme_button_foreground_normal"),
157 0.2
158 );
159 &.top { margin-bottom: $_marks_distance; }
160 &.bottom { margin-top: $_marks_distance; }
161
162 indicator {
163 background-color: gtkalpha(
164 gtk("@theme_button_foreground_normal"),
165 0.2
166 );
167 min-height: $_marks_length;
168 min-width: 1px;
169 }
170 }
171
172 > value.left { margin-right: 9px; }
173 > value.right { margin-left: 9px; }
174
175 &.fine-tune >marks {
176 &.top { margin-top: 3px; }
177 &.bottom { margin-bottom: 3px; }
178
179 indicator { min-height: ($_marks_length - 3px); }
180 }
181 }
182
183 &.vertical {
184 > marks {
185 color: gtkalpha(
186 gtk("@theme_button_foreground_normal"),
187 0.2
188 );
189 &.top { margin-right: $_marks_distance; }
190 &.bottom { margin-left: $_marks_distance; }
191
192 indicator {
193 background-color: gtkalpha(
194 gtk("@theme_button_foreground_normal"),
195 0.2
196 );
197 min-height: 1px;
198 min-width: $_marks_length;
199 }
200 }
201
202 > value.top { margin-bottom: 9px; }
203 > value.bottom { margin-top: 9px; }
204
205 &.fine-tune >marks {
206 &.top { margin-left: 3px; }
207 &.bottom { margin-right: 3px; }
208
209 indicator { min-height: ($_marks_length - 3px); }
210 }
211 }
212
213 }