Skip to content

Commit

Permalink
截屏 工具栏 稍后显示
Browse files Browse the repository at this point in the history
  • Loading branch information
xushengfeng committed Jun 17, 2024
1 parent 4772352 commit c476a47
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ShareTypes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export interface setting {
按钮图标比例: number;
初始位置: { left: string; top: string };
功能: 功能[];
稍后出现: boolean;
};
字体: {
主要字体: string;
Expand Down
1 change: 1 addition & 0 deletions src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1900,6 +1900,7 @@ var defaultSetting: setting = {
按钮图标比例: 0.7,
初始位置: { left: "10px", top: "100px" },
功能: ["close", "screens", "ocr", "search", "QR", "open", "ding", "record", "long", "copy", "save"],
稍后出现: false,
},
字体: {
主要字体: "",
Expand Down
16 changes: 16 additions & 0 deletions src/renderer/clip/clip_window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1577,6 +1577,7 @@ clipCanvas.onmouseup = (e) => {
if (autoDo != "no" && e.button == 0) {
tool[autoDo]();
}
showBars(true);
}
if (moving) {
moving = false;
Expand Down Expand Up @@ -2692,6 +2693,21 @@ function showSideBar(show: boolean) {
}
}

function showBars(b: boolean) {
let l = [toolBar, drawBar];
for (let i of l) {
if (b) {
i.style.pointerEvents = "";
i.style.opacity = "";
} else {
i.style.pointerEvents = "none";
i.style.opacity = "0";
}
}
}

if (store.get("工具栏.稍后出现")) showBars(false);

var mode: EditType["draw"];

// 笔
Expand Down
8 changes: 8 additions & 0 deletions src/renderer/setting.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ <h3>位置</h3>
<button>右上</button>
</div>

<h3>稍后显示</h3>
<comment>截屏时,工具栏和绘制栏都会隐藏,直到调整完框选</comment>
<br>
<label>
<input type="checkbox" data-path="工具栏.稍后出现">
<t>启用</t>
</label>


<h2>鼠标跟随栏</h2>
<label>
Expand Down

0 comments on commit c476a47

Please sign in to comment.