-
Notifications
You must be signed in to change notification settings - Fork 113
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
NumberInput surprising/wrong behaviour with width & content_width #286
Comments
It's really hard to determine the correct path here, especially since iced keeps changing how Fill and Shrink work. I believe he is finally leaving those alone, but before his last change this use to work fine. |
if the handling of Length is unstable (or more specifically in this case, the interaction between different Length kinds) then thats not ideal. but the question as to why both if there is a reason that i cant think of rn, then that might help determine the path forward |
I don't mind removing it, as generally the content should resize with the leftover space anyway. We just need to remember to add the button sizes in before we pass the leftover to the inner Textbox. This way it will resize correctly. I think the original usage of this was before a lot of major changes in iced occurred, and it was required at the time to function correctly. |
It may be related to #278. Of what I understood of the widget implementation, the |
yeah the main issue is the Buttons. We would need to Adjust the height or Layout of them based on where they need to be. |
If I have the time, I'll try to investigate it and see if we can get rid of it |
@StillGreen-san Could you give the main branch on our git a try as @Ultraxime pushed some new changes which might fix the issue. |
the
number_input
widget has two functions for setting the width (width
&content_width
). and as far as i call tell its also the only widget that hascontent_width
setting none or both (of
width
&content_width
) toFill
works as expected, but using only one of them can result in (imo) surprising/wrong behaviouras an example having two elements in a
row
, anumber_input
and abutton
(that is set toFill
):left: default width; right: setting only
width
toFill
; they work as exepctedbut if they each are in a
column
(together in arow
)then the
number_input
will only render as if not set toFill
, but with the column asFill
and setting only
content_width
toFill
will take up all space (in both row and rowcol layouts)im also wondering why there are both
width
andcontent_width
functions, other settings likepadding
only have one and set the property on both thenumber_input
and thetext_input
content.The text was updated successfully, but these errors were encountered: