- Color palette on the Draw tool's second row: Color 1/2, 20 basic colors, 20 custom slots; registered colors are saved in the browser - Draw shortcuts: D/E mode, X switch color, [ ] brush size, B brush picker - Eyedropper next to Color picks a color from the canvas - Default brush color is now black; the selected color carries over to new documents - Help (en/ja/zh), README, and DEVLOG updated Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
569 lines
11 KiB
CSS
569 lines
11 KiB
CSS
/* =============================================
|
|
Image Edit Tab
|
|
============================================= */
|
|
|
|
#wfm-tab-image-edit {
|
|
padding: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.ie-editor {
|
|
display: flex;
|
|
height: 100%;
|
|
overflow: hidden;
|
|
background: var(--wfm-bg);
|
|
}
|
|
|
|
/* =============================================
|
|
Left Toolbar
|
|
============================================= */
|
|
|
|
.ie-toolbar {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 4px;
|
|
padding: 8px 5px;
|
|
background: var(--wfm-surface);
|
|
border-right: 1px solid var(--wfm-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(--wfm-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(--wfm-surface-hover);
|
|
border-color: var(--wfm-border);
|
|
}
|
|
|
|
.ie-tool-btn.active {
|
|
background: var(--wfm-primary);
|
|
border-color: var(--wfm-primary);
|
|
color: #fff;
|
|
}
|
|
|
|
.ie-tool-placeholder {
|
|
opacity: 0.38;
|
|
}
|
|
|
|
.ie-tool-placeholder::after {
|
|
content: "";
|
|
position: absolute;
|
|
bottom: 3px;
|
|
right: 3px;
|
|
width: 5px;
|
|
height: 5px;
|
|
border-radius: 50%;
|
|
background: var(--wfm-text-secondary);
|
|
opacity: 0.5;
|
|
}
|
|
|
|
/* =============================================
|
|
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(--wfm-border);
|
|
background: var(--wfm-surface);
|
|
flex-shrink: 0;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
/* Tool options bar */
|
|
.ie-tool-options {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 14px;
|
|
padding: 5px 10px;
|
|
border-bottom: 1px solid var(--wfm-border);
|
|
background: var(--wfm-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(--wfm-text-secondary);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.ie-opt-select {
|
|
font-size: 12px;
|
|
padding: 2px 5px;
|
|
background: var(--wfm-surface);
|
|
color: var(--wfm-text);
|
|
border: 1px solid var(--wfm-border);
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.ie-opt-input {
|
|
font-size: 12px;
|
|
padding: 2px 5px;
|
|
background: var(--wfm-surface);
|
|
color: var(--wfm-text);
|
|
border: 1px solid var(--wfm-border);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.ie-opt-active {
|
|
background: var(--wfm-primary) !important;
|
|
color: #fff !important;
|
|
border-color: var(--wfm-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に変更 */
|
|
}
|
|
|
|
.ie-placeholder {
|
|
position: absolute;
|
|
inset: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: var(--wfm-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(--wfm-border);
|
|
background: var(--wfm-surface);
|
|
font-size: 12px;
|
|
flex-shrink: 0;
|
|
color: var(--wfm-text-secondary);
|
|
}
|
|
|
|
#ie-zoom-label {
|
|
min-width: 38px;
|
|
text-align: right;
|
|
color: var(--wfm-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(--wfm-border);
|
|
background: var(--wfm-surface);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.ie-props-header {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 5px 8px;
|
|
border-bottom: 1px solid var(--wfm-border);
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.4px;
|
|
color: var(--wfm-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(--wfm-text-secondary);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.ie-props-row input[type="range"] {
|
|
width: 100%;
|
|
}
|
|
|
|
.ie-props-row span {
|
|
font-size: 11px;
|
|
color: var(--wfm-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(--wfm-border);
|
|
background: var(--wfm-surface);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.ie-layers-header {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
padding: 5px 6px;
|
|
border-bottom: 1px solid var(--wfm-border);
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.4px;
|
|
color: var(--wfm-text-secondary);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.ie-layers-header-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 2px;
|
|
}
|
|
|
|
.ie-layers-header-row > span {
|
|
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(--wfm-surface-hover);
|
|
}
|
|
|
|
.ie-layer-item.active {
|
|
background: rgba(90, 110, 220, 0.22);
|
|
outline: 1px solid rgba(90, 110, 220, 0.4);
|
|
}
|
|
|
|
.ie-layer-thumb {
|
|
width: 30px;
|
|
height: 30px;
|
|
border: 1px solid var(--wfm-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(--wfm-text);
|
|
opacity: 0.85;
|
|
flex-shrink: 0;
|
|
transition: opacity 0.1s;
|
|
}
|
|
|
|
.ie-layer-vis-btn:hover {
|
|
opacity: 1;
|
|
}
|
|
|
|
.ie-opacity-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 6px 8px;
|
|
border-top: 1px solid var(--wfm-border);
|
|
font-size: 12px;
|
|
flex-shrink: 0;
|
|
color: var(--wfm-text-secondary);
|
|
}
|
|
|
|
.ie-opacity-row input[type="range"] {
|
|
flex: 1;
|
|
}
|
|
|
|
#ie-layer-opacity-label {
|
|
min-width: 32px;
|
|
text-align: right;
|
|
color: var(--wfm-text);
|
|
}
|
|
|
|
/* =============================================
|
|
Text Tool Overlay
|
|
============================================= */
|
|
|
|
.ie-text-overlay {
|
|
position: absolute;
|
|
z-index: 100;
|
|
background: var(--wfm-surface);
|
|
border: 1px solid var(--wfm-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(--wfm-bg);
|
|
color: var(--wfm-text);
|
|
border: 1px solid var(--wfm-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;
|
|
}
|
|
|
|
/* =============================================
|
|
Scrollbar
|
|
============================================= */
|
|
|
|
.ie-layer-list::-webkit-scrollbar {
|
|
width: 4px;
|
|
}
|
|
|
|
.ie-layer-list::-webkit-scrollbar-thumb {
|
|
background: var(--wfm-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(--wfm-text-secondary);
|
|
}
|
|
|
|
.ie-palette-well.is-active {
|
|
outline: 2px solid var(--wfm-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(--wfm-text-secondary);
|
|
opacity: 0.6;
|
|
}
|
|
|
|
.ie-palette-swatch:hover,
|
|
.ie-palette-swatch:focus-visible,
|
|
.ie-palette-well:focus-visible {
|
|
outline: 1px solid var(--wfm-text);
|
|
outline-offset: 1px;
|
|
opacity: 1;
|
|
}
|
|
|
|
.ie-palette-swatch.is-current {
|
|
outline: 2px solid var(--wfm-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(--wfm-border);
|
|
border-radius: 4px;
|
|
background: var(--wfm-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(--wfm-text);
|
|
font-size: 12px;
|
|
text-align: left;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.ie-palette-menu button:hover {
|
|
background: var(--wfm-surface-hover);
|
|
}
|