From 065fdace736979507dd525695b8c04fe8cc36419 Mon Sep 17 00:00:00 2001 From: c5took Date: Wed, 31 Dec 2025 04:49:27 -0300 Subject: [PATCH 1/2] render: fix text alignment issues Regresses a few changes from #266, which centered the text vertically when the icon-location was set to top or bottom, whic is redundant to text-alignment. Closes #620. --- render.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/render.c b/render.c index 8fed6d8..aa4998e 100644 --- a/render.c +++ b/render.c @@ -309,9 +309,7 @@ static int render_notification(cairo_t *cairo, struct mako_state *state, struct cairo_restore(cairo); } - if (icon_vertical) { - text_x = (notif_width - text_width - border_size) / 2; - } else { + if (!icon_vertical) { text_y = (notif_height - text_height - border_size) / 2; } From b5e7077b6eac47ab21cec326f01bd6c4cf1d81c1 Mon Sep 17 00:00:00 2001 From: c5took Date: Wed, 31 Dec 2025 05:25:36 -0300 Subject: [PATCH 2/2] oops --- render.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/render.c b/render.c index aa4998e..1768ed0 100644 --- a/render.c +++ b/render.c @@ -190,7 +190,7 @@ static int render_notification(cairo_t *cairo, struct mako_state *state, struct pango_layout_get_pixel_size(layout, &buffer_text_width, &buffer_text_height); } int text_height = buffer_text_height / scale; - int text_width = buffer_text_width / scale; + // int text_width = buffer_text_width / scale; if (text_height > text_layout_height) { text_height = text_layout_height;