Browse Source

fix: rectangular plot frame + consistent line widths

- Plot container: straight corners (border-radius:0), 2px solid #B0BEC5 border
- Removed duplicate .plot-container CSS definition
- Grid/axis line widths rounded to integers (Math.round) to prevent
  anti-aliasing differences between H and V lines

Co-Authored-By: Claude <noreply@anthropic.com>
nonvioce 3 months ago
parent
commit
0637463e6a
2 changed files with 7 additions and 15 deletions
  1. 5 13
      app/src/main/assets/console.css
  2. 2 2
      app/src/main/assets/console.js

+ 5 - 13
app/src/main/assets/console.css

@@ -1293,14 +1293,6 @@ body {
     text-align: center;
 }
 
-.plot-container {
-    padding: 20px;
-    background: #E3F2FD;
-    display: flex;
-    justify-content: center;
-    align-items: center;
-}
-
 #plotCanvas {
     max-width: 100%;
     height: auto;
@@ -1425,11 +1417,11 @@ body {
 /* ── 绘图 ─────────────────────────────────────────── */
 .plot-container {
     margin: 12px 0;
-    padding: 8px;
-    background: #FFFFFF;
-    border: 1px solid var(--terminal-border);
-    border-radius: 8px;
-    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
+    padding: 16px;
+    background: #FCFDFE;
+    border: 2px solid #B0BEC5;
+    border-radius: 0;
+    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.03);
     overflow: hidden;
 }
 .plot-canvas {

+ 2 - 2
app/src/main/assets/console.js

@@ -2233,7 +2233,7 @@ class PlotRenderer {
         const xRange = b.xMax - b.xMin, yRange = b.yMax - b.yMin;
 
         ctx.strokeStyle = '#E8EDF2';
-        ctx.lineWidth = 0.6 * this.dpr;
+        ctx.lineWidth = Math.round(1 * this.dpr);
         ctx.fillStyle = '#8B95A5';
         ctx.font = '11px -apple-system, sans-serif';
         ctx.textAlign = 'center';
@@ -2276,7 +2276,7 @@ class PlotRenderer {
         const origin = this.toCanvas(0, 0);
 
         ctx.strokeStyle = '#1976D2';
-        ctx.lineWidth = 2 * this.dpr;
+        ctx.lineWidth = Math.round(2 * this.dpr);
         ctx.fillStyle = '#1976D2';
         ctx.font = 'bold 11px -apple-system, sans-serif';