a1ive/grub

Sometimes one menu entry icon is missing when theme used with no desktop-image defined

steve6375 opened this issue · 8 comments

There seems to be a bug in the theme code. Please see...
https://rmprepusb.blogspot.com/2020/05/new-large-font-theme-for-agfm-and.html
[seven14LargeFont_theme.zip]
Note the missing icon (second menu entry). The icon appears as soon as you move the cursor down/up.
(https://github.com/a1ive/grub/files/4621302/seven14LargeFont_theme.zip)
image

Repro the bug...
If you want to test the missing icon bug for yourself, just comment out the desktop-image entry in the fm.txt menu file as shown below and then navigate to a folder which has a lot of entries - often one of them will be missing!:


# Global Property
title-color: "#ffffff"
title-text: "Easy2Boot agFM"
message-color: "#FFFFFF"
message-bg-color: "#000000"
desktop-color: "#000000"
#desktop-image: "black.jpeg"
terminal-box: "term_bkg_*.png"
desktop-image-scale-method: "stretch"
a1ive commented

before:
深度截图_选择区域_20200513193141
after:
深度截图_选择区域_20200513193202
But I still can't figure out why this solves the problem. I don't think this NULL pointer check is needed.

top left corner of grey background is also missing. I noticed that too in my tests.

a1ive commented

have you tried the latest grub2 build?

Seems to have fixed it! I tried a few different themes. :-)

a1ive commented

Does the official gnu grub also have this bug?

I don't know. I tried Googling for any similar issue but couldn't find anything.

a1ive commented

Screenshot_20200921_185742
Screenshot_20200921_185855
Screenshot_20200921_190319

it still happens randomly!