From cd26adb7ee1284e1f3e1c73f93c742c181cc41e9 Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Mon, 7 Apr 2025 02:04:50 -0500 Subject: [PATCH] scripts: codemapd3.py: Reduced separator from 2 -> 1 pixel And made it slightly darker to match arrows in light mode. Just trying to make the separator look a bit nicer, but it's tricky since this is the only non-tile non-text element. --- scripts/codemapd3.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/scripts/codemapd3.py b/scripts/codemapd3.py index 531176bb..d0edc845 100755 --- a/scripts/codemapd3.py +++ b/scripts/codemapd3.py @@ -1089,7 +1089,7 @@ def main(paths, output, *, # partition ctx if not no_ctx: ctx = ctxs[k] - ctx.x = code.x + code.width + 2 + ctx.x = code.x + code.width + 1 ctx.y = y__ ctx.width = width__ - ctx.x ctx.height = ctx_split @@ -1100,8 +1100,8 @@ def main(paths, output, *, # partition stack if not no_frames: stack = stacks[k] - stack.x = code.x + code.width + 2 - stack.y = ctx.y + ctx.height + 2 if ctx_split > 0 else y__ + stack.x = code.x + code.width + 1 + stack.y = ctx.y + ctx.height + 1 if ctx_split > 0 else y__ stack.width = width__ - stack.x stack.height = height___ - (stack.y - y__) partition(stack, dice=True) @@ -1279,22 +1279,23 @@ def main(paths, output, *, else "hidden") if not no_javascript else '')) - # add a line between code/stack + # add a separator between code/stack f.write('' % dict( + 'fill="%(color)s">' % dict( x=code.x + code.width, y=code.y, - width=2, + width=1, height=max( stacks[k].y + stacks[k].height if not no_frames else 0, ctxs[k].y + ctxs[k].height if not no_ctx else 0) - - code.y - padding)) + - code.y - padding, + color='#7f7f7f' if dark else '#555555')) f.write('') # create ctx tiles @@ -1378,18 +1379,19 @@ def main(paths, output, *, f.write('') f.write('') - # add a line between ctx/stack + # add a separator between ctx/stack if not no_ctx and not no_frames: f.write('' % dict( + 'fill="%(color)s">' % dict( x=ctxs[k].x, y=ctxs[k].y + ctxs[k].height, width=ctxs[k].width - padding, - height=2)) + height=1, + color='#7f7f7f' if dark else '#555555')) f.write('') # create stack tiles