diff options
-rw-r--r-- | main.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -164,6 +164,7 @@ typedef struct { struct { int left, right, top, bottom; int text_x, text_y; + int pfp; } margin; ColorOpt color[CPAIR_MAX]; } Options; @@ -185,6 +186,7 @@ Options opt = { .bottom = GFX_MARGIN_Y, .text_x = GFX_TEXT_MARGIN_X, .text_y = GFX_TEXT_MARGIN_Y, + .pfp = GFX_PFP_MARGIN, }, .color = { CPAIR_LIST(CPAIR_OPT_X) @@ -507,7 +509,7 @@ typedef struct { int post_left_margin(Post *post) { int lm = opt.margin.left; - if (opt.post.pfp) lm += post->user->pfp.cols + GFX_PFP_MARGIN; + if (opt.post.pfp) lm += post->user->pfp.cols + opt.margin.pfp; return lm; } @@ -652,7 +654,7 @@ void gfx_draw_post(GfxPost *post, int y, int x, int width, Arena *scratch) { if (height > h) pfpy += (height - h) >> 1; gfx_draw_pic(pfp, pfpy, - left - GFX_PFP_MARGIN, + left - opt.margin.pfp, GFX_PFP_MAX_LINES, GFX_PFP_MAX_COLS, PIC_LEFT); @@ -977,6 +979,7 @@ int sect_margin(Str k, Str v, Arena *perm) { PROP_INT("bottom", &opt.margin.bottom); PROP_INT("text.x", &opt.margin.text_x); PROP_INT("text.y", &opt.margin.text_y); + PROP_INT("pfp", &opt.margin.pfp); return -1; } |