Osspial / derin

A Derive-Based GUI Library for Rust
Mozilla Public License 2.0
19 stars 2 forks source link

How should minimum size be handled on widgets with no actual minimum? #2

Open Osspial opened 7 years ago

Osspial commented 7 years ago

There are a few widgets that don't have a logical minimum size (sliders and progress bars are good examples), but it doesn't make sense to cap them at zero. How should a default minimum size for these be figured out?

scalarwaves commented 5 years ago

Half the window size is usually a good starting point, or 40%, something like that...

Osspial commented 5 years ago

The solution I've come up with is to let the rendering engine figure out the minimum size based on sprite size, and let the widget know about its conclusions. However, getting that working requires some fairly significant overhauls to the rendering API (which I needed to do anyway since the one that's currently on master isn't great), which I've been working through slowly but surely.