797 lines
16 KiB
CSS
797 lines
16 KiB
CSS
/* =============================================
|
||
Image Tab
|
||
Ported from ComfyUI-Workflow-Studio's image-edit-tab.css.
|
||
Local variables map to comic-creator's existing :root palette.
|
||
============================================= */
|
||
|
||
#image-tab {
|
||
--it-bg: var(--bg-color, #1e1e1e);
|
||
--it-surface: var(--secondary-color, #2d2d2d);
|
||
--it-surface-hover: var(--hover-color, #3d3d3d);
|
||
--it-border: var(--border-color, #3e3e3e);
|
||
--it-text: var(--text-color, #e0e0e0);
|
||
--it-text-secondary: var(--text-secondary, #999999);
|
||
--it-primary: var(--primary-color, #0078d4);
|
||
--it-success: #4caf50;
|
||
|
||
padding: 0;
|
||
overflow: hidden;
|
||
}
|
||
|
||
#image-tab.tab-content.active {
|
||
display: flex;
|
||
height: 100%;
|
||
}
|
||
|
||
.ie-editor {
|
||
display: flex;
|
||
width: 100%;
|
||
height: 100%;
|
||
overflow: hidden;
|
||
background: var(--it-bg);
|
||
}
|
||
|
||
/* =============================================
|
||
Left Toolbar
|
||
============================================= */
|
||
|
||
.ie-toolbar {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
gap: 4px;
|
||
padding: 8px 5px;
|
||
background: var(--it-surface);
|
||
border-right: 1px solid var(--it-border);
|
||
width: 46px;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.ie-tool-btn {
|
||
width: 34px;
|
||
height: 34px;
|
||
border: 1px solid transparent;
|
||
background: transparent;
|
||
border-radius: 6px;
|
||
cursor: pointer;
|
||
font-size: 15px;
|
||
font-weight: 600;
|
||
color: var(--it-text);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
transition: background 0.12s, border-color 0.12s;
|
||
user-select: none;
|
||
position: relative;
|
||
}
|
||
|
||
.ie-tool-btn:hover {
|
||
background: var(--it-surface-hover);
|
||
border-color: var(--it-border);
|
||
}
|
||
|
||
.ie-tool-btn.active {
|
||
background: var(--it-primary);
|
||
border-color: var(--it-primary);
|
||
color: #fff;
|
||
}
|
||
|
||
/* =============================================
|
||
Buttons (local to Image tab)
|
||
============================================= */
|
||
|
||
.it-btn {
|
||
background: var(--it-surface-hover);
|
||
color: var(--it-text);
|
||
border: 1px solid var(--it-border);
|
||
border-radius: 4px;
|
||
padding: 5px 10px;
|
||
font-size: 12px;
|
||
cursor: pointer;
|
||
transition: background 0.12s, border-color 0.12s;
|
||
}
|
||
|
||
.it-btn:hover {
|
||
background: var(--it-border);
|
||
}
|
||
|
||
.it-btn:disabled {
|
||
opacity: 0.5;
|
||
cursor: not-allowed;
|
||
}
|
||
|
||
.it-btn-sm {
|
||
padding: 3px 8px;
|
||
font-size: 11px;
|
||
}
|
||
|
||
.it-btn-primary {
|
||
background: var(--it-primary);
|
||
border-color: var(--it-primary);
|
||
color: #fff;
|
||
}
|
||
|
||
.it-btn-primary:hover {
|
||
filter: brightness(1.1);
|
||
}
|
||
|
||
/* =============================================
|
||
Center column
|
||
============================================= */
|
||
|
||
.ie-center {
|
||
flex: 1;
|
||
display: flex;
|
||
flex-direction: column;
|
||
overflow: hidden;
|
||
min-width: 0;
|
||
}
|
||
|
||
/* Action bar */
|
||
.ie-action-bar {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
padding: 5px 10px;
|
||
border-bottom: 1px solid var(--it-border);
|
||
background: var(--it-surface);
|
||
flex-shrink: 0;
|
||
flex-wrap: wrap;
|
||
}
|
||
|
||
/* Save / Send to グループの区切り線 */
|
||
.ie-action-sep {
|
||
width: 1px;
|
||
height: 20px;
|
||
background: var(--it-border);
|
||
margin: 0 2px;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
/* Tool options bar */
|
||
.ie-tool-options {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 14px;
|
||
padding: 5px 10px;
|
||
border-bottom: 1px solid var(--it-border);
|
||
background: var(--it-surface);
|
||
flex-shrink: 0;
|
||
flex-wrap: wrap;
|
||
min-height: 36px;
|
||
font-size: 12px;
|
||
}
|
||
|
||
.ie-opt-group {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 5px;
|
||
}
|
||
|
||
.ie-opt-group label {
|
||
color: var(--it-text-secondary);
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.ie-opt-select {
|
||
font-size: 12px;
|
||
padding: 2px 5px;
|
||
background: var(--it-surface);
|
||
color: var(--it-text);
|
||
border: 1px solid var(--it-border);
|
||
border-radius: 4px;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.ie-opt-input {
|
||
font-size: 12px;
|
||
padding: 2px 5px;
|
||
background: var(--it-surface);
|
||
color: var(--it-text);
|
||
border: 1px solid var(--it-border);
|
||
border-radius: 4px;
|
||
}
|
||
|
||
.ie-opt-active {
|
||
background: var(--it-primary) !important;
|
||
color: #fff !important;
|
||
border-color: var(--it-primary) !important;
|
||
}
|
||
|
||
/* Canvas wrap */
|
||
.ie-canvas-wrap {
|
||
flex: 1;
|
||
overflow: hidden;
|
||
position: relative;
|
||
background: #1a1a1a;
|
||
background-image:
|
||
linear-gradient(45deg, #222 25%, transparent 25%),
|
||
linear-gradient(-45deg, #222 25%, transparent 25%),
|
||
linear-gradient(45deg, transparent 75%, #222 75%),
|
||
linear-gradient(-45deg, transparent 75%, #222 75%);
|
||
background-size: 20px 20px;
|
||
background-position: 0 0, 0 10px, 10px -10px, -10px 0;
|
||
}
|
||
|
||
.ie-canvas-container {
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
transform-origin: top left;
|
||
line-height: 0;
|
||
box-shadow: 0 2px 20px rgba(0,0,0,0.6);
|
||
}
|
||
|
||
.ie-canvas-container canvas {
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
display: block;
|
||
}
|
||
|
||
#ie-canvas-bg {
|
||
z-index: 1;
|
||
}
|
||
|
||
#ie-canvas-draw {
|
||
z-index: 2;
|
||
cursor: crosshair;
|
||
}
|
||
|
||
#ie-canvas-overlay {
|
||
z-index: 3;
|
||
cursor: default;
|
||
pointer-events: none; /* SelectTool.activate()でautoに変更 */
|
||
}
|
||
|
||
/* Selectツール専用の拡張オーバーレイ。キャンバス実サイズより一回り大きく取り、
|
||
キャンバス範囲外にはみ出したオブジェクトの選択枠・ハンドルも表示・操作できるようにする
|
||
(ピクセル内容自体はcanvas要素の性質上はみ出た部分を描画できないため対象外、枠とハンドルのみ)。
|
||
ie-canvas-overlay(Crop/Blur/Shape/MaskVector等が使う既存オーバーレイ)とは独立させ、
|
||
Selectツール以外の挙動には影響しないようにしている */
|
||
#ie-canvas-select-overlay {
|
||
z-index: 4;
|
||
cursor: default;
|
||
pointer-events: none; /* SelectTool.activate()でautoに変更 */
|
||
}
|
||
|
||
.ie-placeholder {
|
||
position: absolute;
|
||
inset: 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
justify-content: center;
|
||
color: var(--it-text-secondary);
|
||
font-size: 14px;
|
||
pointer-events: none;
|
||
gap: 8px;
|
||
}
|
||
|
||
.ie-placeholder-icon {
|
||
font-size: 40px;
|
||
opacity: 0.3;
|
||
}
|
||
|
||
/* Zoom bar */
|
||
.ie-zoom-bar {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
padding: 4px 10px;
|
||
border-top: 1px solid var(--it-border);
|
||
background: var(--it-surface);
|
||
font-size: 12px;
|
||
flex-shrink: 0;
|
||
color: var(--it-text-secondary);
|
||
}
|
||
|
||
#ie-zoom-label {
|
||
min-width: 38px;
|
||
text-align: right;
|
||
color: var(--it-text);
|
||
}
|
||
|
||
/* =============================================
|
||
Properties Pane (left of Layers panel)
|
||
============================================= */
|
||
|
||
.ie-props-pane {
|
||
width: 160px;
|
||
flex-shrink: 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
border-left: 1px solid var(--it-border);
|
||
background: var(--it-surface);
|
||
overflow: hidden;
|
||
}
|
||
|
||
.ie-props-header {
|
||
display: flex;
|
||
align-items: center;
|
||
padding: 5px 8px;
|
||
border-bottom: 1px solid var(--it-border);
|
||
font-size: 11px;
|
||
font-weight: 600;
|
||
text-transform: uppercase;
|
||
letter-spacing: 0.4px;
|
||
color: var(--it-text-secondary);
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.ie-props-body {
|
||
flex: 1;
|
||
overflow-y: auto;
|
||
padding: 8px 6px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 10px;
|
||
}
|
||
|
||
.ie-props-row {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 4px;
|
||
font-size: 11px;
|
||
}
|
||
|
||
.ie-props-row label {
|
||
color: var(--it-text-secondary);
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.ie-props-row input[type="range"] {
|
||
width: 100%;
|
||
}
|
||
|
||
.ie-props-row span {
|
||
font-size: 11px;
|
||
color: var(--it-text);
|
||
text-align: right;
|
||
}
|
||
|
||
/* Mask layer item highlight */
|
||
.ie-layer-item[data-type="mask"] .ie-layer-type-icon {
|
||
color: #e25252;
|
||
}
|
||
|
||
/* =============================================
|
||
Right Panel (Layers)
|
||
============================================= */
|
||
|
||
.ie-right-panel {
|
||
width: 220px;
|
||
flex-shrink: 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
border-left: 1px solid var(--it-border);
|
||
background: var(--it-surface);
|
||
overflow: hidden;
|
||
}
|
||
|
||
.ie-layers-header {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 2px;
|
||
padding: 5px 6px;
|
||
border-bottom: 1px solid var(--it-border);
|
||
font-size: 11px;
|
||
font-weight: 600;
|
||
text-transform: uppercase;
|
||
letter-spacing: 0.4px;
|
||
color: var(--it-text-secondary);
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.ie-layers-header > span {
|
||
flex: 1;
|
||
}
|
||
|
||
.ie-layers-header-row2 {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
padding: 5px 6px;
|
||
border-bottom: 1px solid var(--it-border);
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.ie-layers-header-row2 .it-btn {
|
||
flex: 1;
|
||
}
|
||
|
||
.ie-layer-list {
|
||
flex: 1;
|
||
overflow-y: auto;
|
||
padding: 4px;
|
||
}
|
||
|
||
.ie-layer-item {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 5px;
|
||
padding: 4px 5px;
|
||
border-radius: 5px;
|
||
cursor: pointer;
|
||
font-size: 12px;
|
||
user-select: none;
|
||
transition: background 0.1s;
|
||
}
|
||
|
||
.ie-layer-item:hover {
|
||
background: var(--it-surface-hover);
|
||
}
|
||
|
||
.ie-layer-item.active {
|
||
background: rgba(90, 110, 220, 0.22);
|
||
outline: 1px solid rgba(90, 110, 220, 0.4);
|
||
}
|
||
|
||
.ie-layer-item.multi-selected {
|
||
background: rgba(90, 110, 220, 0.12);
|
||
outline: 1px dashed rgba(90, 110, 220, 0.5);
|
||
}
|
||
|
||
.ie-layer-thumb {
|
||
width: 30px;
|
||
height: 30px;
|
||
border: 1px solid var(--it-border);
|
||
border-radius: 3px;
|
||
flex-shrink: 0;
|
||
object-fit: cover;
|
||
background:
|
||
repeating-conic-gradient(#888 0% 25%, transparent 0% 50%)
|
||
0 0 / 8px 8px;
|
||
}
|
||
|
||
.ie-layer-name {
|
||
flex: 1;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.ie-layer-vis-btn {
|
||
background: none;
|
||
border: none;
|
||
cursor: pointer;
|
||
font-size: 13px;
|
||
padding: 0;
|
||
line-height: 1;
|
||
color: var(--it-text);
|
||
opacity: 0.85;
|
||
flex-shrink: 0;
|
||
transition: opacity 0.1s;
|
||
}
|
||
|
||
.ie-layer-vis-btn:hover {
|
||
opacity: 1;
|
||
}
|
||
|
||
/* レイヤーグループ(フォルダ)ヘッダー行。メンバーレイヤーはgroupIdで判定し、
|
||
このヘッダーの直後にまとめて表示される(layers配列自体の並びは変更しない) */
|
||
.ie-layer-group-header {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 5px;
|
||
padding: 4px 5px;
|
||
border-radius: 5px;
|
||
cursor: pointer;
|
||
font-size: 12px;
|
||
-webkit-user-select: none;
|
||
user-select: none;
|
||
color: var(--it-text-secondary);
|
||
transition: background 0.1s;
|
||
}
|
||
|
||
.ie-layer-group-header:hover {
|
||
background: var(--it-surface-hover);
|
||
}
|
||
|
||
.ie-layer-group-icon {
|
||
flex-shrink: 0;
|
||
font-size: 9px;
|
||
width: 12px;
|
||
text-align: center;
|
||
}
|
||
|
||
.ie-layer-group-name {
|
||
flex: 1;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.ie-layer-group-count {
|
||
font-size: 10px;
|
||
color: var(--it-text-secondary);
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.ie-layer-item-grouped {
|
||
padding-left: 20px;
|
||
}
|
||
|
||
.ie-adj-add-row {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
padding: 6px 8px;
|
||
border-top: 1px solid var(--it-border);
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.ie-adj-add-row .ie-opt-select {
|
||
flex: 1;
|
||
min-width: 0;
|
||
}
|
||
|
||
.ie-global-opacity-row {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
padding: 6px 8px;
|
||
border-bottom: 1px solid var(--it-border);
|
||
font-size: 11px;
|
||
flex-shrink: 0;
|
||
color: var(--it-text-secondary);
|
||
}
|
||
|
||
.ie-global-opacity-row label {
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.ie-global-opacity-row input[type="range"] {
|
||
flex: 1;
|
||
}
|
||
|
||
#ie-global-opacity-label {
|
||
min-width: 32px;
|
||
text-align: right;
|
||
color: var(--it-text);
|
||
}
|
||
|
||
.ie-opacity-row {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
padding: 6px 8px;
|
||
border-top: 1px solid var(--it-border);
|
||
font-size: 12px;
|
||
flex-shrink: 0;
|
||
color: var(--it-text-secondary);
|
||
}
|
||
|
||
.ie-opacity-row input[type="range"] {
|
||
flex: 1;
|
||
}
|
||
|
||
#ie-layer-opacity-label {
|
||
min-width: 32px;
|
||
text-align: right;
|
||
color: var(--it-text);
|
||
}
|
||
|
||
/* =============================================
|
||
Text Tool Overlay
|
||
============================================= */
|
||
|
||
.ie-text-overlay {
|
||
position: absolute;
|
||
z-index: 100;
|
||
background: var(--it-surface);
|
||
border: 1px solid var(--it-border);
|
||
border-radius: 6px;
|
||
padding: 8px;
|
||
box-shadow: 0 4px 16px rgba(0,0,0,0.4);
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 6px;
|
||
min-width: 180px;
|
||
}
|
||
|
||
.ie-text-textarea {
|
||
width: 200px;
|
||
resize: vertical;
|
||
background: var(--it-bg);
|
||
color: var(--it-text);
|
||
border: 1px solid var(--it-border);
|
||
border-radius: 4px;
|
||
padding: 6px;
|
||
font-size: 13px;
|
||
font-family: inherit;
|
||
min-height: 60px;
|
||
}
|
||
|
||
.ie-text-btn-row {
|
||
display: flex;
|
||
gap: 6px;
|
||
justify-content: flex-end;
|
||
}
|
||
|
||
/* =============================================
|
||
Close confirm dialog
|
||
============================================= */
|
||
|
||
.ie-confirm-overlay {
|
||
position: fixed;
|
||
inset: 0;
|
||
z-index: 1000;
|
||
background: rgba(0, 0, 0, 0.5);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.ie-confirm-box {
|
||
background: var(--it-surface);
|
||
border: 1px solid var(--it-border);
|
||
border-radius: 8px;
|
||
padding: 20px;
|
||
min-width: 280px;
|
||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
|
||
}
|
||
|
||
.ie-confirm-title {
|
||
font-size: 14px;
|
||
font-weight: 600;
|
||
color: var(--it-text);
|
||
margin-bottom: 8px;
|
||
}
|
||
|
||
.ie-confirm-body {
|
||
font-size: 12px;
|
||
color: var(--it-text-secondary);
|
||
margin-bottom: 16px;
|
||
}
|
||
|
||
.ie-confirm-btns {
|
||
display: flex;
|
||
gap: 8px;
|
||
justify-content: flex-end;
|
||
}
|
||
|
||
/* =============================================
|
||
Toast
|
||
============================================= */
|
||
|
||
.ie-toast {
|
||
position: absolute;
|
||
bottom: 16px;
|
||
left: 50%;
|
||
transform: translateX(-50%);
|
||
background: var(--it-surface);
|
||
color: var(--it-text);
|
||
border: 1px solid var(--it-border);
|
||
border-radius: 6px;
|
||
padding: 8px 16px;
|
||
font-size: 12px;
|
||
box-shadow: 0 4px 16px rgba(0,0,0,0.4);
|
||
z-index: 200;
|
||
transition: opacity 0.3s;
|
||
pointer-events: none;
|
||
}
|
||
|
||
.ie-toast.success {
|
||
border-color: var(--it-success);
|
||
color: var(--it-success);
|
||
}
|
||
|
||
.ie-toast.error {
|
||
border-color: #e2534a;
|
||
color: #e2534a;
|
||
}
|
||
|
||
/* =============================================
|
||
Scrollbar
|
||
============================================= */
|
||
|
||
.ie-layer-list::-webkit-scrollbar {
|
||
width: 4px;
|
||
}
|
||
|
||
.ie-layer-list::-webkit-scrollbar-thumb {
|
||
background: var(--it-border);
|
||
border-radius: 2px;
|
||
}
|
||
|
||
/* Draw tool palette */
|
||
.ie-palette-content {
|
||
display: flex;
|
||
align-items: center;
|
||
flex-wrap: wrap;
|
||
gap: 6px 14px;
|
||
}
|
||
|
||
.ie-palette-wells {
|
||
gap: 6px;
|
||
}
|
||
|
||
.ie-palette-well,
|
||
.ie-palette-swatch {
|
||
padding: 0;
|
||
border-radius: 50%;
|
||
background: var(--swatch, transparent);
|
||
cursor: pointer;
|
||
}
|
||
|
||
.ie-palette-well {
|
||
width: 26px;
|
||
height: 26px;
|
||
border: 1px solid var(--it-text-secondary);
|
||
}
|
||
|
||
.ie-palette-well.is-active {
|
||
outline: 2px solid var(--it-primary);
|
||
outline-offset: 2px;
|
||
}
|
||
|
||
.ie-palette-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(10, 16px);
|
||
grid-auto-rows: 16px;
|
||
gap: 2px;
|
||
}
|
||
|
||
.ie-palette-swatch {
|
||
width: 16px;
|
||
height: 16px;
|
||
border: 1px solid rgba(128, 128, 128, 0.7);
|
||
}
|
||
|
||
.ie-palette-swatch.is-empty {
|
||
border-color: var(--it-text-secondary);
|
||
opacity: 0.6;
|
||
}
|
||
|
||
.ie-palette-swatch:hover,
|
||
.ie-palette-swatch:focus-visible,
|
||
.ie-palette-well:focus-visible {
|
||
outline: 1px solid var(--it-text);
|
||
outline-offset: 1px;
|
||
opacity: 1;
|
||
}
|
||
|
||
.ie-palette-swatch.is-current {
|
||
outline: 2px solid var(--it-primary);
|
||
outline-offset: 0;
|
||
}
|
||
|
||
.ie-palette-picker {
|
||
position: fixed;
|
||
width: 1px;
|
||
height: 1px;
|
||
padding: 0;
|
||
border: 0;
|
||
opacity: 0;
|
||
pointer-events: none;
|
||
}
|
||
|
||
.ie-palette-menu {
|
||
position: fixed;
|
||
z-index: 1000;
|
||
display: flex;
|
||
flex-direction: column;
|
||
min-width: 150px;
|
||
padding: 4px;
|
||
border: 1px solid var(--it-border);
|
||
border-radius: 4px;
|
||
background: var(--it-surface);
|
||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
|
||
}
|
||
|
||
.ie-palette-menu button {
|
||
padding: 5px 10px;
|
||
border: 0;
|
||
border-radius: 3px;
|
||
background: transparent;
|
||
color: var(--it-text);
|
||
font-size: 12px;
|
||
text-align: left;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.ie-palette-menu button:hover {
|
||
background: var(--it-surface-hover);
|
||
}
|