diff options
author | Vijay A <vraravam@users.noreply.github.com> | 2023-05-24 06:57:50 +0530 |
---|---|---|
committer | Vijay Aravamudhan <vraravam@users.noreply.github.com> | 2023-05-24 16:40:43 +0530 |
commit | e245b4fa229bee1e2ab97fcb42de3831b8bdbe5b (patch) | |
tree | d684777b3fde5470c9f99304a9f022422ffb8045 /src/features/appearance/index.ts | |
parent | 6.3.0-nightly.9 [skip ci] (diff) | |
download | ferdium-app-e245b4fa229bee1e2ab97fcb42de3831b8bdbe5b.tar.gz ferdium-app-e245b4fa229bee1e2ab97fcb42de3831b8bdbe5b.tar.zst ferdium-app-e245b4fa229bee1e2ab97fcb42de3831b8bdbe5b.zip |
Upgrade npm modules
Diffstat (limited to 'src/features/appearance/index.ts')
-rw-r--r-- | src/features/appearance/index.ts | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/src/features/appearance/index.ts b/src/features/appearance/index.ts index 9c9f3e175..b6e944724 100644 --- a/src/features/appearance/index.ts +++ b/src/features/appearance/index.ts | |||
@@ -19,7 +19,7 @@ function createStyleElement() { | |||
19 | const styles = document.createElement('style'); | 19 | const styles = document.createElement('style'); |
20 | styles.id = STYLE_ELEMENT_ID; | 20 | styles.id = STYLE_ELEMENT_ID; |
21 | 21 | ||
22 | document.querySelector('head')?.appendChild(styles); | 22 | document.querySelector('head')?.append(styles); |
23 | } | 23 | } |
24 | 24 | ||
25 | function setAppearance(style) { | 25 | function setAppearance(style) { |
@@ -153,40 +153,47 @@ function generateServiceRibbonWidthStyle( | |||
153 | const verticalStyleOffset = 29; | 153 | const verticalStyleOffset = 29; |
154 | 154 | ||
155 | switch (width) { | 155 | switch (width) { |
156 | case 35: | 156 | case 35: { |
157 | fontSize = 9; | 157 | fontSize = 9; |
158 | tabItemHeightBias = 25; | 158 | tabItemHeightBias = 25; |
159 | sidebarSizeBias = 48; | 159 | sidebarSizeBias = 48; |
160 | break; | 160 | break; |
161 | case 45: | 161 | } |
162 | case 45: { | ||
162 | fontSize = 10; | 163 | fontSize = 10; |
163 | tabItemHeightBias = 21; | 164 | tabItemHeightBias = 21; |
164 | sidebarSizeBias = 44; | 165 | sidebarSizeBias = 44; |
165 | break; | 166 | break; |
166 | case 55: | 167 | } |
168 | case 55: { | ||
167 | fontSize = 11; | 169 | fontSize = 11; |
168 | tabItemHeightBias = 13; | 170 | tabItemHeightBias = 13; |
169 | sidebarSizeBias = 37; | 171 | sidebarSizeBias = 37; |
170 | break; | 172 | break; |
171 | case 80: | 173 | } |
174 | case 80: { | ||
172 | fontSize = 11; | 175 | fontSize = 11; |
173 | tabItemHeightBias = 3; | 176 | tabItemHeightBias = 3; |
174 | sidebarSizeBias = 27; | 177 | sidebarSizeBias = 27; |
175 | break; | 178 | break; |
176 | case 90: | 179 | } |
180 | case 90: { | ||
177 | fontSize = 12; | 181 | fontSize = 12; |
178 | tabItemHeightBias = 0; | 182 | tabItemHeightBias = 0; |
179 | sidebarSizeBias = 25; | 183 | sidebarSizeBias = 25; |
180 | break; | 184 | break; |
181 | case 100: | 185 | } |
186 | case 100: { | ||
182 | fontSize = 13; | 187 | fontSize = 13; |
183 | tabItemHeightBias = 2; | 188 | tabItemHeightBias = 2; |
184 | sidebarSizeBias = 25; | 189 | sidebarSizeBias = 25; |
185 | break; | 190 | break; |
186 | default: | 191 | } |
192 | default: { | ||
187 | fontSize = 11; | 193 | fontSize = 11; |
188 | tabItemHeightBias = 13; | 194 | tabItemHeightBias = 13; |
189 | sidebarSizeBias = 37; | 195 | sidebarSizeBias = 37; |
196 | } | ||
190 | } | 197 | } |
191 | 198 | ||
192 | if (!isLabelEnabled) { | 199 | if (!isLabelEnabled) { |
@@ -203,18 +210,22 @@ function generateServiceRibbonWidthStyle( | |||
203 | 210 | ||
204 | let sidebarServicesAlignment; | 211 | let sidebarServicesAlignment; |
205 | switch (sidebarServicesLocation) { | 212 | switch (sidebarServicesLocation) { |
206 | case SIDEBAR_SERVICES_LOCATION_TOPLEFT: | 213 | case SIDEBAR_SERVICES_LOCATION_TOPLEFT: { |
207 | sidebarServicesAlignment = horizontal ? 'left' : 'start'; | 214 | sidebarServicesAlignment = horizontal ? 'left' : 'start'; |
208 | break; | 215 | break; |
209 | case SIDEBAR_SERVICES_LOCATION_CENTER: | 216 | } |
217 | case SIDEBAR_SERVICES_LOCATION_CENTER: { | ||
210 | sidebarServicesAlignment = horizontal ? 'center' : 'center'; | 218 | sidebarServicesAlignment = horizontal ? 'center' : 'center'; |
211 | break; | 219 | break; |
212 | case SIDEBAR_SERVICES_LOCATION_BOTTOMRIGHT: | 220 | } |
221 | case SIDEBAR_SERVICES_LOCATION_BOTTOMRIGHT: { | ||
213 | sidebarServicesAlignment = horizontal ? 'right' : 'end'; | 222 | sidebarServicesAlignment = horizontal ? 'right' : 'end'; |
214 | break; | 223 | break; |
215 | default: | 224 | } |
225 | default: { | ||
216 | sidebarServicesAlignment = horizontal ? 'left' : 'start'; | 226 | sidebarServicesAlignment = horizontal ? 'left' : 'start'; |
217 | break; | 227 | break; |
228 | } | ||
218 | } | 229 | } |
219 | 230 | ||
220 | const graysacleServices = `filter: grayscale(1); | 231 | const graysacleServices = `filter: grayscale(1); |
@@ -268,7 +279,7 @@ function generateServiceRibbonWidthStyle( | |||
268 | ? width | 279 | ? width |
269 | : width + | 280 | : width + |
270 | sidebarSizeBias + | 281 | sidebarSizeBias + |
271 | (sizeDragArea !== 0 ? 4 - sizeDragArea : 4) | 282 | (sizeDragArea === 0 ? 4 : 4 - sizeDragArea) |
272 | }px !important; | 283 | }px !important; |
273 | } | 284 | } |
274 | .darwin .workspaces-drawer { | 285 | .darwin .workspaces-drawer { |