Skip to content

Commit bd63954

Browse files
gtkui: Hide info area text containing emoji properly. Closes: #1491
Fading out text with emoji characters can lead to them still being displayed above the text of a new track. Ignoring zero alpha channels avoids this. Reproduced on Ubuntu 24.04. Arch Linux requires "noto-fonts-emoji".
1 parent 098b77a commit bd63954

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/gtkui/ui_infoarea.cc

+6
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,12 @@ G_GNUC_END_IGNORE_DEPRECATIONS
143143
static void draw_text (GtkWidget * widget, cairo_t * cr, int x, int y, int
144144
width, float r, float g, float b, float a, int font_size, const char * text)
145145
{
146+
/* The visibility of Unicode characters like emoji is not affected by the
147+
* alpha channel. Make sure to hide them when fading-out track information.
148+
* See also: #1492 */
149+
if (a <= 0)
150+
return;
151+
146152
cairo_move_to (cr, x, y);
147153
cairo_set_source_rgba (cr, r, g, b, a);
148154

0 commit comments

Comments
 (0)