Browse Source

为矩形裁剪添加图标

sw 1 day ago
parent
commit
59e815af39

+ 75 - 0
src/assets/Icons/base/module-process/theme-default/1x/rectangle-crop_normal.svg

@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xml:space="preserve"
+   inkscape:version="1.4.2 (f4327f4, 2025-05-13)"
+   sodipodi:docname="矩形裁剪.svg"
+   version="1.1"
+   id="svg2"
+   width="52"
+   height="50"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
+     inkscape:zoom="2.0334082"
+     inkscape:cx="182.69819"
+     inkscape:cy="186.63248"
+     inkscape:window-width="1920"
+     inkscape:window-height="1009"
+     inkscape:window-x="-8"
+     inkscape:window-y="-8"
+     inkscape:window-maximized="1"
+     id="namedview1"
+     pagecolor="#ffffff"
+     bordercolor="#000000"
+     borderopacity="0.25"
+     inkscape:showpageshadow="2"
+     inkscape:pageopacity="0.0"
+     inkscape:pagecheckerboard="0"
+     inkscape:deskcolor="#d1d1d1"
+     inkscape:current-layer="g2" /><defs
+     id="defs1" /><g
+     id="g2"
+     style="fill:#b5cb5f;fill-opacity:1"
+     transform="matrix(0.99992175,0,0,1.0000016,-93.230896,-44.84951)"><g
+       id="g1"
+       transform="translate(86.242221,37.849398)"
+       style="fill:#ffffff;fill-opacity:1"><rect
+         x="8"
+         y="8"
+         width="48"
+         height="48"
+         rx="4"
+         ry="4"
+         fill="none"
+         stroke="#007bff"
+         stroke-width="2"
+         stroke-dasharray="4, 2"
+         id="rect1"
+         style="fill:#ffffff;fill-opacity:1" /><g
+         stroke="#333333"
+         stroke-width="2"
+         fill="none"
+         stroke-linecap="round"
+         id="g3"
+         style="fill:#ffffff;fill-opacity:1"><!-- 上刀片 --><path
+           d="M 42,20 58,36"
+           id="path1"
+           style="fill:#ffffff;fill-opacity:1" /><circle
+           cx="42"
+           cy="20"
+           r="3"
+           fill="#333333"
+           id="circle1"
+           style="fill:#ffffff;fill-opacity:1" /><!-- 下刀片 --><path
+           d="M 42,44 58,28"
+           id="path2"
+           style="display:inline;fill:#ffffff;fill-opacity:1" /><circle
+           cx="42"
+           cy="44"
+           r="3"
+           fill="#333333"
+           id="circle2"
+           style="fill:#ffffff;fill-opacity:1" /><!-- 手柄转轴 --></g></g></g></svg>

+ 4 - 3
src/pages/view/components/FunctionArea.tsx

@@ -6,6 +6,7 @@ import { setAction } from '@/states/view/functionAreaSlice';
 import { switchToMeasurementPanel, switchToMorePanel, switchToAdvancedProcessingPanel, switchToRectCropPanel } from '@/states/panelSwitchSliceForView';
 import Icon from '@/components/Icon';
 import { showNotImplemented } from '@/utils/notificationHelper';
+import { useAppSelector } from '@/states/store';
 
 const FunctionButton = ({
   title,
@@ -17,7 +18,7 @@ const FunctionButton = ({
   iconName: string;
 }) => {
   const dispatch = useDispatch();
-
+const themeType = useAppSelector((state) => state.theme.themeType);
   const handleButtonClick = () => {
     if (action === 'AddMark' ||
       action === 'Delete Digital Mask' ||
@@ -56,7 +57,7 @@ const FunctionButton = ({
           module="module-process"
           name={iconName}
           userId="base"
-          theme="default"
+          theme={themeType}
           size="2x"
           state="normal"
         />
@@ -219,7 +220,7 @@ const FunctionArea = () => {
       <FunctionButton
         title="矩形裁剪"
         action="Rectangle Crop"
-        iconName="btn_RectCrop"
+        iconName="rectangle-crop"
       />
       <FunctionButton title="More" action="More" iconName="btn_OtherSetting" />
     </Flex>