Code Monkey home page Code Monkey logo

Comments (7)

Zoxc avatar Zoxc commented on May 27, 2024

You probably implicitly changed from virtual_stack to virtual_list?

from floem.

pieterdd avatar pieterdd commented on May 27, 2024

I will have a proper look tonight after work, but this example seems to be using the same VirtualDirection and VirtualItemList I am:

VirtualDirection::Vertical,

I might be missing something so I'll do an in-depth comparison.

from floem.

pieterdd avatar pieterdd commented on May 27, 2024

Did the semantics of the item_size parameter change by any chance? I might have unknowingly been relying on a bug to lay out my radio buttons horizontally. Previously, even with item_size VirtualListItemSize::Fixed(Box::new(|| 1.0)) and a very long radio group button label, there was no overlap:

image

The reason I started using virtual_list for this was to lay out a dynamic number of items horizontally. My use case is a generic radio group widget that takes an enum and renders all its options by relying on the Display trait.

from floem.

pieterdd avatar pieterdd commented on May 27, 2024

Ah indeed, I need to use virtual_stack from now on:

image

from floem.

Zoxc avatar Zoxc commented on May 27, 2024

It's probably a layout issue with horizontal virtual_lists.

You do have to correctly specify item sizes however, so you probably want to use h_stack_from_iter if you can't do that.

from floem.

pieterdd avatar pieterdd commented on May 27, 2024

Having replaced virtual_list with virtual_stack, I'm still seeing a subtle difference. It looks like the .gap(0.0, 20.0)) in the parent v_stack collapses in the new version:

Old Floem version with virtual_list:
image

New Floem version with virtual_stack:
image

Diff available here.

from floem.

pieterdd avatar pieterdd commented on May 27, 2024

@Zoxc Our comments crossed, I'll give that a try - thanks!

from floem.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.