Debian Codegraph @

src/gtk3/widgets/_scale.scss

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