diff --git a/src/Components/Toolbar.tsx b/src/Components/Toolbar.tsx index 3201f77..61ff1af 100644 --- a/src/Components/Toolbar.tsx +++ b/src/Components/Toolbar.tsx @@ -59,14 +59,14 @@ export default function Toolbar({ pageSettings, updatePage, settingsCallback, pd * Make sure no buttons are lost due to the div being justified in the center */ function fixToolbarContentJustification() { - if (checkFlexDiv.current && checkFlexDiv.current.getAttribute("data-autojustify") === "a") checkFlexDiv.current.style.justifyContent = checkFlexDiv.current.scrollWidth - checkFlexDiv.current.getBoundingClientRect().width > -3 && checkFlexDiv.current.scrollWidth - checkFlexDiv.current.getBoundingClientRect().width < 3 ? "center" : "left"; // Add a 3px tollerance for WebKit, since one of the two values might be a pixel greater than the other + if (checkFlexDiv.current) checkFlexDiv.current.style.justifyContent = checkFlexDiv.current.scrollWidth - checkFlexDiv.current.getBoundingClientRect().width > -3 && checkFlexDiv.current.scrollWidth - checkFlexDiv.current.getBoundingClientRect().width < 3 ? "center" : "left"; // Add a 3px tollerance for WebKit, since one of the two values might be a pixel greater than the other } useEffect(() => fixToolbarContentJustification()); useEffect(() => window.addEventListener("resize", () => fixToolbarContentJustification()), []) let generateColorValues = () => [{ name: "Green", value: "rgb(0,255,0)" }, { name: "Blue", value: "rgb(0,0,255)" }, { name: "Red", value: "rgb(255,0,0)" }, { name: "Accent color", value: getComputedStyle(document.body).getPropertyValue("--accent") }, ...JSON.parse(localStorage.getItem(`PDFPointer-CustomColor`) ?? "[]")]; // Make it a function so that the accent color is refreshed every time. return
-
+
{CardShown === "pen" || CardShown === "text" ? <> {usefulBtn[CardShown === "pen" ? "pen" : "text"]} } content={}> diff --git a/src/index.css b/src/index.css index 27f5654..c151730 100644 --- a/src/index.css +++ b/src/index.css @@ -526,4 +526,5 @@ a:visited { .doubleFlex>div { flex: 1 0 300px; + margin: 0px 10px; } \ No newline at end of file