Skip to content

[LVGLv8] row and column spans wrong preview and style derivation for grid pos #1010

@Danixu

Description

@Danixu

Describe the bug

While using the editor in LVGL mode, the row and column spans are divided by two in preview mode while the compiled version is working as expected.

To Reproduce

Create an empty project with two widgets:

  • Container
    • Layout
      • Layout: GRID
      • Grid row descriptor: 16 FR(1) 16
      • Grid column descriptor: FR(1) FR(1) FR(1) FR(1)
  • Panel
    • Layout
      • Grid cell column pos: 0
      • Grid cell column span: 4
      • Grid cell X align: CENTER
      • Grid cell row pos: 1
      • Grid cell row span: 1
      • Grid cell Y align: CENTER

The Panel must be inserted inside the Container.

Expected behavior

a perfectly centered box.

Screenshots

The current version:

Image

The fixed version:

Image

LVGL version (if used)

  • 8.4.0

Additional context

Fixed on this PR:

#1009

but the change creates another bug when using styles. The derivated value is multiplied by 2. I was not able to find the way to fix it and looks like it happens in the column pos and row pos values too.

The style settings:

Image

The widget "default values" when the style is applied. This version includes the PR fix and then it happens in pos and span:

Image

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions