Make the snowflake icon position less maddening
This commit is contained in:
parent
c81e9abde9
commit
0ff73d1fd3
1 changed files with 2 additions and 2 deletions
|
@ -59,12 +59,12 @@ static int draw_fg(hexagram_gauge *gauge, cairo_t *cr) {
|
||||||
cairo_show_text(cr, temp->text.buf);
|
cairo_show_text(cr, temp->text.buf);
|
||||||
|
|
||||||
if (temp->value <= COLD_THRESHOLD) {
|
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,
|
if (hexagram_icon_draw(&temp->icon,
|
||||||
cr,
|
cr,
|
||||||
text_x_offset + extents.width - ICON_WIDTH,
|
text_x_offset + extents.width - ICON_WIDTH,
|
||||||
gauge->y - icon_y_offset,
|
gauge->y + icon_y_offset,
|
||||||
COLD) < 0) {
|
COLD) < 0) {
|
||||||
goto error_icon_draw;
|
goto error_icon_draw;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue