Skip to content

Commit

Permalink
gtkui: Hide info area text containing emoji properly. Closes: #1491
Browse files Browse the repository at this point in the history
Fading out text with emoji characters can lead to them still
being displayed above the text of a new track. Ignoring negative
alpha channels somehow avoids this.

Reproduced on Ubuntu 24.04. Arch Linux requires "noto-fonts-emoji".
  • Loading branch information
radioactiveman committed Oct 16, 2024
1 parent a491644 commit fffcb40
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gtkui/ui_infoarea.cc
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ G_GNUC_END_IGNORE_DEPRECATIONS
static void draw_text (GtkWidget * widget, cairo_t * cr, int x, int y, int
width, float r, float g, float b, float a, int font_size, const char * text)
{
if (a < 0)
return;

cairo_move_to (cr, x, y);
cairo_set_source_rgba (cr, r, g, b, a);

Expand Down

0 comments on commit fffcb40

Please sign in to comment.