diff options
author | 2021-11-12 03:59:35 +0100 | |
---|---|---|
committer | 2021-11-12 08:29:35 +0530 | |
commit | 53937fd58023ef800bd8ca1cd2b6d2d7bc891834 (patch) | |
tree | ea70778761addfaba1732dcb515dabd9f37f09ea /src/features/appearance/index.ts | |
parent | Use forked version of 'node-mac-permissions' till the PR gets merged (#2216) (diff) | |
download | ferdium-app-53937fd58023ef800bd8ca1cd2b6d2d7bc891834.tar.gz ferdium-app-53937fd58023ef800bd8ca1cd2b6d2d7bc891834.tar.zst ferdium-app-53937fd58023ef800bd8ca1cd2b6d2d7bc891834.zip |
chore: update eslint deps to latest (#2213)
- update eslint deps to latest
- disable new react/function-component-definition rule
- fix/disable newly reported issues
Diffstat (limited to 'src/features/appearance/index.ts')
-rw-r--r-- | src/features/appearance/index.ts | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/src/features/appearance/index.ts b/src/features/appearance/index.ts index fe8793dc1..7a4307cfd 100644 --- a/src/features/appearance/index.ts +++ b/src/features/appearance/index.ts | |||
@@ -114,7 +114,12 @@ function generateAccentStyle(accentColorStr) { | |||
114 | `; | 114 | `; |
115 | } | 115 | } |
116 | 116 | ||
117 | function generateServiceRibbonWidthStyle(widthStr, iconSizeStr, vertical, isLabelEnabled) { | 117 | function generateServiceRibbonWidthStyle( |
118 | widthStr, | ||
119 | iconSizeStr, | ||
120 | vertical, | ||
121 | isLabelEnabled, | ||
122 | ) { | ||
118 | const width = Number(widthStr); | 123 | const width = Number(widthStr); |
119 | const iconSize = Number(iconSizeStr) - iconSizeBias; | 124 | const iconSize = Number(iconSizeStr) - iconSizeBias; |
120 | let fontSize = 11; | 125 | let fontSize = 11; |
@@ -122,33 +127,33 @@ function generateServiceRibbonWidthStyle(widthStr, iconSizeStr, vertical, isLabe | |||
122 | let sidebarSizeBias = 22; | 127 | let sidebarSizeBias = 22; |
123 | const tabItemWidthBias = 2; | 128 | const tabItemWidthBias = 2; |
124 | 129 | ||
125 | switch(width){ | 130 | switch (width) { |
126 | case (35): | 131 | case 35: |
127 | fontSize = 9; | 132 | fontSize = 9; |
128 | tabItemHeightBias = 25; | 133 | tabItemHeightBias = 25; |
129 | sidebarSizeBias = 48; | 134 | sidebarSizeBias = 48; |
130 | break; | 135 | break; |
131 | case (45): | 136 | case 45: |
132 | fontSize = 10; | 137 | fontSize = 10; |
133 | tabItemHeightBias = 21; | 138 | tabItemHeightBias = 21; |
134 | sidebarSizeBias = 44; | 139 | sidebarSizeBias = 44; |
135 | break; | 140 | break; |
136 | case (55): | 141 | case 55: |
137 | fontSize = 11; | 142 | fontSize = 11; |
138 | tabItemHeightBias = 13; | 143 | tabItemHeightBias = 13; |
139 | sidebarSizeBias = 37; | 144 | sidebarSizeBias = 37; |
140 | break; | 145 | break; |
141 | case (80): | 146 | case 80: |
142 | fontSize = 11; | 147 | fontSize = 11; |
143 | tabItemHeightBias = 3; | 148 | tabItemHeightBias = 3; |
144 | sidebarSizeBias = 27; | 149 | sidebarSizeBias = 27; |
145 | break; | 150 | break; |
146 | case (90): | 151 | case 90: |
147 | fontSize = 12; | 152 | fontSize = 12; |
148 | tabItemHeightBias = 0; | 153 | tabItemHeightBias = 0; |
149 | sidebarSizeBias = 25; | 154 | sidebarSizeBias = 25; |
150 | break; | 155 | break; |
151 | case (100): | 156 | case 100: |
152 | fontSize = 13; | 157 | fontSize = 13; |
153 | tabItemHeightBias = 2; | 158 | tabItemHeightBias = 2; |
154 | sidebarSizeBias = 25; | 159 | sidebarSizeBias = 25; |
@@ -159,7 +164,7 @@ function generateServiceRibbonWidthStyle(widthStr, iconSizeStr, vertical, isLabe | |||
159 | sidebarSizeBias = 37; | 164 | sidebarSizeBias = 37; |
160 | } | 165 | } |
161 | 166 | ||
162 | if(!isLabelEnabled){ | 167 | if (!isLabelEnabled) { |
163 | sidebarSizeBias = 22; | 168 | sidebarSizeBias = 22; |
164 | tabItemHeightBias = -5; | 169 | tabItemHeightBias = -5; |
165 | } | 170 | } |
@@ -317,7 +322,7 @@ function generateStyle(settings) { | |||
317 | serviceRibbonWidth, | 322 | serviceRibbonWidth, |
318 | iconSize, | 323 | iconSize, |
319 | useVerticalStyle, | 324 | useVerticalStyle, |
320 | showServiceName | 325 | showServiceName, |
321 | ); | 326 | ); |
322 | } | 327 | } |
323 | if (showDragArea) { | 328 | if (showDragArea) { |