|
1 | 1 | import { save as saveFileDialog } from "@tauri-apps/plugin-dialog"; |
2 | 2 |
|
3 | 3 | import { |
4 | | - Blend, |
5 | 4 | BrainCircuit, |
6 | 5 | ClipboardPaste, |
7 | 6 | ClipboardX, |
@@ -43,6 +42,7 @@ import { Panel } from "../components/panel"; |
43 | 42 | import ColorAutoPanel from "./_popup_panel/_color_auto_panel"; |
44 | 43 | import { isMac } from "../utils/platform"; |
45 | 44 | import { Settings } from "../core/service/Settings"; |
| 45 | +import { StageStyleManager } from "../core/service/feedbackService/stageStyle/StageStyleManager"; |
46 | 46 |
|
47 | 47 | interface ToolbarItemProps { |
48 | 48 | icon: React.ReactNode; // 定义 icon 的类型 |
@@ -80,20 +80,31 @@ export function PenItem({ color }: PenItemProps) { |
80 | 80 | if (color.a === 0) { |
81 | 81 | return ( |
82 | 82 | <div |
83 | | - className="mx-0.5 h-4 w-4 cursor-pointer rounded bg-transparent text-center text-sm hover:scale-125" |
| 83 | + className="group relative mx-0.5 flex h-4 w-4 cursor-pointer items-center justify-center rounded-full text-xs outline-1 transition-all hover:scale-125" |
| 84 | + style={{ |
| 85 | + backgroundColor: StageStyleManager.currentStyle.StageObjectBorder.toString(), |
| 86 | + color: StageStyleManager.currentStyle.Background.toString(), |
| 87 | + outlineColor: StageStyleManager.currentStyle.StageObjectBorder.toString(), |
| 88 | + }} |
84 | 89 | onClick={() => { |
85 | 90 | Settings.set("autoFillPenStrokeColorEnable", true); |
86 | 91 | Settings.set("autoFillPenStrokeColor", color.toArray()); |
87 | 92 | }} |
88 | 93 | > |
89 | | - <Blend className="h-4 w-4" /> |
| 94 | + <span className="bg-tooltip-bg text-tooltip-text border-tooltip-border absolute -top-6 flex h-6 w-48 items-center justify-center rounded-md border-2 text-xs opacity-0 transition-all group-hover:opacity-100"> |
| 95 | + 跟随主题切换的默认边框色 |
| 96 | + </span> |
| 97 | + A |
90 | 98 | </div> |
91 | 99 | ); |
92 | 100 | } |
93 | 101 | return ( |
94 | 102 | <div |
95 | 103 | className="mx-0.5 h-4 w-4 cursor-pointer rounded-full outline-1 transition-all hover:scale-125" |
96 | | - style={{ backgroundColor: color.toString() }} |
| 104 | + style={{ |
| 105 | + backgroundColor: color.toString(), |
| 106 | + outlineColor: StageStyleManager.currentStyle.StageObjectBorder.toString(), |
| 107 | + }} |
97 | 108 | onClick={async () => { |
98 | 109 | // |
99 | 110 | Settings.set("autoFillPenStrokeColorEnable", true); |
|
0 commit comments