summaryrefslogtreecommitdiff
path: root/data/elementary/themes
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-05-29 17:40:42 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-05-29 17:40:42 +0100
commit84368ca5cffc17714a6211e437a911b49dadaf99 (patch)
treece4027eab8c31848543008092ac2b1c506a3ca52 /data/elementary/themes
parent622ee09cc2d3da62ad946ae761c5a74920baf22b (diff)
TH - fix some shadow scaling... new macro. needs fixing in more places
Diffstat (limited to 'data/elementary/themes')
-rw-r--r--data/elementary/themes/edc/border.edc25
-rw-r--r--data/elementary/themes/edc/comp.edc19
-rw-r--r--data/elementary/themes/edc/comp_compat.edc9
-rw-r--r--data/elementary/themes/edc/elm/frame.edc18
-rw-r--r--data/elementary/themes/macros.edc82
5 files changed, 112 insertions, 41 deletions
diff --git a/data/elementary/themes/edc/border.edc b/data/elementary/themes/edc/border.edc
index 4c6d4cdb0d..5e419a72c8 100644
--- a/data/elementary/themes/edc/border.edc
+++ b/data/elementary/themes/edc/border.edc
@@ -134,29 +134,28 @@ group { name: "e/widgets/border/default/border";
134 IMAGE_RING("ringb", 160) 134 IMAGE_RING("ringb", 160)
135 IMAGE_RING("ringc", 160) 135 IMAGE_RING("ringc", 160)
136 136
137 images.image: "win_shadow.png" COMP; 137 images.image: "win_shad_flat.png" COMP;
138 data.item: "shadow" "1"; 138 data.item: "shadow" "1";
139 parts { 139 parts {
140 part { name: "shadow_clip"; type: RECT; mouse_events: 0; 140 part { name: "shadow_clip"; type: RECT; mouse_events: 0;
141 description { state: "default"; 141 description { state: "default";
142 rel.to: "shadow"; 142 rel.to: "_sh1";
143 } 143 }
144 description { state: "hidden"; 144 description { state: "hidden";
145 visible: 0; 145 visible: 0;
146 } 146 }
147 } 147 }
148 part { name: "shadow"; mouse_events: 0; clip_to: "shadow_clip"; 148 part { name: "shadow_base"; type: SPACER;
149 scale: 1;
150 description { state: "default" 0.0; 149 description { state: "default" 0.0;
151 rel1.to: "top"; 150 rel1.to: "top";
152 rel2.to: "bottom"; 151 rel2.to: "bottom";
153 WIN_SHADOW;
154 } 152 }
155 description { state: "shaded"; 153 description { state: "shaded";
156 inherit: "default"; 154 inherit: "default";
157 rel2.to: "e.swallow.client"; 155 rel2.to: "e.swallow.client";
158 } 156 }
159 } 157 }
158 WIN_SHAD("shadow_base", "shadow_clip", "win_shad_flat.png", 21, 21, 14, 28, 0.5)
160 part { name: "client_clip"; type: RECT; mouse_events: 0; 159 part { name: "client_clip"; type: RECT; mouse_events: 0;
161 description { state: "default" 0.0; 160 description { state: "default" 0.0;
162 rel1.to_y: "e.swallow.client"; 161 rel1.to_y: "e.swallow.client";
@@ -628,7 +627,7 @@ group { name: "e/widgets/border/default/border";
628 program { 627 program {
629 signal: "e,state,shaded"; source: "e"; 628 signal: "e,state,shaded"; source: "e";
630 action: STATE_SET "shaded" 0.0; 629 action: STATE_SET "shaded" 0.0;
631 target: "shadow"; 630 target: "shadow_base";
632 after: "shading"; 631 after: "shading";
633 } 632 }
634 program { name: "shading"; 633 program { name: "shading";
@@ -654,7 +653,7 @@ group { name: "e/widgets/border/default/border";
654 signal: "e,state,unshading"; source: "e"; 653 signal: "e,state,unshading"; source: "e";
655 action: STATE_SET "default" 0.0; 654 action: STATE_SET "default" 0.0;
656 target: "e.swallow.client"; 655 target: "e.swallow.client";
657 target: "shadow"; 656 target: "shadow_base";
658 target: "client_clip"; 657 target: "client_clip";
659 } 658 }
660// program { 659// program {
@@ -1021,28 +1020,28 @@ group { name: "e/widgets/border/pixel/border";
1021} 1020}
1022 1021
1023group { name: "e/widgets/border/tiling/border"; 1022group { name: "e/widgets/border/tiling/border";
1024 images.image: "win_shadow.png" COMP; 1023 images.image: "win_shad_flat.png" COMP;
1025 data.item: "shadow" "1"; 1024 data.item: "shadow" "1";
1026 parts { 1025 parts {
1027 part { name: "shadow_clip"; type: RECT; mouse_events: 0; 1026 part { name: "shadow_clip"; type: RECT; mouse_events: 0;
1028 description { state: "default"; 1027 description { state: "default";
1029 rel1.to: "shadow"; 1028 rel.to: "_sh1";
1030 rel2.to: "shadow";
1031 } 1029 }
1032 description { state: "hidden"; 1030 description { state: "hidden";
1033 visible: 0; 1031 visible: 0;
1034 } 1032 }
1035 } 1033 }
1036 part { name: "shadow"; mouse_events: 0; clip_to: "shadow_clip"; 1034 part { name: "shadow_base"; type: SPACER;
1037 description { state: "default" 0.0; 1035 description { state: "default" 0.0;
1038 rel.to: "e.swallow.client"; 1036 rel1.to: "top";
1039 WIN_SHADOW; 1037 rel2.to: "bottom";
1040 } 1038 }
1041 description { state: "shaded"; 1039 description { state: "shaded";
1042 inherit: "default"; 1040 inherit: "default";
1043 rel2.to: "e.swallow.client"; 1041 rel2.to: "e.swallow.client";
1044 } 1042 }
1045 } 1043 }
1044 WIN_SHAD("shadow_base", "shadow_clip", "win_shad_flat.png", 21, 21, 14, 28, 0.5)
1046 part { name: "client_clip"; type: RECT; mouse_events: 0; 1045 part { name: "client_clip"; type: RECT; mouse_events: 0;
1047 description { state: "default" 0.0; 1046 description { state: "default" 0.0;
1048 rel1.to_y: "e.swallow.client"; 1047 rel1.to_y: "e.swallow.client";
diff --git a/data/elementary/themes/edc/comp.edc b/data/elementary/themes/edc/comp.edc
index dd54df15e4..dc990e5137 100644
--- a/data/elementary/themes/edc/comp.edc
+++ b/data/elementary/themes/edc/comp.edc
@@ -180,7 +180,7 @@ group { name: "e/comp/screen/overlay/default";
180 180
181group { name: "e/comp/frame/default"; 181group { name: "e/comp/frame/default";
182 alias: "e/comp/frame/default/fast"; // legacy 182 alias: "e/comp/frame/default/fast"; // legacy
183 images.image: "win_shadow.png" COMP; 183 images.image: "win_shad_flat.png" COMP;
184 script { 184 script {
185 public message(Msg_Type:type, id, ...) { 185 public message(Msg_Type:type, id, ...) {
186 if ((type == MSG_INT) && (id == 0)) { 186 if ((type == MSG_INT) && (id == 0)) {
@@ -222,18 +222,17 @@ group { name: "e/comp/frame/default";
222 visible: 1; 222 visible: 1;
223 } 223 }
224 } 224 }
225 part { name: "shadow"; mouse_events: 0; 225 part { name: "shadow"; type: RECT;
226 clip_to: "clipper"; 226 clip_to: "clipper";
227 scale: 1;
228 description { state: "default" 0.0; 227 description { state: "default" 0.0;
229 rel.to: "e.swallow.content"; 228 rel.to: "clipper";
230 WIN_SHADOW;
231 } 229 }
232 description { state: "hidden" 0.0; 230 description { state: "hidden" 0.0;
233 inherit; 231 inherit;
234 visible: 0; 232 visible: 0;
235 } 233 }
236 } 234 }
235 WIN_SHAD("e.swallow.content", "shadow", "win_shad_flat.png", 21, 21, 14, 28, 0.5)
237 part { name: "shower"; type: SPACER; 236 part { name: "shower"; type: SPACER;
238 description { state: "default" 0.0; 237 description { state: "default" 0.0;
239 rel1.relative: 0.05 0.05; 238 rel1.relative: 0.05 0.05;
@@ -430,7 +429,6 @@ group { name: "e/comp/frame/flip";
430group { name: "e/comp/frame/popup"; 429group { name: "e/comp/frame/popup";
431 alias: "e/comp/frame/popup/fast"; // legacy 430 alias: "e/comp/frame/popup/fast"; // legacy
432 inherit: "e/comp/frame/default"; 431 inherit: "e/comp/frame/default";
433 images.image: "win_shadow.png" COMP;
434 parts { 432 parts {
435 part { name: "focus-clipper"; 433 part { name: "focus-clipper";
436 description { state: "default"; 434 description { state: "default";
@@ -473,14 +471,9 @@ group { name: "e/comp/frame/still";
473group { name: "e/comp/frame/menu"; 471group { name: "e/comp/frame/menu";
474 alias: "e/comp/frame/menu/fast"; // legacy 472 alias: "e/comp/frame/menu/fast"; // legacy
475 inherit: "e/comp/frame/popup"; 473 inherit: "e/comp/frame/popup";
476 images.image: "win_menu_shadow.png" COMP; 474 images.image: "win_shad_angle.png" COMP;
477 parts { 475 parts {
478 part { name: "shadow"; 476 WIN_SHAD("e.swallow.content", "shadow", "win_shad_angle.png", 21, 21, 14, 28, 0.5)
479 scale: 1;
480 description { state: "default" 0.0;
481 WIN_MENU_SHADOW;
482 }
483 }
484 part { name: "shower"; 477 part { name: "shower";
485 description { state: "default" 0.0; 478 description { state: "default" 0.0;
486 rel1.relative: 0.05 0.0; 479 rel1.relative: 0.05 0.0;
diff --git a/data/elementary/themes/edc/comp_compat.edc b/data/elementary/themes/edc/comp_compat.edc
index f54854e0e7..3cf0364730 100644
--- a/data/elementary/themes/edc/comp_compat.edc
+++ b/data/elementary/themes/edc/comp_compat.edc
@@ -1,6 +1,6 @@
1group { name: "e/comp/border/default"; 1group { name: "e/comp/border/default";
2 alias: "e/comp/border/default/fast"; // legacy 2 alias: "e/comp/border/default/fast"; // legacy
3 images.image: "win_shadow.png" COMP; 3 images.image: "win_shad_flat.png" COMP;
4 parts { 4 parts {
5 part { name: "clipper"; type: RECT; 5 part { name: "clipper"; type: RECT;
6 description { state: "default" 0.0; 6 description { state: "default" 0.0;
@@ -17,18 +17,17 @@ group { name: "e/comp/border/default";
17 visible: 1; 17 visible: 1;
18 } 18 }
19 } 19 }
20 part { name: "shadow"; mouse_events: 0; 20 part { name: "shadow"; type: RECT; mouse_events: 0;
21 clip_to: "clipper"; 21 clip_to: "clipper";
22 description { state: "default" 0.0; 22 description { state: "default" 0.0;
23 rel1.to: "e.swallow.content"; 23 rel.to: "clipper";
24 rel2.to: "e.swallow.content";
25 WIN_SHADOW;
26 } 24 }
27 description { state: "hidden" 0.0; 25 description { state: "hidden" 0.0;
28 inherit: "default" 0.0; 26 inherit: "default" 0.0;
29 visible: 0; 27 visible: 0;
30 } 28 }
31 } 29 }
30 WIN_SHAD("e.swallow.content", "shadow", "win_shad_flat.png", 21, 21, 14, 28, 0.5)
32 part { name: "shower"; type: SPACER; 31 part { name: "shower"; type: SPACER;
33 description { state: "default" 0.0; 32 description { state: "default" 0.0;
34 rel1.relative: 0.05 0.05; 33 rel1.relative: 0.05 0.05;
diff --git a/data/elementary/themes/edc/elm/frame.edc b/data/elementary/themes/edc/elm/frame.edc
index 54cceca81c..263147ae84 100644
--- a/data/elementary/themes/edc/elm/frame.edc
+++ b/data/elementary/themes/edc/elm/frame.edc
@@ -1,17 +1,16 @@
1group { name: "elm/frame/base/default"; 1group { name: "elm/frame/base/default";
2 images.image: "win_shadow.png" COMP; 2 images.image: "win_shad_flat.png" COMP;
3 parts { 3 parts {
4 part { name: "shadow"; mouse_events: 0; 4 part { name: "shadow"; type: RECT;
5 scale: 1;
6 description { state: "default" 0.0; 5 description { state: "default" 0.0;
7 rel.to: "base"; 6 rel.to: "_sh1";
8 WIN_SHADOW_SMALL;
9 } 7 }
10 description { state: "hidden" 0.0; 8 description { state: "hidden" 0.0;
11 inherit; 9 inherit;
12 visible: 0; 10 visible: 0;
13 } 11 }
14 } 12 }
13 WIN_SHAD("base", "shadow", "win_shad_flat.png", 10, 10, 7, 14, 0.25);
15 part { name: "base"; type: RECT; 14 part { name: "base"; type: RECT;
16 scale: 1; 15 scale: 1;
17 description { state: "default" 0.0; 16 description { state: "default" 0.0;
@@ -260,19 +259,18 @@ group { name: "elm/frame/base/outdent_bottom";
260} 259}
261 260
262group { name: "elm/frame/base/outline"; 261group { name: "elm/frame/base/outline";
263 images.image: "win_shadow.png" COMP; 262 images.image: "win_shad_flat.png" COMP;
264 parts { 263 parts {
265 part { name: "shadow"; mouse_events: 0; 264 part { name: "shadow"; type: RECT;
266 scale: 1;
267 description { state: "default" 0.0; 265 description { state: "default" 0.0;
268 rel.to: "base"; 266 rel.to: "_sh1";
269 WIN_SHADOW_SMALL;
270 } 267 }
271 description { state: "hidden" 0.0; 268 description { state: "hidden" 0.0;
272 inherit; 269 inherit;
273 visible: 0; 270 visible: 0;
274 } 271 }
275 } 272 }
273 WIN_SHAD("base", "shadow", "win_shad_flat.png", 10, 10, 7, 14, 0.25);
276 part { name: "base"; type: RECT; 274 part { name: "base"; type: RECT;
277 scale: 1; 275 scale: 1;
278 description { state: "default" 0.0; 276 description { state: "default" 0.0;
diff --git a/data/elementary/themes/macros.edc b/data/elementary/themes/macros.edc
index 878b69dd2c..972ae52ded 100644
--- a/data/elementary/themes/macros.edc
+++ b/data/elementary/themes/macros.edc
@@ -26,6 +26,88 @@
26#define DARK_GREY_BG_COLOR 48 48 48 255 26#define DARK_GREY_BG_COLOR 48 48 48 255
27#define DARK_GREY_BG_DISABLED_COLOR 64 64 64 255 27#define DARK_GREY_BG_DISABLED_COLOR 64 64 64 255
28 28
29#define SHAD(_to, _clip, _img, _l, _r, _t, _b, _scale) \
30 scale: 1; clip_to: _clip; \
31 description { state: "default" 0.0; \
32 rel.to: _to; \
33 image.normal: _img; \
34 image.border: 44 44 44 44; \
35 image.border_scale: 1; \
36 image.border_scale_by: _scale; \
37 rel1.offset: (-_l) (-_t); \
38 rel2.offset: (_r-1) (_b-1); \
39 fill.smooth: 0; \
40 offscale; \
41 }
42#define SHAD_CLIP(_to, _clip, _l, _r, _t, _b, _scale) \
43 part { type: RECT; name: "_shcl1"; \
44 scale: 1; clip_to: _clip; \
45 description { state: "default" 0.0; \
46 rel.to: _to; \
47 rel1.offset: (-_l) (-_t); \
48 rel2.offset: (_r-1) -1; \
49 rel2.relative: 1.0 0.0; \
50 offscale; \
51 } \
52 } \
53 part { type: RECT; name: "_shcl2"; \
54 scale: 1; clip_to: _clip; \
55 description { state: "default" 0.0; \
56 rel.to: _to; \
57 rel1.offset: (-_l) 0; \
58 rel1.relative: 0.0 1.0; \
59 rel2.offset: (_r-1) (_b-1); \
60 offscale; \
61 } \
62 } \
63 part { type: RECT; name: "_shcl3"; \
64 scale: 1; clip_to: _clip; \
65 description { state: "default" 0.0; \
66 rel.to: _to; \
67 rel1.offset: (-_l) 0; \
68 rel2.offset: -1 -1; \
69 rel2.relative: 0.0 1.0; \
70 offscale; \
71 } \
72 } \
73 part { type: RECT; name: "_shcl4"; \
74 scale: 1; clip_to: _clip; \
75 description { state: "default" 0.0; \
76 rel.to: _to; \
77 rel1.offset: 0 0; \
78 rel1.relative: 1.0 0.0; \
79 rel2.offset: (_r-1) -1; \
80 offscale; \
81 } \
82 }
83
84#define WIN_SHAD(_to, _clip, _img, _l, _r, _t, _b, _scale) \
85 SHAD_CLIP(_to, _clip, _l, _r, _t, _b, _scale) \
86 part { name: "_sh1"; mouse_events: 0; \
87 SHAD(_to, "_shcl1", _img, _l, _r, _t, _b, _scale) \
88 } \
89 part { name: "_sh2"; mouse_events: 0; \
90 SHAD(_to, "_shcl2", _img, _l, _r, _t, _b, _scale) \
91 } \
92 part { name: "_sh3"; mouse_events: 0; \
93 SHAD(_to, "_shcl3", _img, _l, _r, _t, _b, _scale) \
94 } \
95 part { name: "_sh4"; mouse_events: 0; \
96 SHAD(_to, "_shcl4", _img, _l, _r, _t, _b, _scale) \
97 }
98
99// XXX: below - remove these in favor of WIN_SHAD() above in the edc
100#define WIN_SHADOW_SMALL \
101 image.normal: "win_shadow.png"; \
102 image.border: 32 32 32 32; \
103 image.border_scale: 1; \
104 image.border_scale_by: 0.5; \
105 image.middle: 0; \
106 rel1.offset: -10 -7; \
107 rel2.offset: 9 10; \
108 fill.smooth: 0; \
109 offscale
110
29#define WIN_SHADOW \ 111#define WIN_SHADOW \
30 image.normal: "win_shadow.png"; \ 112 image.normal: "win_shadow.png"; \
31 image.border: 32 32 32 32; \ 113 image.border: 32 32 32 32; \