2 Commits

Author SHA1 Message Date
b7adad41f7 Merge branch 'thinner-sync-borders-b' 2026-06-20 14:47:12 +02:00
95eb5ac9bd thinner borders 2026-06-20 14:42:14 +02:00

View File

@@ -40,6 +40,8 @@ public final class Compositor {
private static final Color TAB_TEXT = Color.rgb(225, 229, 235);
private static final Color PANE_SYNC_SELECT_BORDER = Color.rgb(255, 183, 77);
private static final Color PANE_SYNC_COMMITTED_BORDER = Color.rgb(105, 214, 128);
// Keep this narrower than the terminal renderer's active border so focus remains visible.
private static final double PANE_SYNC_BORDER_WIDTH = 1.0;
// Thin tab strip shown at the top when more than one tab is open.
private static final double TAB_BAR_HEIGHT = 22.0;
@@ -530,22 +532,17 @@ public final class Compositor {
gc.save();
try {
// Draw a thin sync border inset just inside the pane's own edge border, so the
// renderer's active (blue) / inactive border stays visible and you can still tell
// which synced pane is focused.
double lineWidth = 2.0;
double inset = 2.0 + lineWidth / 2.0; // clear the renderer's 2px active border
gc.setLineWidth(lineWidth);
gc.setLineWidth(PANE_SYNC_BORDER_WIDTH);
gc.setStroke(paneSyncSelectMode ? PANE_SYNC_SELECT_BORDER : PANE_SYNC_COMMITTED_BORDER);
for (TerminalPane pane : panes) {
if (!highlighted.contains(pane)) {
continue;
}
gc.save();
double x = Math.round(pane.x()) + inset;
double y = Math.round(pane.y()) + inset;
double width = Math.max(0.0, pane.width() - 2.0 * inset);
double height = Math.max(0.0, pane.height() - 2.0 * inset);
double x = Math.round(pane.x()) + 2.0;
double y = Math.round(pane.y()) + 2.0;
double width = Math.max(0.0, pane.width() - 4.0);
double height = Math.max(0.0, pane.height() - 4.0);
TerminalRenderer.clip(gc, Math.round(pane.x()), Math.round(pane.y()), pane.width(), pane.height(), pane.clip());
gc.strokeRect(x, y, width, height);
gc.restore();