-
Notifications
You must be signed in to change notification settings - Fork 199
Description
Describe the bug
When playlist appearance override is set, the colours for fonts and rows are used, but on startup, the font used is the system font instead of the override font.
Tab strip is not affected, it uses its own override font correctly on startup.
To Reproduce
Steps to reproduce the behavior:
- Go to Edit -> Appearance -> Playlist
- Check "Override (loses GTK treeview theming, but speeds up rendering)"
- Change the fonts to something dramatic
- Close DeadBeeF
- Open DeadBeeF again
5a. Playlist font is system default font. - Go to Edit -> Appearance -> Playlist again
- Uncheck and check "Override (loses GTK treeview theming, but speeds up rendering)"
7a. Playlist now uses the override font.
Screenshots
On startup:

After toggling playlist appearance override:

Desktop (please complete the following information):
- OS: CachyOS rolling
- Deadbeef Version git latest
Additional context
If I change this line in draw_text_custom to call draw_init_font (ctx, type, 1); with 1 for reset, the override font will be correctly used on startup.
I then added some debug fprintfs, and I found that while the call to gtkui_init_theme_colors is correctly loading the override font before any calls to draw_init_font are made, and draw_init_font is correctly setting the font description, by the time playlistrender calls draw_text_custom, something along the way has actually set the font description on the listctx object back to the default system font!
Here are some of my logs (without changing reset to 1 as described above):
Called draw_init_font on ctx 0x563fb628dec8 with type 0 reset 1 ctx->pango_ready 0
font_desc is Segoe UI
pangolayout font is Segoe UI
...
Undimmed calling draw_text_custom with DDB_LIST_FONT on context 0x563fb628dec8
draw_text_custom on ctx 0x563fb628dec8 font is Noto Sans
Called draw_init_font on ctx 0x563fb628dec8 with type 0 reset 0 ctx->pango_ready 1
font_desc is Noto Sans
pangolayout font is Noto Sans
There are no other calls to draw_init_font on ctx 0x563fb628dec8 between the two events logged above!