Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop scrollview from consuming the interface #715

Closed
rnd-ash opened this issue Jan 26, 2021 · 4 comments
Closed

Stop scrollview from consuming the interface #715

rnd-ash opened this issue Jan 26, 2021 · 4 comments
Labels
bug Something isn't working layout question Further information is requested
Milestone

Comments

@rnd-ash
Copy link

rnd-ash commented Jan 26, 2021

My application has a main UI page which is broken down into 2 parts:

  1. main interface which can change
  2. Bottom status bar which is permanently on screen

With the UI with explain enabled, you can see this:
image

Under log view in this image is a scrollview. Below that is a space followed by the status bar. It is drawn like so:

let mut c: Element<_> = Column::new()
                .push(view_contents) // Draw the custom view on screen
                .push(Space::with_height(Length::Fill)) // Pad the gap
                .push(Rule::horizontal(1)) // Draw a line
                .push(s_bar) // Draw the status bar
                .into();
if themes::is_debug() {
    c = c.explain(iced::Color::BLACK);
}
container(c)
    .height(Length::Fill)
    .width(Length::Fill)
    .into()

however, when I keep adding elements to the scrollview, this eventually happens:
image

Here, the scrollview has completely consumed the interface.

How would it be possible to stop this behavior?. I don't want to use the max_height function on the scrollview as i still want the entire UI to be adaptive according to the window size rather than creating a hard limit.

@hecrj hecrj added the question Further information is requested label Jan 26, 2021
@hecrj hecrj added this to the 0.3.0 milestone Jan 26, 2021
@hecrj hecrj modified the milestones: 0.3.0, 0.4.0 Mar 31, 2021
@NathanSWard
Copy link

+1 for this

@hecrj hecrj added bug Something isn't working layout labels Jan 20, 2022
@hecrj
Copy link
Member

hecrj commented Jan 20, 2022

This is caused by a limitation / bug of the current layout engine and widget implementation.

In order to fix this, you have to explicitly state height(Length::Fill) for all of the parent containers of the Scrollable.

In any case, we should really tackle this limitation soon. I will work on it right away!

@hecrj hecrj modified the milestones: 0.4.0, 0.5.0 Apr 12, 2022
@hecrj hecrj modified the milestones: 0.5.0, 0.6.0 Nov 9, 2022
@hecrj hecrj modified the milestones: 0.6.0, 0.7.0 Dec 7, 2022
@hecrj hecrj modified the milestones: 0.7.0, 0.8.0 Jan 14, 2023
@hecrj hecrj modified the milestones: 0.8.0, 0.9.0 Feb 18, 2023
@hecrj hecrj modified the milestones: 0.9.0, 0.10.0 Apr 13, 2023
@hecrj hecrj modified the milestones: 0.10.0, 0.11.0 Jul 28, 2023
@hecrj
Copy link
Member

hecrj commented Feb 11, 2024

Fixed by #2192.

@hecrj hecrj closed this as completed Feb 11, 2024
quintenpalmer added a commit to quintenpalmer/protomusiq that referenced this issue Feb 15, 2024
This fixes an issue where Fill-width elements in the column would
disappear, maybe because of these issues:

iced-rs/iced#715
iced-rs/iced#2186
iced-rs/iced#2192
@lobneroO
Copy link

lobneroO commented Jul 4, 2024

I think this is still happening with version 0.12. I have a scrollable which can become quite lengthy and two buttons beneath it. If the scrollable takes up more space than the window offers, it pushes the button out of the window.

My proejct
You will have to choose the attached input file, then click "Create Personal Running Order".

Input file:
data_summerbreeze2022.csv

This is the default for me when it opens:
image

Then, enlarging the window to make everything fit:
image

If there is barely space for the buttons, they are rendered very small (without text, I think)
image

The view is created in src/gui/band_selection_view.rs and src/band.rs (and excuse the hardcoded parts, this is still very much a work in progress).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working layout question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants