Changeset View
Changeset View
Standalone View
Standalone View
src/gtk318/widgets/_base.scss
- This file was added.
1 | @function gtkalpha($c,$a) { | ||||
---|---|---|---|---|---|
2 | @return unquote("alpha(#{$c},#{$a})"); | ||||
3 | } | ||||
4 | | ||||
5 | $ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94); | ||||
6 | | ||||
7 | * { | ||||
8 | padding: 0; | ||||
9 | -GtkToolButton-icon-spacing: 4; | ||||
10 | -GtkTextView-error-underline-color: $error_color; | ||||
11 | | ||||
12 | -GtkButton-child-displacement-x: 0; | ||||
13 | -GtkButton-child-displacement-y: 0; | ||||
14 | | ||||
15 | -GtkCheckButton-indicator-size: 18; | ||||
16 | -GtkCheckMenuItem-indicator-size: 18; | ||||
17 | | ||||
18 | // The size for scrollbars. The slider is 2px smaller, but we keep it | ||||
19 | // up so that the whole area is sensitive to button presses for the | ||||
20 | // slider. The stepper button is larger in both directions, the slider | ||||
21 | // only in the width | ||||
22 | | ||||
23 | -GtkScrolledWindow-scrollbar-spacing: 0; | ||||
24 | -GtkScrolledWindow-scrollbars-within-bevel: 1; | ||||
25 | | ||||
26 | -GtkToolItemGroup-expander-size: 11; | ||||
27 | -GtkExpander-expander-size: 16; | ||||
28 | -GtkTreeView-expander-size: 11; | ||||
29 | | ||||
30 | -GtkTreeView-horizontal-separator: 4; | ||||
31 | | ||||
32 | -GtkMenu-horizontal-padding: 0; | ||||
33 | -GtkMenu-vertical-padding: 0; | ||||
34 | | ||||
35 | -GtkWidget-link-color: $link_color; | ||||
36 | -GtkWidget-visited-link-color: $link_visited_color; | ||||
37 | | ||||
38 | -GtkWidget-focus-padding: 2; // FIXME: do we still need these? | ||||
39 | -GtkWidget-focus-line-width: 1; // | ||||
40 | | ||||
41 | -GtkWidget-text-handle-width: 20; | ||||
42 | -GtkWidget-text-handle-height: 20; | ||||
43 | | ||||
44 | -GtkDialog-button-spacing: 4; | ||||
45 | -GtkDialog-action-area-border: 0; | ||||
46 | | ||||
47 | -GtkStatusbar-shadow-type: none; | ||||
48 | | ||||
49 | outline-width: 0px; | ||||
50 | } | ||||
51 | | ||||
52 | | ||||
53 | /*************** | ||||
54 | * Base States * | ||||
55 | ***************/ | ||||
56 | | ||||
57 | .background { | ||||
58 | color: w_color(text); | ||||
59 | background-color: w_color(normal); | ||||
60 | | ||||
61 | &:backdrop { | ||||
62 | text-shadow: none; | ||||
63 | icon-shadow: none; | ||||
64 | color: backdrop(w_color(text)); | ||||
65 | background-color: backdrop(w_color(normal)); | ||||
66 | } | ||||
67 | } | ||||
68 | | ||||
69 | /* | ||||
70 | These wildcard seems unavoidable, need to investigate. | ||||
71 | Wildcards are bad and troublesome, use them with care, | ||||
72 | or better, just don't. | ||||
73 | Everytime a wildcard is used a kitten dies, painfully. | ||||
74 | */ | ||||
75 | | ||||
76 | *:insensitive { | ||||
77 | -gtk-image-effect: dim; | ||||
78 | } | ||||
79 | | ||||
80 | .gtkstyle-fallback { | ||||
81 | background-color: w_color(normal); | ||||
82 | color: w_color(text); | ||||
83 | &:prelight { | ||||
84 | background-color: lighten(w_color(normal), 10%); | ||||
85 | color: w_color(text); | ||||
86 | } | ||||
87 | &:active { | ||||
88 | background-color: darken(w_color(normal), 10%); | ||||
89 | color: w_color(text); | ||||
90 | } | ||||
91 | &:insensitive { | ||||
92 | background-color: insensitive(w_color(normal)); | ||||
93 | color: insensitive(w_color(text)); | ||||
94 | } | ||||
95 | &:selected { | ||||
96 | background-color: s_color(normal); | ||||
97 | color: s_color(text); | ||||
98 | } | ||||
99 | } | ||||
100 | | ||||
101 | .view { | ||||
102 | color: v_color(text); | ||||
103 | background-color: v_color(normal); | ||||
104 | | ||||
105 | &:backdrop { | ||||
106 | color: backdrop(v_color(text)); | ||||
107 | background-color: backdrop(v_color(normal)); | ||||
108 | } | ||||
109 | | ||||
110 | &:selected { | ||||
111 | border-radius: $r; | ||||
112 | @extend %selected_items; | ||||
113 | } | ||||
114 | | ||||
115 | &:insensitive { | ||||
116 | color: insensitive(v_color(text)); | ||||
117 | } | ||||
118 | } | ||||
119 | | ||||
120 | .rubberband { | ||||
121 | border: 1px solid s_color(normal); | ||||
122 | background-color: transparentize(s_color(normal),0.8); | ||||
123 | &:backdrop { | ||||
124 | border-color: backdrop(s_color(normal)); | ||||
125 | background-color: backdrop(transparentize(s_color(normal),0.8)); | ||||
126 | } | ||||
127 | } | ||||
128 | | ||||
129 | .label { | ||||
130 | &.separator { | ||||
131 | color: w_color(text); | ||||
132 | @extend .dim-label; | ||||
133 | &:backdrop { color: backdrop(w_color(text)); } | ||||
134 | } | ||||
135 | &:selected, | ||||
136 | &:selected:focus, | ||||
137 | &:selected:hover { | ||||
138 | @extend %selected_items; | ||||
139 | } | ||||
140 | &:insensitive { | ||||
141 | color: insensitive(w_color(text)); | ||||
142 | &:backdrop { color: backdrop(insensitive(w_color(text))); } | ||||
143 | } | ||||
144 | } | ||||
145 | | ||||
146 | .dim-label { | ||||
147 | opacity: 0.5; | ||||
148 | text-shadow: none; | ||||
149 | } | ||||
150 | | ||||
151 | GtkAssistant { | ||||
152 | .sidebar { | ||||
153 | background-color: v_color(text); | ||||
154 | border-top: 1px solid $border_color; | ||||
155 | &:dir(ltr) { border-right: 1px solid $border_color; } | ||||
156 | &:dir(rtl) { border-left: 1px solid $border_color; } | ||||
157 | &:backdrop { | ||||
158 | background-color: backdrop(v_color(text)); | ||||
159 | border-color: backdrop($border_color); | ||||
160 | } | ||||
161 | } | ||||
162 | &.csd .sidebar { border-top-style: none; } | ||||
163 | .sidebar .label { | ||||
164 | padding: 6px 12px; | ||||
165 | } | ||||
166 | .sidebar .label.highlight { | ||||
167 | background-color: mix(v_color(normal), v_color(text), 80%); | ||||
168 | } | ||||
169 | } | ||||
170 | | ||||
171 | GtkTextView { // This will get overridden by .view, needed by gedit line numbers | ||||
172 | background-color: mix(w_color(normal), v_color(normal), 50%); | ||||
173 | &:backdrop { background-color: backdrop(mix(w_color(normal), v_color(normal), 50%)); } | ||||
174 | &:insensitive { | ||||
175 | color: insensitive(v_color(text)); | ||||
176 | } | ||||
177 | } | ||||
178 | | ||||
179 | .grid-child { | ||||
180 | padding: 3px; | ||||
181 | border-radius: $r; | ||||
182 | &:selected { | ||||
183 | @extend %selected_items; | ||||
184 | } | ||||
185 | } | ||||
186 | | ||||
187 | %osd, .osd { | ||||
188 | color: w_color(text); | ||||
189 | border: 1px solid w_color(normal); | ||||
190 | background-color: transparentize(w_color(normal),0.2); | ||||
191 | background-clip: padding-box; | ||||
192 | box-shadow: none; | ||||
193 | text-shadow: none; | ||||
194 | icon-shadow: none; | ||||
195 | &:backdrop { | ||||
196 | color: backdrop(w_color(text)); | ||||
197 | background-color: backdrop(transparentize(w_color(normal),0.2)); | ||||
198 | } | ||||
199 | } | ||||
200 | | ||||
201 | %selected_items { | ||||
202 | background-color: s_color(normal); | ||||
203 | color: s_color(text); | ||||
204 | &:backdrop { | ||||
205 | background-color: backdrop(s_color(backdrop)); | ||||
206 | color: backdrop(v_color(normal)); | ||||
207 | } | ||||
208 | } |