Rofi dynamic theme/image preview + Rofi-Blocks = blurry images #2168
|
Hello. Initial, limited testing points to an issue in rofi-blocks, so I made a bug report on the rofi-blocks repo. Although I've been wrong many of times so i'm starting a conversation here with hopes someone more knowledgeable than me will have some ideas. The image preview is such a great feature and I'd love to take advantage of it. Since the rofi 1.7.5 release there is a new "dynamic" theme mode. It allows you to split the list view and show an image preview on one half. See documentation here. This feature is perfect for the rofi-blocks-jellyfin client I am working on. Unfortunately there seems to be a bug present when using rofi-blocks that's not present in rofi. BUG: When rofi-blocks first loads and when rendering a "new page", ie page up/down, the initially focused image is rendered correctly, but when cycling through lines individually the preview image is blurry until a new page is rendered. I'm using rofi wayland, but the bug is present when using the Here is a gist for the fullscreen-preview.rasi and two very basic debugging scripts. One for rofi-blocks and one for rofi-script mode. You just need to modify the
If anyone has thoughts on what could be causing the images to not render correctly I would love to hear them. Thanks for your time! Rof-Blocks video: rofi_blocks_image_debug.mp4Rofi-script video: rofi_script_mode_image_debug.mp4 |
Replies: 2 comments 3 replies
|
Rofi calls this function to get the preview icon: It looks like it fetches it once, but does not re-fetches it if its called with another size. So if the preview image loads first, you get the high-res image first (both in the small and big preview).. if the smaller image loads first, you also get this smaller one in the high-res image. This will need a small fix in rofi-blocks. |
Yeah, further I dug into rofi source i realized getting scale via ENV variables is likely way off base.
Heard. I'll link to this discussion at the rofi-blocks repo so the maintainer can see it, need be. For the time being I have a hackish workaround for personal use. Thanks again, |
Rofi calls this function to get the preview icon:
https://github.com/OmarCastro/rofi-blocks/blob/d75a9da1516daeef33a13714dfe19d2da9d6c819/src/blocks.c#L449
It looks like it fetches it once, but does not re-fetches it if its called with another size.
So if the preview image loads first, you get the high-res image first (both in the small and big preview).. if the smaller image loads first, you also get this smaller one in the high-res image.
This will need a small fix in rofi-blocks.