Skip to content

Commit 37879c9

Browse files
committed
fix: Improve tree folder/arrow hover animation
1 parent ee8ec38 commit 37879c9

File tree

5 files changed

+20
-20
lines changed

5 files changed

+20
-20
lines changed

Material-Theme-Palenight.sublime-theme

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -696,9 +696,9 @@
696696
"settings": ["material_theme_arrow_folders"],
697697
"layer0.opacity": 0,
698698
"layer1.texture": "Material Theme/assets/palenight/arrow_folder.png",
699-
"layer1.opacity": 1,
699+
"layer1.opacity": { "target": 1.0, "speed": 7.0, "interpolation": "smoothstep" },
700700
"layer2.texture": "Material Theme/assets/commons/arrow_folder--hover.png",
701-
"layer2.opacity": 0.0,
701+
"layer2.opacity": { "target": 0.0, "speed": 7.0, "interpolation": "smoothstep" },
702702
"layer3.texture": "Material Theme/assets/commons/arrow_folder--opened.png",
703703
"layer3.opacity": 0.0
704704
},
@@ -720,8 +720,8 @@
720720
[
721721
{ "class": "tree_row", "attributes": ["hover"] }
722722
],
723-
"layer1.opacity": 0.0,
724-
"layer2.opacity": 1.0,
723+
"layer1.opacity": { "target": 0.0, "speed": 7.0, "interpolation": "smoothstep" },
724+
"layer2.opacity": { "target": 1.0, "speed": 7.0, "interpolation": "smoothstep" },
725725
"layer3.opacity": 0.0,
726726
},
727727

sources/themes/darker/sidebar.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,9 @@
164164
"settings": ["material_theme_arrow_folders"],
165165
"layer0.opacity": 0,
166166
"layer1.texture": "Material Theme/assets/darker/arrow_folder.png",
167-
"layer1.opacity": 1,
167+
"layer1.opacity": { "target": 1.0, "speed": 7.0, "interpolation": "smoothstep" },
168168
"layer2.texture": "Material Theme/assets/commons/arrow_folder--hover.png",
169-
"layer2.opacity": 0.0,
169+
"layer2.opacity": { "target": 0.0, "speed": 7.0, "interpolation": "smoothstep" },
170170
"layer3.texture": "Material Theme/assets/commons/arrow_folder--opened.png",
171171
"layer3.opacity": 0.0
172172
},
@@ -188,8 +188,8 @@
188188
[
189189
{ "class": "tree_row", "attributes": ["hover"] }
190190
],
191-
"layer1.opacity": 0.0,
192-
"layer2.opacity": 1.0,
191+
"layer1.opacity": { "target": 0.0, "speed": 7.0, "interpolation": "smoothstep" },
192+
"layer2.opacity": { "target": 1.0, "speed": 7.0, "interpolation": "smoothstep" },
193193
"layer3.opacity": 0.0,
194194
},
195195

sources/themes/default/sidebar.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@
159159
"layer0.tint": [<%= ui.background.primary.rgb %>],
160160
"layer0.opacity": 0,
161161
"layer1.texture": "Material Theme/assets/default/folder.png",
162-
"layer1.opacity": 1,
162+
"layer1.opacity": { "target": 1.0, "speed": 7.0, "interpolation": "smoothstep" },
163163
"layer2.texture": "Material Theme/assets/commons/folder--hover.png",
164-
"layer2.opacity": 0.0,
164+
"layer2.opacity": { "target": 0.0, "speed": 7.0, "interpolation": "smoothstep" },
165165
"layer3.texture": "Material Theme/assets/commons/folder_opened--hover.png",
166166
"layer3.opacity": 0.0,
167167
},
@@ -196,8 +196,8 @@
196196
[
197197
{ "class": "tree_row", "attributes": ["hover"] }
198198
],
199-
"layer1.opacity": 0.0,
200-
"layer2.opacity": 1.0,
199+
"layer1.opacity": { "target": 0.0, "speed": 7.0, "interpolation": "smoothstep" },
200+
"layer2.opacity": { "target": 1.0, "speed": 7.0, "interpolation": "smoothstep" },
201201
"layer3.opacity": 0.0,
202202
},
203203

sources/themes/lighter/sidebar.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,9 @@
158158
"layer0.tint": [250, 250, 250],
159159
"layer0.opacity": 0,
160160
"layer1.texture": "Material Theme/assets/lighter/folder.png",
161-
"layer1.opacity": 1,
161+
"layer1.opacity": { "target": 1.0, "speed": 7.0, "interpolation": "smoothstep" },
162162
"layer2.texture": "Material Theme/assets/commons/folder--hover.png",
163-
"layer2.opacity": 0.0,
163+
"layer2.opacity": { "target": 0.0, "speed": 7.0, "interpolation": "smoothstep" },
164164
"layer3.texture": "Material Theme/assets/commons/folder_opened--hover.png",
165165
"layer3.opacity": 0.0,
166166
},
@@ -195,8 +195,8 @@
195195
[
196196
{ "class": "tree_row", "attributes": ["hover"] }
197197
],
198-
"layer1.opacity": 0.0,
199-
"layer2.opacity": 1.0,
198+
"layer1.opacity": { "target": 0.0, "speed": 7.0, "interpolation": "smoothstep" },
199+
"layer2.opacity": { "target": 1.0, "speed": 7.0, "interpolation": "smoothstep" },
200200
"layer3.opacity": 0.0,
201201
},
202202

sources/themes/palenight/sidebar.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,9 @@
172172
"settings": ["material_theme_arrow_folders"],
173173
"layer0.opacity": 0,
174174
"layer1.texture": "Material Theme/assets/palenight/arrow_folder.png",
175-
"layer1.opacity": 1,
175+
"layer1.opacity": { "target": 1.0, "speed": 7.0, "interpolation": "smoothstep" },
176176
"layer2.texture": "Material Theme/assets/commons/arrow_folder--hover.png",
177-
"layer2.opacity": 0.0,
177+
"layer2.opacity": { "target": 0.0, "speed": 7.0, "interpolation": "smoothstep" },
178178
"layer3.texture": "Material Theme/assets/commons/arrow_folder--opened.png",
179179
"layer3.opacity": 0.0
180180
},
@@ -196,8 +196,8 @@
196196
[
197197
{ "class": "tree_row", "attributes": ["hover"] }
198198
],
199-
"layer1.opacity": 0.0,
200-
"layer2.opacity": 1.0,
199+
"layer1.opacity": { "target": 0.0, "speed": 7.0, "interpolation": "smoothstep" },
200+
"layer2.opacity": { "target": 1.0, "speed": 7.0, "interpolation": "smoothstep" },
201201
"layer3.opacity": 0.0,
202202
},
203203

0 commit comments

Comments
 (0)