add paint tools for html

This commit is contained in:
Shuanglei Tao
2025-05-19 22:16:27 +08:00
parent 37c2fc8504
commit 3d53e3d810
4 changed files with 571 additions and 4 deletions

View File

@@ -348,11 +348,86 @@ label {
border-bottom: 1px dotted #AAA;
}
canvas.text-placement-mode {
border: 2px dashed var(--primary-color) !important;
cursor: text !important; /* Force text cursor */
}
.canvas-tooltip {
display: none;
text-align: center;
color: var(--primary-color);
}
.canvas-tools {
margin-top: 10px;
justify-content: center;
}
.text-tools {
display: none;
}
.tool-button {
width: 36px;
height: 36px;
font-size: 1.2rem;
display: inline-flex;
align-items: center;
justify-content: center;
margin-right: 5px;
background-color: #f8f9fa;
border: 1px solid #dee2e6;
border-radius: 4px;
padding: 0;
cursor: pointer;
transition: all 0.2s ease;
}
.tool-button:hover {
background-color: #e9ecef;
border-color: #ced4da;
}
.tool-button.active {
background-color: var(--primary-color);
color: white;
border-color: var(--primary-color);
}
body.debug-mode .tool-button {
background-color: var(--dark-input-bg);
border-color: var(--dark-border);
color: var(--dark-text);
}
body.debug-mode .tool-button:hover {
background-color: #3a3a3a;
border-color: #444;
}
body.debug-mode .tool-button.active {
background-color: var(--primary-color);
color: white;
border-color: var(--primary-hover);
}
@media (max-width: 768px) {
.flex-container {
flex-direction: column;
}
.canvas-tools.flex-container {
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
}
.canvas-tools .flex-group {
justify-content: center;
width: 100%;
}
.left-controls,
.right-controls {
margin-left: 0;