|
31 | 31 | margin: 0 -0.5em;
|
32 | 32 | padding: 0.25em;
|
33 | 33 | border-top: 1px solid var(--fg-color);
|
| 34 | + width: 100%; |
| 35 | + position: absolute; |
| 36 | + display: flex; |
| 37 | + flex-direction: column; |
| 38 | + justify-content: flex-start; |
| 39 | + align-items: stretch; |
| 40 | + gap: calc(0.25em + 3px); |
| 41 | + } |
| 42 | +
|
| 43 | + .buttonbar { |
34 | 44 | min-height: max-content;
|
35 | 45 | display: flex;
|
36 | 46 | flex-direction: row;
|
37 | 47 | flex-wrap: nowrap;
|
38 | 48 | justify-content: flex-start;
|
39 | 49 | align-items: center;
|
40 | 50 | gap: 0.5ch;
|
41 |
| - width: 100%; |
42 |
| - position: absolute; |
43 |
| - z-index: 19; |
44 | 51 | overflow-x: auto;
|
45 | 52 | }
|
46 | 53 |
|
47 | 54 | .bottombar {
|
48 | 55 | margin: -0.5em;
|
49 | 56 | padding: 0.25em;
|
50 | 57 | border-top: 1px solid var(--fg-color);
|
| 58 | + border-bottom: 1px solid var(--fg-color); |
51 | 59 | min-height: max-content;
|
52 | 60 | display: flex;
|
53 | 61 | flex-direction: row;
|
|
267 | 275 | bind:innerHeight
|
268 | 276 | />
|
269 | 277 |
|
270 |
| -<div> |
271 |
| - <FormulaBar bind:globals bind:editor={globals.elements.formulaBar} /> |
272 |
| -</div> |
| 278 | +{#if navigator.maxTouchPoints <= 1} |
| 279 | + <!-- Else float the bar above the virtual keyboard --> |
| 280 | + <div> |
| 281 | + <FormulaBar bind:globals bind:editor={globals.elements.formulaBar} /> |
| 282 | + </div> |
| 283 | +{/if} |
273 | 284 |
|
274 | 285 | <div class="tabs">
|
275 | 286 | <Tabs bind:globals bind:value={globals.currentSheetIndex} />
|
|
402 | 413 | shadow="2px">{text}</Button
|
403 | 414 | >
|
404 | 415 | {/snippet}
|
405 |
| -{#if Math.abs(innerHeight - visualBottom) > 5} |
| 416 | +{#if navigator.maxTouchPoints > 1} |
406 | 417 | <div
|
407 | 418 | class="keyboardbar"
|
408 |
| - style:top="calc({visualBottom}px - 2em - 2 * 0.25em - 2px)" |
| 419 | + style:bottom="max(calc(2.75em + 1px), {innerHeight - visualBottom}px)" |
409 | 420 | >
|
410 |
| - {@render insertTextButton("=")} |
411 |
| - {@render insertTextButton("(")} |
412 |
| - {@render insertTextButton(")")} |
413 |
| - {@render insertTextButton("[")} |
414 |
| - {@render insertTextButton("]")} |
415 |
| - {@render insertTextButton("+")} |
416 |
| - {@render insertTextButton("-")} |
417 |
| - {@render insertTextButton("*")} |
418 |
| - {@render insertTextButton("/")} |
419 |
| - {@render insertTextButton('"')} |
420 |
| - {@render insertTextButton("{")} |
421 |
| - {@render insertTextButton("}")} |
422 |
| - {@render insertTextButton(";")} |
423 |
| - {@render insertTextButton(">")} |
424 |
| - {@render insertTextButton("<")} |
425 |
| - {@render insertTextButton(":")} |
426 |
| - {@render insertTextButton("?")} |
| 421 | + <FormulaBar bind:globals bind:editor={globals.elements.formulaBar} /> |
| 422 | + {#if Math.abs(innerHeight - visualBottom) > 5} |
| 423 | + <div class="buttonbar"> |
| 424 | + {@render insertTextButton("=")} |
| 425 | + {@render insertTextButton("(")} |
| 426 | + {@render insertTextButton(")")} |
| 427 | + {@render insertTextButton("[")} |
| 428 | + {@render insertTextButton("]")} |
| 429 | + {@render insertTextButton("+")} |
| 430 | + {@render insertTextButton("-")} |
| 431 | + {@render insertTextButton("*")} |
| 432 | + {@render insertTextButton("/")} |
| 433 | + {@render insertTextButton('"')} |
| 434 | + {@render insertTextButton("{")} |
| 435 | + {@render insertTextButton("}")} |
| 436 | + {@render insertTextButton(";")} |
| 437 | + {@render insertTextButton(">")} |
| 438 | + {@render insertTextButton("<")} |
| 439 | + {@render insertTextButton(":")} |
| 440 | + {@render insertTextButton("?")} |
| 441 | + </div> |
| 442 | + {/if} |
427 | 443 | </div>
|
428 | 444 | {/if}
|
429 | 445 |
|
|
469 | 485 | </div>
|
470 | 486 | {/snippet}
|
471 | 487 | {#snippet clickable(handler)}
|
472 |
| - <Button square onclick={handler} style="height: 1.5em;">=</Button> |
| 488 | + <Button square onclick={handler} style="height: 2em;">=</Button> |
473 | 489 | {/snippet}
|
474 | 490 | </ShyMenu>
|
475 | 491 | <div style="flex-grow: 1;"><!-- Spacer --></div>
|
|
0 commit comments