Changeset View
Changeset View
Standalone View
Standalone View
src/gtk3/widgets/_entry.scss
1 | @charset "UTF-8"; | 1 | @charset "UTF-8"; | ||
---|---|---|---|---|---|
2 | 2 | | |||
3 | @mixin entry($t, $fc:v_color(active)) { | 3 | @mixin entry($t, $fc:gtk("@theme_view_active_decoration_color")) { | ||
4 | // | 4 | // | ||
5 | // Entries drawing function | 5 | // Entries drawing function | ||
6 | // | 6 | // | ||
7 | // $t: entry type | 7 | // $t: entry type | ||
8 | // $fc: focus color | 8 | // $fc: focus color | ||
9 | // $edge: set to none to not draw the bottom edge or specify a color to not | 9 | // $edge: set to none to not draw the bottom edge or specify a color to not | ||
10 | // use the default one | 10 | // use the default one | ||
11 | // | 11 | // | ||
12 | // possible $t values: | 12 | // possible $t values: | ||
13 | // normal, focus, insensitive, backdrop, backdrop-insensitive, osd, osd-focus, osd-backdrop; | 13 | // normal, focus, insensitive, backdrop, backdrop-insensitive, osd, osd-focus, osd-backdrop; | ||
14 | // | 14 | // | ||
15 | @if $t==normal { | 15 | @if $t==normal { | ||
16 | color: v_color(text); | 16 | color: gtk("@theme_text_color"); | ||
17 | border-color: $border_color; | 17 | border-color: gtk("@borders"); | ||
18 | background-color: v_color(normal); | 18 | background-color: gtk("@theme_base_color"); | ||
19 | box-shadow: none; | 19 | box-shadow: none; | ||
20 | } | 20 | } | ||
21 | 21 | | |||
22 | @if $t==focus { | 22 | @if $t==focus { | ||
23 | border-color: $fc; | 23 | border-color: $fc; | ||
24 | } | 24 | } | ||
25 | 25 | | |||
26 | @if $t==insensitive { | 26 | @if $t==insensitive { | ||
27 | color: insensitive(v_color(text)); | 27 | color: gtk("@insensitive_base_fg_color"); | ||
28 | border-color: insensitive($border_color); | 28 | border-color: gtk("@insensitive_borders"); | ||
29 | background-color: insensitive(v_color(normal)); | 29 | background-color: gtk("@insensitive_base_color"); | ||
30 | } | 30 | } | ||
31 | 31 | | |||
32 | @if $t==backdrop { | 32 | @if $t==backdrop { | ||
33 | color: backdrop(v_color(text)); | 33 | color: gtk("@theme_unfocused_text_color"); | ||
34 | border-color: backdrop($border_color); | 34 | border-color: gtk("@unfocused_borders"); | ||
35 | background-color: backdrop(v_color(normal)); | 35 | background-color: gtk("@theme_unfocused_base_color"); | ||
36 | } | 36 | } | ||
37 | 37 | | |||
38 | @if $t==backdrop-insensitive { | 38 | @if $t==backdrop-insensitive { | ||
39 | color: backdrop(insensitive(v_color(text))); | 39 | color: gtk("@theme_unfocused_view_text_color"); | ||
40 | border-color: backdrop(insensitive($border_color)); | 40 | border-color: gtk("@unfocused_insensitive_borders"); | ||
41 | background-color: backdrop(insensitive(v_color(normal))); | 41 | background-color: gtk("@theme_unfocused_view_bg_color"); | ||
42 | } | 42 | } | ||
43 | } | 43 | } | ||
44 | 44 | | |||
45 | /**************** | 45 | /**************** | ||
46 | * Text Entries * | 46 | * Text Entries * | ||
47 | ****************/ | 47 | ****************/ | ||
48 | 48 | | |||
49 | %entry, | 49 | %entry, | ||
Show All 27 Lines | 51 | %entry_basic, & { | |||
77 | } | 77 | } | ||
78 | &:focus { @include entry(focus); } | 78 | &:focus { @include entry(focus); } | ||
79 | &:disabled { @include entry(insensitive); } | 79 | &:disabled { @include entry(insensitive); } | ||
80 | &:backdrop { @include entry(backdrop); } | 80 | &:backdrop { @include entry(backdrop); } | ||
81 | &:backdrop:disabled { @include entry(backdrop-insensitive); } | 81 | &:backdrop:disabled { @include entry(backdrop-insensitive); } | ||
82 | 82 | | |||
83 | selection { &:focus, & { @extend %selected_items; }} | 83 | selection { &:focus, & { @extend %selected_items; }} | ||
84 | 84 | | |||
85 | @each $e_type, $e_color in (error, $error_color), | 85 | @each $e_type, $e_color in (error, gtk("@error_color")), | ||
86 | (warning, $warning_color) { | 86 | (warning, gtk("@warning_color")) { | ||
87 | &.#{$e_type} { | 87 | &.#{$e_type} { | ||
88 | color: $e_color; | 88 | color: $e_color; | ||
89 | border-color: $e_color; | 89 | border-color: $e_color; | ||
90 | background-color: transparentize($e_color, 0.5); | 90 | background-color: gtkalpha($e_color, 0.5); | ||
91 | &:focus { | 91 | &:focus { | ||
92 | @include entry(focus, $e_color); | 92 | @include entry(focus, $e_color); | ||
93 | background-color: transparentize($e_color, 0.5); | 93 | background-color: gtkalpha($e_color, 0.5); | ||
94 | } | 94 | } | ||
95 | &:selected, &:selected:focus { background-color: $e_color; } | 95 | &:selected, &:selected:focus { background-color: $e_color; } | ||
96 | &:backdrop { | 96 | &:backdrop { | ||
97 | color: backdrop($e_color); | 97 | @if $e_color == gtk("@error_color") { | ||
98 | border-color: backdrop($e_color); | 98 | color: gtk("@error_color_backdrop"); | ||
99 | background-color: backdrop(transparentize($e_color, 0.5)); | 99 | border-color: gtk("@error_color_backdrop"); | ||
100 | background-color: gtkalpha("@error_color_backdrop", 0.5); | ||||
101 | } @else if $e_color == gtk("@warning_color") { | ||||
102 | color: gtk("@warning_color_backdrop"); | ||||
103 | border-color: gtk("@warning_color_backdrop"); | ||||
104 | background-color: gtkalpha("@warning_color_backdrop", 0.5); | ||||
105 | } | ||||
100 | } | 106 | } | ||
101 | } | 107 | } | ||
102 | } | 108 | } | ||
103 | 109 | | |||
104 | image { // entry icons colors | 110 | image { // entry icons colors | ||
105 | color: mix(w_color(text),v_color(text), 80%); | 111 | color: gtkmix(gtk("@theme_fg_color"),gtk("@theme_text_color"), 0.8); | ||
106 | &:hover { color: b_color(hover); } | 112 | &:hover { color: gtk("@theme_button_decoration_hover"); } | ||
107 | &:active { color: b_color(active); } | 113 | &:active { color: gtk("@theme_button_decoration_focus"); } | ||
108 | &:backdrop { color: backdrop(mix(w_color(text), v_color(text), 80%)); } | 114 | &:backdrop { color: gtkmix(gtk("@theme_unfocused_fg_color"), gtk("@theme_unfocused_fg_color"), 0.8); } | ||
109 | } | 115 | } | ||
110 | // FIXME | 116 | // FIXME | ||
111 | // &:drop(active) { | 117 | // &:drop(active) { | ||
112 | // &:focus, & { | 118 | // &:focus, & { | ||
113 | // border-color: $drop_target_color; | 119 | // border-color: $drop_target_color; | ||
114 | // box-shadow: inset 0 0 0 1px $drop_target_color; | 120 | // box-shadow: inset 0 0 0 1px $drop_target_color; | ||
115 | // } | 121 | // } | ||
116 | // } | 122 | // } | ||
117 | } | 123 | } | ||
118 | 124 | | |||
119 | progress { | 125 | progress { | ||
120 | margin: 1px; | 126 | margin: 1px; | ||
121 | border-radius: 0; | 127 | border-radius: 0; | ||
122 | border-width: 0 0 2px; | 128 | border-width: 0 0 2px; | ||
123 | border-color: s_color(normal); | 129 | border-color: gtk("@theme_selected_bg_color"); | ||
124 | border-style: solid; | 130 | border-style: solid; | ||
125 | background-image: none; | 131 | background-image: none; | ||
126 | background-color: transparent; | 132 | background-color: transparent; | ||
127 | box-shadow: none; | 133 | box-shadow: none; | ||
128 | &:backdrop { | 134 | &:backdrop { | ||
129 | background-color: transparent; | 135 | background-color: transparent; | ||
130 | border-color: backdrop(s_color(backdrop)); | 136 | border-color: gtk("@theme_unfocused_selected_bg_color"); | ||
131 | } | 137 | } | ||
132 | } | 138 | } | ||
133 | } | 139 | } | ||
134 | 140 | | |||
135 | treeview acceleditor > label { | 141 | treeview acceleditor > label { | ||
136 | background-color: s_color(normal); | 142 | background-color: gtk("@theme_selected_bg_color"); | ||
137 | } | 143 | } | ||
138 | 144 | | |||
139 | treeview entry { | 145 | treeview entry { | ||
140 | &.flat, & { | 146 | &.flat, & { | ||
141 | border-radius: 0; | 147 | border-radius: 0; | ||
142 | background-image: none; | 148 | background-image: none; | ||
143 | background-color: v_color(normal); | 149 | background-color: gtk("@theme_base_color"); | ||
144 | 150 | | |||
145 | &:focus { border-color: v_color(active); } | 151 | &:focus { border-color: gtk("@theme_view_active_decoration_color"); } | ||
146 | } | 152 | } | ||
147 | } | 153 | } |