Roller selected option of by a pixel during drag

What do you want to achieve?

display of option texts without pixel offset in selected line

during wheel drag the pixel offset is always at same screen line and seems to be related to borders of selected option.

text is centered in my application, pixel offset cannot be observed when left aligned.

What have you tried so far?

same style setting for main and selected

Screenshot or video

Screenshot 2024-10-02 165942

Others

  • SquareLine Studio version:
    1.4.2
  • Operating system:
    Win11
  • Target hardware:
    custom, but offset also visible in squareline play mode

The problem most probably in your case is that you have different text alignment setting for ‘Text’ in the STYLE(MAIN) and the STYLE(SELECTED) sections in the inpector panel.

Thanks a lot for your hint Hermit. Unfortunately this did not help.

I checked settings again and explicitly set main and selected text styles to same settings, but I still see this one pixel offset while scrolling the roller. I also applied same settings to pressed and scrolled state of the roller, but no sucess.

It might be related to exporting or LVGL font-handling then, there’s still some difference between the style of the roller’s selection/middle-text and the others somewhere. To reproduce the problem and investigate further, we should see the exact source font that you processed for ‘Montserrat Medium 24’. Thanks in advance for sharing a link to it, and telling the LVGL version you use.

Thanks again Hermit, looks like we are on the right track. Must be something related to fonts.

Drawing of options got much better when using default montserrat 24. Still shoes a small nodge on selected boundary (picture), but I can probably live with that, but it does not provide extended character set.

Another picture shows my font generation setting. Using lvgl supplied montserrat ttf. Squareline play mode does show this effect. Squareline project setting for lvgl is 8.3.11.

Screenshot 2024-10-07 100249

Just some more info:

seems to work with this tiny nodge in SLS play mode when using montserrat ttf downloaded from a big search engine provider. ttf source file seems to make a difference in SLS though.

But… pixel offset is still present when exported, recompiled and downloaded to target hardware.

Any ideas how to solve this issue on target hardware?

I’ve seen some fixes in LVGL-9.2 changelog IIRC for the alignment issue of the selected/middle row. (It might be vertical alignment fix though, not horizontal.)