From 0dc9e9ecdbfbf0b8cfb3446b4304d4de579a1bf8 Mon Sep 17 00:00:00 2001 From: Gazook89 Date: Thu, 22 Aug 2024 23:21:48 -0500 Subject: [PATCH] Add 2 custom zoom related icons New icons for Zoom to Fit, and Fit Width buttons. Used SVGR online tool to create react components and then combined them. If doing in future, be sure to set currentColor on `fill` property in the SVG itself. Make the SVGs as closed curves only (don't rely on stroke). set only a width property, not height. --- .../homebrew/brewRenderer/toolBar/toolBar.jsx | 6 ++- client/icons/icon-components/zoomIcons.jsx | 46 +++++++++++++++++++ 2 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 client/icons/icon-components/zoomIcons.jsx diff --git a/client/homebrew/brewRenderer/toolBar/toolBar.jsx b/client/homebrew/brewRenderer/toolBar/toolBar.jsx index 4ef5ab211..07d6cfb70 100644 --- a/client/homebrew/brewRenderer/toolBar/toolBar.jsx +++ b/client/homebrew/brewRenderer/toolBar/toolBar.jsx @@ -3,6 +3,8 @@ const React = require('react'); const { useState, useEffect } = React; const _ = require('lodash') +import * as ZoomIcons from '../../../icons/icon-components/zoomIcons.jsx'; + const MAX_ZOOM = 300; const MIN_ZOOM = 10; @@ -92,14 +94,14 @@ const ToolBar = ({ onZoomChange, currentPage, onPageChange, totalPages })=>{ className='tool' onClick={()=>handleZoomChange(calculateZoom('fill'))} > - toFill +