Skip to content

Commit 2124ed0

Browse files
committed
📝 优化涂鸦工具颜色说明
1 parent e9418ed commit 2124ed0

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

app/src/pages/_toolbar.tsx

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { save as saveFileDialog } from "@tauri-apps/plugin-dialog";
22

33
import {
4-
Blend,
54
BrainCircuit,
65
ClipboardPaste,
76
ClipboardX,
@@ -43,6 +42,7 @@ import { Panel } from "../components/panel";
4342
import ColorAutoPanel from "./_popup_panel/_color_auto_panel";
4443
import { isMac } from "../utils/platform";
4544
import { Settings } from "../core/service/Settings";
45+
import { StageStyleManager } from "../core/service/feedbackService/stageStyle/StageStyleManager";
4646

4747
interface ToolbarItemProps {
4848
icon: React.ReactNode; // 定义 icon 的类型
@@ -80,20 +80,31 @@ export function PenItem({ color }: PenItemProps) {
8080
if (color.a === 0) {
8181
return (
8282
<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+
}}
8489
onClick={() => {
8590
Settings.set("autoFillPenStrokeColorEnable", true);
8691
Settings.set("autoFillPenStrokeColor", color.toArray());
8792
}}
8893
>
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
9098
</div>
9199
);
92100
}
93101
return (
94102
<div
95103
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+
}}
97108
onClick={async () => {
98109
//
99110
Settings.set("autoFillPenStrokeColorEnable", true);

0 commit comments

Comments
 (0)