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
Redraw passed bounds
bigger than its client area
#2308
Comments
Yes, that was done to ensure that a view on shrink clear all the previous bounds and not let some chunk around it. You mustn't rely on it but only on |
Cool, is this a recent change in behavior then? Or was it always like that for a long time? |
Was changed by me on 6 Dec 2021 with the commit 6d108fd. |
Use only the |
No worries, I think its just a nuance of the way I am doing resizing as part of layout. I will close this as its been this way for over a year and hasn't caused any problems in other use cases. I can work around it I think. |
@tznind I undo-ed that change and all the test are passed. I think I did this change to try fix an issue on clearing a label on shrink the width, but after the fix was introduced in this line: Terminal.Gui/Terminal.Gui/Core/View.cs Line 1521 in 3d75be4
Furthermore, the derived views that override the Redraw method must handle with the correct redraw of his view. In my opinion this change must be reverted and if you want you can reopen this issue. |
I just realized that setting the |
Ok reopening, sounds like theres things that could be addressed :) . |
Fixes #2308. Redraw passed bounds bigger than its client area.
Describe the bug
I've encountered this bug in developing #2258
After resizing a
View
inLayoutSubviews
to be smaller then the subsequent redraw that is triggered is passing a largerRect
intoRedraw
than the bounds.I think this issue is to do with
view.NeedDisplay.Width
being stale and the parentView
passing the larger width/height of the two:Terminal.Gui/Terminal.Gui/Core/View.cs
Lines 1543 to 1544 in 3d75be4
Surely a
View
should never be asked to redraw a bigger area than it currently occupies?Or is this to do with menus/spill overs etc where a view deliberately paints outside the box? If so then I think quite a few of my views will need to be adjusted to only listen to
Bounds
and not the passed parameterbounds
.The text was updated successfully, but these errors were encountered: