Commit 46039ca
committed
frontend/android: capture textzoom and set custom base font size
Android textZoom only increases font-size without incresing
surrounding elements which can break the layout and cause
overlapping text and elements.
This commit reads the current textzoom, sets a custom CSS base
font size (calculated from textzoom) and resets textzoom to 100%.
The custom CSS is using 'The 62.5% Font Size Trick' with which
1rem equals 10px.
With this it is possible to change elment dimensions from px to
rem. These elements will become responsive and also grow if
Android settings for font size is increased.
To simulate this in webdev and optimize the layout for increased
fontsize a base font size of 125% has to be set.1 parent 88a26be commit 46039ca
File tree
1 file changed
+29
-3
lines changed- frontends/android/BitBoxApp/app/src/main/java/ch/shiftcrypto/bitboxapp
1 file changed
+29
-3
lines changedLines changed: 29 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
140 | 139 | | |
141 | 140 | | |
142 | 141 | | |
| |||
171 | 170 | | |
172 | 171 | | |
173 | 172 | | |
| 173 | + | |
| 174 | + | |
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
| |||
226 | 227 | | |
227 | 228 | | |
228 | 229 | | |
229 | | - | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
230 | 257 | | |
231 | 258 | | |
232 | 259 | | |
| |||
321 | 348 | | |
322 | 349 | | |
323 | 350 | | |
324 | | - | |
325 | 351 | | |
326 | 352 | | |
327 | 353 | | |
| |||
0 commit comments