mirror of
https://github.com/Azornes/Comfyui-LayerForge.git
synced 2026-03-21 20:52:12 -03:00
I updated src/css/custom_shape_menu.css with new styles for a modern look and feel, and I refactored src/CustomShapeMenu.ts to use a new HTML structure for the checkboxes that works with the updated CSS. The menu should now be fully functional with the new design.
169 lines
3.8 KiB
CSS
169 lines
3.8 KiB
CSS
#layerforge-custom-shape-menu {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
background-color: #2f2f2f;
|
|
color: #e0e0e0;
|
|
padding: 12px;
|
|
border-radius: 8px;
|
|
box-shadow: 0 5px 15px rgba(0,0,0,0.3);
|
|
display: none;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
font-size: 13px;
|
|
z-index: 1001;
|
|
border: 1px solid #202020;
|
|
user-select: none;
|
|
min-width: 220px;
|
|
}
|
|
|
|
#layerforge-custom-shape-menu .menu-line {
|
|
font-weight: 600;
|
|
color: #4a90e2;
|
|
padding-bottom: 5px;
|
|
border-bottom: 1px solid #444;
|
|
margin-bottom: 5px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
#layerforge-custom-shape-menu .feature-container {
|
|
background-color: #3a3a3a;
|
|
border-radius: 6px;
|
|
padding: 10px;
|
|
border: 1px solid #4a4a4a;
|
|
}
|
|
|
|
#layerforge-custom-shape-menu .slider-container {
|
|
margin-top: 10px;
|
|
display: none;
|
|
}
|
|
|
|
#layerforge-custom-shape-menu .slider-label {
|
|
font-size: 12px;
|
|
margin-bottom: 6px;
|
|
color: #e0e0e0;
|
|
}
|
|
|
|
#layerforge-custom-shape-menu input[type="range"] {
|
|
-webkit-appearance: none;
|
|
width: 100%;
|
|
height: 4px;
|
|
background: #555;
|
|
border-radius: 2px;
|
|
outline: none;
|
|
padding: 0;
|
|
margin: 0;
|
|
}
|
|
#layerforge-custom-shape-menu input[type="range"]::-webkit-slider-thumb {
|
|
-webkit-appearance: none;
|
|
appearance: none;
|
|
width: 14px;
|
|
height: 14px;
|
|
background: #e0e0e0;
|
|
border-radius: 50%;
|
|
cursor: pointer;
|
|
border: 2px solid #555;
|
|
transition: background 0.2s;
|
|
}
|
|
#layerforge-custom-shape-menu input[type="range"]::-webkit-slider-thumb:hover {
|
|
background: #fff;
|
|
}
|
|
#layerforge-custom-shape-menu input[type="range"]::-moz-range-thumb {
|
|
width: 14px;
|
|
height: 14px;
|
|
background: #e0e0e0;
|
|
border-radius: 50%;
|
|
cursor: pointer;
|
|
border: 2px solid #555;
|
|
}
|
|
|
|
#layerforge-custom-shape-menu .slider-value-display {
|
|
font-size: 11px;
|
|
text-align: center;
|
|
margin-top: 4px;
|
|
color: #bbb;
|
|
min-height: 14px;
|
|
}
|
|
|
|
#layerforge-custom-shape-menu .extension-slider-container {
|
|
margin: 10px 0;
|
|
}
|
|
|
|
#layerforge-custom-shape-menu .checkbox-container {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 6px;
|
|
border-radius: 5px;
|
|
cursor: pointer;
|
|
transition: background-color 0.2s;
|
|
position: relative;
|
|
}
|
|
|
|
#layerforge-custom-shape-menu .checkbox-container:hover {
|
|
background-color: #4a4a4a;
|
|
}
|
|
|
|
#layerforge-custom-shape-menu .checkbox-container input[type="checkbox"] {
|
|
position: absolute;
|
|
opacity: 0;
|
|
cursor: pointer;
|
|
height: 0;
|
|
width: 0;
|
|
}
|
|
|
|
#layerforge-custom-shape-menu .checkbox-container .custom-checkbox {
|
|
height: 16px;
|
|
width: 16px;
|
|
background-color: #2a2a2a;
|
|
border: 1px solid #666;
|
|
border-radius: 3px;
|
|
transition: all 0.2s;
|
|
position: relative;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
#layerforge-custom-shape-menu .checkbox-container input:checked ~ .custom-checkbox {
|
|
background-color: #3a76d6;
|
|
border-color: #3a76d6;
|
|
}
|
|
|
|
#layerforge-custom-shape-menu .checkbox-container .custom-checkbox::after {
|
|
content: "";
|
|
position: absolute;
|
|
display: none;
|
|
left: 5px;
|
|
top: 1px;
|
|
width: 4px;
|
|
height: 9px;
|
|
border: solid white;
|
|
border-width: 0 2px 2px 0;
|
|
transform: rotate(45deg);
|
|
}
|
|
|
|
#layerforge-custom-shape-menu .checkbox-container input:checked ~ .custom-checkbox::after {
|
|
display: block;
|
|
}
|
|
|
|
.layerforge-tooltip {
|
|
position: fixed;
|
|
background-color: #2f2f2f;
|
|
color: #e0e0e0;
|
|
padding: 8px 12px;
|
|
border-radius: 6px;
|
|
font-size: 12px;
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
line-height: 1.4;
|
|
max-width: 250px;
|
|
word-wrap: break-word;
|
|
box-shadow: 0 4px 12px rgba(0,0,0,0.4);
|
|
border: 1px solid #202020;
|
|
z-index: 10000;
|
|
pointer-events: none;
|
|
opacity: 0;
|
|
transition: opacity 0.2s ease-in-out;
|
|
}
|