From 0ff73d1fd3c9a54b53317c18e32037240c42727a Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Tue, 16 Jan 2024 23:10:49 -0500 Subject: [PATCH] Make the snowflake icon position less maddening --- src/temp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/temp.c b/src/temp.c index 8414cdb..f40f178 100644 --- a/src/temp.c +++ b/src/temp.c @@ -59,12 +59,12 @@ static int draw_fg(hexagram_gauge *gauge, cairo_t *cr) { cairo_show_text(cr, temp->text.buf); if (temp->value <= COLD_THRESHOLD) { - int icon_y_offset = abs(ICON_HEIGHT - HEXAGRAM_TEXT_FONT_SIZE) * 2; + int icon_y_offset = extents.y_bearing / 2 - ICON_HEIGHT / 2; if (hexagram_icon_draw(&temp->icon, cr, text_x_offset + extents.width - ICON_WIDTH, - gauge->y - icon_y_offset, + gauge->y + icon_y_offset, COLD) < 0) { goto error_icon_draw; }