Debian Codegraph @

src/gtk3/widgets/_treeview.scss

raw
1 @charset "UTF-8";
2
3 @mixin item-hover-middle {
4 @if $new-highlight {
5 background-color: gtk("@theme_selected_bg_color");
6 border-left-color: gtk("@theme_selected_fg_color");
7 border-top-color: gtk("@theme_selected_fg_color");
8 } @else {
9 background-color: gtkalpha(
10 gtk("@theme_selected_bg_color"),
11 0.3
12 );
13 border-left-color: gtk("@theme_fg_color");
14 border-top-color: gtk("@theme_fg_color");
15 }
16 }
17
18 @mixin item-selected-middle {
19 @if $new-highlight {
20 background-color: gtkalpha(
21 gtk("@theme_button_decoration_focus"),
22 0.3
23 );
24 color: gtk("@theme_button_foreground_active");
25 border: 1px solid gtk("@theme_button_decoration_focus");
26 border-left: 0;
27 border-right: 0;
28 border-radius: 0px;
29 } @else {
30 background-color: gtk("@theme_selected_bg_color");
31 border-left-color: gtk("@theme_selected_fg_color");
32 border-top-color: gtk("@theme_selected_fg_color");
33 }
34 }
35
36 @mixin item-selected-middle-backdrop {
37 @if $new-highlight {
38 background-color: gtkalpha(
39 gtk("@theme_button_decoration_focus_backdrop"),
40 0.3
41 );
42 color: gtk("@theme_button_foreground_active_backdrop");
43 border: 1px
44 solid
45 gtk("@theme_button_decoration_focus_backdrop");
46 border-left: 0;
47 border-right: 0;
48 border-radius: 0px;
49 } @else {
50 background-color: gtk(
51 "@theme_unfocused_selected_bg_color"
52 );
53 border-left-color: gtk(
54 "@theme_unfocused_selected_fg_color"
55 );
56 border-top-color: gtk(
57 "@theme_unfocused_selected_fg_color"
58 );
59 }
60 }
61
62 /**************
63 * Tree Views *
64 **************/
65 treeview.view {
66 -GtkTreeview-grid-line-width: 0;
67 -GtkTreeview-grid-line-pattern: "";
68 -GtkTreeview-tree-line-width: 1;
69 -GtkTreeview-tree-line-pattern: "";
70 -GtkTreeview-expander-size: 16;
71
72 border-left-color: gtk(
73 "@borders"
74 ); // this is actually the tree lines color,
75 border-top-color: transparent; // while this is the grid lines color, better then nothing
76
77 rubberband {
78 @extend rubberband;
79 } // to avoid borders being overridden by the previously set props
80
81 &:selected {
82 border-radius: 0;
83 } // rest border radius in lists
84
85 &:hover {
86 @include item-hover-middle();
87 }
88
89 &:selected {
90 @include item-selected-middle();
91 }
92
93 &:backdrop:selected {
94 @include item-selected-middle-backdrop();
95 }
96
97 &:disabled {
98 color: gtk("@insensitive_fg_color");
99 &:selected {
100 color: gtk("@insensitive_selected_fg_color");
101 &:backdrop {
102 color: gtk(
103 "@insensitive_unfocused_selected_fg_color"
104 );
105 }
106 }
107 &:backdrop {
108 color: gtk("@insensitive_unfocused_fg_color");
109 }
110 }
111 &.separator {
112 min-height: 2px;
113 color: gtk("@borders");
114 }
115 &.separator:backdrop {
116 color: gtk("@unfocused_borders");
117 }
118
119 &:backdrop {
120 border-left-color: gtk("@unfocused_borders");
121 }
122
123 &:drop(active) {
124 border-style: solid none;
125 border-width: 1px;
126 border-color: gtk("@theme_button_decoration_hover");
127 }
128
129 &.expander {
130 // GtkTreeView uses the larger of the expander’s min-width and min-height
131 min-width: 16px;
132 min-height: 16px;
133 -gtk-icon-source: -gtk-icontheme($arrow_right);
134 color: gtk("@theme_fg_color");
135 &:dir(rtl) {
136 -gtk-icon-source: -gtk-icontheme(
137 "go-next-rtl-symbolic"
138 );
139 }
140 &:hover {
141 color: gtk("@theme_button_decoration_hover");
142 }
143 &:selected {
144 color: gtk("@theme_selected_fg_color");
145 }
146 &:checked {
147 -gtk-icon-source: -gtk-icontheme($arrow_down);
148 &:selected {
149 color: gtk("@theme_selected_fg_color");
150 }
151 }
152 }
153 header {
154 button {
155 @extend %column_header_button;
156 color: gtk("@theme_button_foreground_normal");
157 background-color: gtk(
158 "@theme_button_background_normal"
159 );
160 text-shadow: none;
161 box-shadow: none;
162 &:hover {
163 @extend %column_header_button;
164 color: gtk("@theme_button_foreground_normal");
165 background-color: gtkalpha(
166 gtk("@theme_button_decoration_hover"),
167 0.5
168 );
169 box-shadow: none;
170 }
171 &:active {
172 @extend %column_header_button;
173 color: gtk("@theme_button_foreground_normal");
174 background-color: gtkalpha(
175 gtk("@theme_button_decoration_hover"),
176 0.5
177 );
178 }
179 }
180 button:last-child {
181 &:backdrop,
182 & {
183 border-right-style: none;
184 }
185 }
186 }
187 button.dnd,
188 header.button.dnd {
189 // for treeview-like derive widgets
190 &:active,
191 &:selected,
192 &:hover,
193 & {
194 padding: 0 6px;
195 color: gtk("@theme_selected_fg_color");
196 background-image: none;
197 background-color: gtk("@theme_selected_bg_color");
198 border-style: none;
199 border-radius: 0;
200 box-shadow: none;
201 text-shadow: none;
202 }
203 }
204 }
205
206 %column_header_button {
207 padding: 6px;
208 border-style: none solid solid none;
209 border-radius: 0;
210 background-image: none;
211 border-color: gtk("@borders");
212 text-shadow: none;
213 &:disabled {
214 border-color: gtk("@insensitive_borders");
215 color: gtk("@theme_button_foreground_insensitive");
216 background-color: gtk(
217 "@theme_button_background_insensitive"
218 );
219 background-image: none;
220 }
221 &:backdrop {
222 border-color: gtk("@unfocused_borders");
223 border-style: none solid solid none;
224 color: gtk("@theme_button_foreground_backdrop");
225 background-image: none;
226 background-color: gtk(
227 "@theme_button_background_backdrop"
228 );
229 &:disabled {
230 border-color: gtk("@unfocused_insensitive_borders");
231 background-image: none;
232 background-color: gtk(
233 "@theme_button_background_backdrop_insensitive"
234 );
235 color: gtk(
236 "@theme_button_foreground_backdrop_insensitive"
237 );
238 }
239 }
240 }