Files
PaintPlus/frontend/src/components/EyeCatalog.css
T
Claude 2813d930b0 Fix UX issues and add Eye Catalog UI
Fixes:
- Remove scale limit to allow image to fill canvas
- Fix Lasso tool by using Polygon instead of Polyline
- Remove duplicate Clear Selection button
- Fix Undo/Redo dependencies with useCallback

New Features:
- Eye Catalog UI for browsing and applying saved eyes
- Upload new eyes to catalog
- Apply eyes to selected areas with feathering
- Delete eyes from catalog
2026-01-25 05:17:10 +00:00

210 lines
3.3 KiB
CSS

.eye-catalog {
background-color: #2a2a2a;
border-radius: 8px;
border: 1px solid #444;
padding: 16px;
}
.catalog-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
}
.catalog-header h3 {
margin: 0;
font-size: 14px;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.upload-toggle-btn {
background-color: #00aa00;
color: white;
padding: 6px 12px;
font-size: 12px;
font-weight: 600;
}
.upload-toggle-btn:hover {
background-color: #00cc00;
}
.catalog-error {
background-color: #ff4444;
color: white;
padding: 8px 12px;
border-radius: 4px;
margin-bottom: 12px;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 12px;
}
.catalog-error button {
background: none;
color: white;
padding: 0;
font-size: 16px;
}
.upload-form {
display: flex;
flex-direction: column;
gap: 8px;
margin-bottom: 16px;
padding: 12px;
background-color: #333;
border-radius: 4px;
}
.upload-form input[type="text"],
.upload-form input[type="file"] {
padding: 8px;
border: 1px solid #555;
border-radius: 4px;
background-color: #2a2a2a;
color: white;
font-size: 13px;
}
.upload-btn {
background-color: #0066ff;
color: white;
padding: 10px;
font-weight: 600;
}
.upload-btn:hover:not(:disabled) {
background-color: #0055dd;
}
.patches-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
gap: 8px;
max-height: 200px;
overflow-y: auto;
padding: 4px;
}
.no-patches {
grid-column: 1 / -1;
text-align: center;
color: #888;
font-size: 13px;
padding: 20px;
}
.patch-item {
position: relative;
background-color: #333;
border: 2px solid transparent;
border-radius: 6px;
overflow: hidden;
cursor: pointer;
transition: all 0.2s;
}
.patch-item:hover {
border-color: #666;
}
.patch-item.selected {
border-color: #00ff00;
box-shadow: 0 0 8px rgba(0, 255, 0, 0.3);
}
.patch-item img {
width: 100%;
aspect-ratio: 1;
object-fit: cover;
display: block;
}
.patch-info {
padding: 4px 6px;
background-color: rgba(0, 0, 0, 0.7);
position: absolute;
bottom: 0;
left: 0;
right: 0;
}
.patch-name {
font-size: 10px;
font-weight: 600;
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.patch-tags {
font-size: 9px;
color: #888;
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.delete-patch-btn {
position: absolute;
top: 2px;
right: 2px;
width: 18px;
height: 18px;
padding: 0;
background-color: rgba(255, 0, 0, 0.8);
color: white;
font-size: 14px;
line-height: 1;
border-radius: 50%;
opacity: 0;
transition: opacity 0.2s;
}
.patch-item:hover .delete-patch-btn {
opacity: 1;
}
.apply-section {
margin-top: 16px;
padding-top: 16px;
border-top: 1px solid #444;
}
.selected-preview {
font-size: 13px;
margin-bottom: 10px;
color: #00ff00;
}
.apply-btn {
width: 100%;
background-color: #0066ff;
color: white;
padding: 12px;
font-size: 14px;
font-weight: 600;
}
.apply-btn:hover:not(:disabled) {
background-color: #0055dd;
}
.apply-btn:disabled {
background-color: #333;
color: #666;
}
.apply-hint {
font-size: 11px;
color: #888;
margin-top: 8px;
text-align: center;
}