feat(image-annotate): v1.16.0 右栏常驻调色面板 + 可拖宽度 + 字号提升一档
This commit is contained in:
1 parent
6a14f900df
commit
a477705c7f
12 files changed
+2983
-238
No files matched your search
@@ -1218,7 +1218,9 @@
|
||||
|
||||
/* 左栏:调色板在上,参数竖排,导出按钮底部 */
|
||||
.iwb-editor-left {
|
||||
width: 240px; min-width: 240px; flex: 0 0 240px;
|
||||
/* v1.16:宽度唯一出处。拖拽手柄写 --iwb-side-w,下面两条历史规则也都读它,
|
||||
不再各写一个 240/220 的魔数(以前三处硬编码,改一次要搜三次)。 */
|
||||
width: var(--iwb-side-w, 280px); min-width: var(--iwb-side-w, 280px); flex: 0 0 var(--iwb-side-w, 280px);
|
||||
display: flex; flex-direction: column; gap: 14px;
|
||||
padding: 12px; background: #181825; border-right: 1px solid #313244; overflow-y: auto;
|
||||
}
|
||||
@@ -1322,7 +1324,7 @@
|
||||
.iwb-editor-main { display: flex; flex-direction: row; align-items: stretch; }
|
||||
.iwb-editor-main > .iwb-editor-layer-panel { flex: 0 0 290px; min-width: 290px; width: 290px; }
|
||||
.iwb-editor-main > .iwb-editor-canvas-wrap { flex: 1 1 auto; min-width: 0; }
|
||||
.iwb-editor-left { flex: 0 0 240px; min-width: 240px; width: 240px; }
|
||||
.iwb-editor-left { flex: 0 0 var(--iwb-side-w, 280px); min-width: var(--iwb-side-w, 280px); width: var(--iwb-side-w, 280px); }
|
||||
.iwb-editor-layer-panel .iwb-editor-layer-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
|
||||
|
||||
/* ======== 顶部布局 v5:左侧重置类 / 中间工具 / 右侧保存类 ======== */
|
||||
@@ -1529,7 +1531,7 @@
|
||||
}
|
||||
.iwb-editor-main { padding-left: 0; }
|
||||
.iwb-editor-main > .iwb-editor-layer-panel { flex: 0 0 260px !important; min-width: 260px !important; width: 260px !important; }
|
||||
.iwb-editor-left { flex: 0 0 220px !important; min-width: 220px !important; width: 220px !important; }
|
||||
.iwb-editor-left { flex: 0 0 var(--iwb-side-w, 280px) !important; min-width: var(--iwb-side-w, 280px) !important; width: var(--iwb-side-w, 280px) !important; }
|
||||
.iwb-editor-overlay.panels-collapsed .iwb-editor-layer-panel,
|
||||
.iwb-editor-overlay.panels-collapsed .iwb-editor-left { display: none !important; }
|
||||
.iwb-editor-zoom-hint { display: none !important; }
|
||||
@@ -2096,3 +2098,135 @@
|
||||
|
||||
/* 选项栏按钮里是中文双字标签(常规/特粗/底色),不给 nowrap 会被挤成竖排 */
|
||||
.iwb-editor-optionbar-body .iwb-opt-btn { white-space: nowrap; }
|
||||
|
||||
/* ================================================================
|
||||
v1.16:右栏常驻调色面板 + 可拖宽度 + 整体字号提升一档
|
||||
需求(用户 2026-11-09):① 面板文字偏小 ② 右栏要能拖宽
|
||||
③ 把调色面板(含常用色)搬进右栏 ④ 顶部切换当前元素可调的颜色项
|
||||
================================================================ */
|
||||
|
||||
/* ---- 1) 右栏宽度手柄:贴在侧栏左边缘(侧栏在画布右侧) ----
|
||||
必须放在 left:0 而不是负值:侧栏本身 overflow-x:hidden,探出去的部分会被裁掉。 */
|
||||
.iwb-editor-side-resizer {
|
||||
position: absolute; left: 0; top: 0; bottom: 0; width: 9px;
|
||||
z-index: 46; cursor: col-resize; touch-action: none;
|
||||
}
|
||||
/* 平时完全隐形,悬停/拖动时才亮一条橙线:
|
||||
常驻一条竖线会和「画布/面板」的分隔线打架,看起来像两条边界。 */
|
||||
.iwb-editor-side-resizer::after {
|
||||
content: ''; position: absolute; left: 3px; top: 0; bottom: 0; width: 2px;
|
||||
border-radius: 1px; background: transparent; transition: background 0.12s ease;
|
||||
}
|
||||
.iwb-editor-side-resizer:hover::after,
|
||||
.iwb-editor-side-resizer.is-dragging::after { background: #e8a735; }
|
||||
|
||||
/* ---- 2) 右栏调色面板 ---- */
|
||||
.iwb-editor-colors {
|
||||
display: flex; flex-direction: column; gap: 9px;
|
||||
padding: 9px 10px 10px; border-radius: 10px;
|
||||
background: #1e1e2c; border: 1px solid #2f2f42;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
.iwb-editor-colors-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
|
||||
.iwb-editor-colors-title { font-size: 13px; font-weight: 600; color: #cdd6f4; }
|
||||
.iwb-editor-colors-hint { font-size: 11.5px; color: #7f87a3; }
|
||||
|
||||
/* 弹层是横排一行;右栏窄,改成竖排:调色器全宽 → HEX 一行 → 常用色 → 最近。
|
||||
结构完全一样(同一份 DOM),差异全在这里用容器选择器覆盖。 */
|
||||
.iwb-editor-colors .iwb-color-pop-head { flex-wrap: wrap; gap: 5px; }
|
||||
.iwb-editor-colors .iwb-color-pop-tab { padding: 0 8px; }
|
||||
.iwb-editor-colors .iwb-color-pop-body { flex-direction: column; align-items: stretch; gap: 8px; }
|
||||
.iwb-editor-colors .iwb-color-pop-sep { display: none; }
|
||||
.iwb-editor-colors .iwb-color-pop-picker { width: 100%; gap: 6px; }
|
||||
.iwb-editor-colors .iwb-color-sv { flex: 1 1 auto; width: auto; height: 118px; }
|
||||
.iwb-editor-colors .iwb-color-hue { width: 16px; height: 118px; flex: 0 0 16px; }
|
||||
.iwb-editor-colors .iwb-color-pop-fields { width: 100%; gap: 6px; }
|
||||
.iwb-editor-colors .iwb-editor-color-hex-input { flex: 1 1 auto; width: auto; height: 28px; }
|
||||
.iwb-editor-colors .iwb-editor-color-eye { width: 30px; height: 28px; border-radius: 6px; flex: 0 0 auto; }
|
||||
|
||||
/* 分组:右栏显示「常用色 / 最近」小标题,弹层里隐藏(那里横向排得下,加标题反而占高) */
|
||||
.iwb-color-group { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 0 0 auto; }
|
||||
.iwb-color-group-label { font-size: 11.5px; color: #7f87a3; letter-spacing: 0.3px; }
|
||||
.iwb-editor-color-pop .iwb-color-group { gap: 0; }
|
||||
.iwb-editor-color-pop .iwb-color-group-label { display: none; }
|
||||
/* display:flex 会盖掉 [hidden] 的默认 display:none,必须显式写一条 */
|
||||
.iwb-color-group[hidden] { display: none; }
|
||||
|
||||
/* 右栏色块:网格按容器宽度自适应,拖宽后一行能多放几个 */
|
||||
.iwb-editor-colors .iwb-editor-color-swatches {
|
||||
display: grid; grid-template-columns: repeat(auto-fill, minmax(24px, 1fr));
|
||||
gap: 6px; width: 100%;
|
||||
}
|
||||
.iwb-editor-colors .iwb-editor-recent-colors {
|
||||
display: grid; grid-template-columns: repeat(auto-fill, minmax(22px, 1fr));
|
||||
gap: 6px; width: 100%;
|
||||
}
|
||||
.iwb-editor-colors .iwb-editor-color-panel-swatch {
|
||||
width: 100%; aspect-ratio: 1 / 1; min-height: 22px; padding: 0; border: 0;
|
||||
border-radius: 50%; cursor: pointer; transition: transform 0.08s ease;
|
||||
}
|
||||
.iwb-editor-colors .iwb-editor-color-panel-swatch:hover { transform: scale(1.1); }
|
||||
.iwb-editor-colors .iwb-editor-color-panel-swatch.active { outline: 2px solid #fff; outline-offset: 2px; }
|
||||
|
||||
/* ---- 3) 字号 +1 档 ----
|
||||
旧值大量是 10–11.5px(按 1440 宽屏定的),在 2K/4K 与系统缩放 125% 下发虚。
|
||||
集中用 #iwb-editor-overlay 前缀覆盖而不是逐条改原规则:字号以后只在这块调。
|
||||
宿主画布外的节点浮条(.iwb-node-floatbar 等)不在遮罩内,不受影响。 */
|
||||
#iwb-editor-overlay { font-size: 13px; }
|
||||
#iwb-editor-overlay .iwb-editor-title em.iwb-editor-doc-size { font-size: 12px; }
|
||||
#iwb-editor-overlay .iwb-editor-header > .iwb-editor-session .iwb-editor-btn,
|
||||
#iwb-editor-overlay .iwb-editor-header .iwb-editor-export-actions .iwb-editor-btn { font-size: 12.5px; }
|
||||
#iwb-editor-overlay .iwb-editor-export-settings-btn { font-size: 12.5px; }
|
||||
#iwb-editor-overlay .iwb-editor-export-row > span,
|
||||
#iwb-editor-overlay .iwb-editor-export-note,
|
||||
#iwb-editor-overlay .iwb-editor-more-menu kbd { font-size: 12px; }
|
||||
|
||||
/* 选项栏 */
|
||||
#iwb-editor-overlay .iwb-editor-optionbar { font-size: 13px; }
|
||||
#iwb-editor-overlay .iwb-opt-label,
|
||||
#iwb-editor-overlay .iwb-opt-current,
|
||||
#iwb-editor-overlay .iwb-opt-btn,
|
||||
#iwb-editor-overlay .iwb-opt-num,
|
||||
#iwb-editor-overlay .iwb-opt-select { font-size: 13px; }
|
||||
#iwb-editor-overlay .iwb-opt-num { width: 50px; }
|
||||
#iwb-editor-overlay .iwb-opt-hint,
|
||||
#iwb-editor-overlay .iwb-editor-optionbar-tip,
|
||||
#iwb-editor-overlay .iwb-opt-unit,
|
||||
#iwb-editor-overlay .iwb-opt-swatch-label { font-size: 12px; }
|
||||
|
||||
/* 状态栏 */
|
||||
#iwb-editor-overlay .iwb-editor-statusbar { font-size: 12px; height: 28px; min-height: 28px; }
|
||||
|
||||
/* 图层面板 */
|
||||
#iwb-editor-overlay .iwb-layer-name { font-size: 13px; }
|
||||
#iwb-editor-overlay .iwb-layer-name-input { font-size: 13px; }
|
||||
#iwb-editor-overlay .iwb-layer-paint { font-size: 12px; }
|
||||
#iwb-editor-overlay .iwb-layer-op,
|
||||
#iwb-editor-overlay .iwb-layer-op-val { font-size: 11.5px; }
|
||||
#iwb-editor-overlay .iwb-layer-op-val { width: 36px; }
|
||||
|
||||
/* 右栏:图片调节 */
|
||||
#iwb-editor-overlay .iwb-editor-adj-title { font-size: 13px; }
|
||||
#iwb-editor-overlay .iwb-editor-adj-target { font-size: 11.5px; }
|
||||
#iwb-editor-overlay .iwb-editor-adj-reset { font: 500 12px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; padding: 3px 8px; }
|
||||
#iwb-editor-overlay .iwb-editor-adj-row { grid-template-columns: 50px 1fr 40px; }
|
||||
#iwb-editor-overlay .iwb-editor-adj-name { font-size: 12.5px; }
|
||||
#iwb-editor-overlay .iwb-editor-adj-val { width: 40px; font: 500 12px/1.4 -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; }
|
||||
#iwb-editor-overlay .iwb-editor-adj-tip { font-size: 11.5px; }
|
||||
|
||||
/* 右栏:快速效果 */
|
||||
#iwb-editor-overlay .iwb-editor-fx-title { font-size: 13px; }
|
||||
#iwb-editor-overlay .iwb-editor-fx-target { font-size: 11.5px; max-width: 150px; }
|
||||
#iwb-editor-overlay .iwb-editor-fx-btn { font: 500 12px/1 -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; padding: 8px 2px 7px; }
|
||||
#iwb-editor-overlay .iwb-editor-fx-tip { font-size: 11.5px; }
|
||||
#iwb-editor-overlay .iwb-editor-fx-adj-name,
|
||||
#iwb-editor-overlay .iwb-editor-fx-adj-val { font-size: 12px; }
|
||||
|
||||
/* 右栏:缩放 */
|
||||
#iwb-editor-overlay .iwb-editor-left .iwb-editor-zoom .iwb-editor-zoom-val,
|
||||
#iwb-editor-overlay .iwb-editor-left .iwb-editor-zoom .iwb-editor-zoom-fit { font-size: 12px; }
|
||||
|
||||
/* 调色面板本体 */
|
||||
#iwb-editor-overlay .iwb-color-pop-tab,
|
||||
#iwb-editor-overlay .iwb-color-pop-none { font-size: 12.5px; height: 26px; }
|
||||
#iwb-editor-overlay .iwb-editor-color-pop .iwb-editor-color-hex-input { font-size: 13px; }
|
||||
Reference in new issue
Block a user