Page 1 of 1

[Rseding91] [0.17.43] Scroll-pane flow does not look at flow style setting

Posted: Thu May 30, 2019 11:44 am
by lovely_santa
Hi,

I got this simple mod to reproduce the bug.
  1. In the data stage I define a new scroll_pane_style:

    Code: Select all

    data.raw["gui-style"]["default"]["bugreport_customScrollPane"] = {
      type   = "scroll_pane_style",
      parent = "scroll_pane"      ,
    
      padding = 12,
    
      vertical_flow_style = {
        type = "vertical_flow_style",
        vertical_spacing = 24,
      },
    }
    As you can see, I define a vertical_flow_style in the scroll_pane to make sure the elements are spaced out more.
  2. In the control stage I create that UI and set the style for it:

    Code: Select all

          local scrollPaneElement = rootElement.add{
            type = "scroll-pane",
            style = "bugreport_customScrollPane",
            horizontal_scroll_policy = "never",
          }
  3. As you can see on the screenshot; this is definetly not a vertical_spacing of 12, but a spacing of 4. Note, I am on 200% UI scale. With the debug options you can clearly see that the scroll-pane style is set, but the flow is ignoring the style parameters that is set, and rather only take the default parameters.
    screenshot1.PNG
    screenshot1.PNG (2.1 MiB) Viewed 1922 times
    screenshot2.PNG
    screenshot2.PNG (2.11 MiB) Viewed 1922 times
The mod is in attachments, the mod will check on_tick and if not present create the UI for the player.

Kind regards
lovely_santa

Re: [Rseding91] [0.17.43] Scroll-pane flow does not look at flow style setting

Posted: Fri May 31, 2019 2:56 am
by Rseding91
Thanks for the report. It's now fixed for the next version of 0.17.