From 4f627b4363d15c57cf76232599829b8110ed004a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Hatcher?= Date: Thu, 27 Feb 2025 18:37:46 +0100 Subject: [PATCH] FIX: More sensible decrease/increase font-size --- .../src/components/Toolbar/Toolbar.tsx | 44 +++++++++++++------ .../src/components/Workbook/Workbook.tsx | 1 + 2 files changed, 31 insertions(+), 14 deletions(-) diff --git a/webapp/IronCalc/src/components/Toolbar/Toolbar.tsx b/webapp/IronCalc/src/components/Toolbar/Toolbar.tsx index f572eae..9dd50fe 100644 --- a/webapp/IronCalc/src/components/Toolbar/Toolbar.tsx +++ b/webapp/IronCalc/src/components/Toolbar/Toolbar.tsx @@ -7,8 +7,6 @@ import type { import { styled } from "@mui/material/styles"; import type {} from "@mui/system"; import { - AArrowDown, - AArrowUp, AlignCenter, AlignLeft, AlignRight, @@ -22,9 +20,11 @@ import { Grid2x2X, ImageDown, Italic, + Minus, PaintBucket, PaintRoller, Percent, + Plus, Redo2, RemoveFormatting, Strikethrough, @@ -74,6 +74,7 @@ type ToolbarProperties = { onDownloadPNG: () => void; fillColor: string; fontColor: string; + fontSize: number; bold: boolean; underline: boolean; italic: boolean; @@ -253,17 +254,7 @@ function Toolbar(properties: ToolbarProperties) { > - { - properties.onIncreaseFontSize(1); - }} - title={t("toolbar.increase_font_size")} - > - - + - + + {properties.fontSize} + { + properties.onIncreaseFontSize(1); + }} + title={t("toolbar.increase_font_size")} + > + + + { }} fillColor={style.fill.fg_color || "#FFFFFF"} fontColor={style.font.color} + fontSize={style.font.sz} bold={style.font.b} underline={style.font.u} italic={style.font.i}