diff --git a/image-annotate/package.json b/image-annotate/package.json index 541498a..67eac10 100644 --- a/image-annotate/package.json +++ b/image-annotate/package.json @@ -1,7 +1,7 @@ { "name": "@iwb-plugin/image-annotate", "private": true, - "version": "1.2.3", + "version": "1.2.4", "description": "IWB 插件:图片标注 / 修图(编辑器移植自 iwb-plaus 扩展,纯 Canvas 2D)", "ibwPlugin": { "id": "image-annotate", diff --git a/image-annotate/plugin/editor.css b/image-annotate/plugin/editor.css index 8a80359..702bd11 100755 --- a/image-annotate/plugin/editor.css +++ b/image-annotate/plugin/editor.css @@ -1546,3 +1546,26 @@ /* ---- v1.2.3:侧栏只留调色板 + 缩放 ---- */ /* 笔刷粗细/快捷点从侧栏移除后,缩放条直接挂在 aside 下:贴底,与调色板拉开距离 */ .iwb-editor-left > .iwb-editor-zoom { margin-top: auto; border-top: 1px solid #313244; padding-top: 10px; } + +/* ================================================================ + v1.2.4:顶栏命令带(原「更多 ▾」图标化) + 布局:标题 | 撤销·重做·还原 | ⟨图层 新建/导入⟩ ⟨顺序 置顶/上移/下移/置底⟩ ⟨视图 适应/侧栏⟩ | …… | 输出·下载·新建·覆盖·退出 + ================================================================ */ +.iwb-editor-header > .iwb-editor-history { order: 1; } +.iwb-editor-header > .iwb-editor-commands { order: 3; display: flex; align-items: center; gap: 6px; flex: 0 0 auto; } +.iwb-editor-header > .iwb-editor-commands .iwb-editor-divider { width: 1px; height: 20px; background: #313244; flex: 0 0 auto; } +.iwb-editor-cmdgroup { display: flex; align-items: center; gap: 4px; } +.iwb-editor-cmdgroup[data-group="order"] { gap: 2px; } +/* 顶栏里的命令按钮统一 30×30 方角,和撤销/重做同款 */ +.iwb-editor-header > .iwb-editor-commands .iwb-editor-action, +.iwb-editor-header > .iwb-editor-commands .iwb-editor-layer-btn { + width: 30px; height: 30px; min-width: 30px; padding: 0; border: 0; border-radius: 8px; + background: #313244; color: #cdd6f4; + display: inline-flex; align-items: center; justify-content: center; cursor: pointer; +} +.iwb-editor-header > .iwb-editor-commands .iwb-editor-action:hover:not(:disabled), +.iwb-editor-header > .iwb-editor-commands .iwb-editor-layer-btn:hover:not(:disabled) { background: #45475a; } +.iwb-editor-header > .iwb-editor-commands .iwb-editor-layer-btn:disabled { opacity: 0.35; cursor: not-allowed; } +/* 竖工具条里的选区命令(全选/反选/取消)与工具按钮区分一点点:命令用中性色底 */ +.iwb-editor-header > .iwb-editor-tools .iwb-editor-selcmd { background: #26263a; } +.iwb-editor-header > .iwb-editor-tools .iwb-editor-selcmd:hover { background: #45475a; } diff --git a/image-annotate/plugin/editor/dom.js b/image-annotate/plugin/editor/dom.js index 0cf1501..e5e43d9 100644 --- a/image-annotate/plugin/editor/dom.js +++ b/image-annotate/plugin/editor/dom.js @@ -25,25 +25,35 @@ import { bindEvents } from './events.js' -