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
Auto-sizing windows that start collapsed will not show window title #176
Comments
(I can provide an example if unclear.) |
Repro.
Unfortunately once the size data is saved into the ini file when restored it starts with the previous width and auto-fit doesn't run when a window is collapsed (which is the reason for this issue). And generally auto-fit does NOT take the title into account. I'm not sure what is the desirable fix. What would you like to see? Would you like to see the collapsed window have the width of its content? That may be a bit tricky but possible and would be the correct fix (it would require not skipping items in order to measure the size output). Otherwise we can have a better minimum size for collapsed window, if the problem is only the inability to double-click into it. |
What I'd expect to see is the restored collapsed autofit window fitted to at least the size of its own title OR at least a fair portion of it. I don't mind what the fix is, the situation I'd like to avoid is the one where I re-start the app and my collapsed windows are just a sea of anonymous arrows and I have to uncollapse and recollapse each one to find the one I'm looking for. I'd still like to be able to save the collapsed state of the windows, mind. :) |
I made collapsed window process the initial auto-fitting so you should know get a decently sized title bar. Note that
|
Thank you, that totally solves the sea-of-anonymous-arrows problem. :) |
Just tried HEAD (2e26196) and sadly the original issue has returned. |
c9430bb is the commit that broke it. |
… calculating their initial width #176
Thanks! fixed. It was a slightly different bug here, reloading saved settings but not updating the size further. c9430bb was correct in many ways, new code is more explicit into enabling auto-resizing when creating a new window that has saved settings. |
Verified - thanks! |
I made a change there was actually another stupid bug and Begin() would always return true in some cases. The only case it should return true for 1 frame when a window is collapsed:
It sounds logic and fair, but I'm really wary of this because it create a really rare case that is likely to surprise some users. I'm sure they'll be edge cases and bugs. I'll leave it to see what happens and if I can learn some more about this. |
That sounds logical. FYI b61b311 still works fine. If the Begin()==true confuses someone, and I agree it's in a hard-to-intuit corner-case, then I think it can go away without hurting my use case at least - I don't programmatically start windows in a collapsed state, so on app startup they're always uncollapsed OR collapsed-but-with-a-.ini-size. Someone who sets up a new auto-sized window with no explicit size and an initially collapsed state would probably figure out what's going on (and that they should set an explicit size) just by immediately eyeballing the results. Not sure that's less surprising than the magic 1-frame Begin()==true, but it probably is... |
FYI I reorganised the Begin() functions which was full of traps (subtle ordering dependencies). It should be better and healthier now but there is the possibility that I've created bugs or changes of behavior related to window size. Let me know if you notice anything unusual. The changes are spread over many commits ending with this |
Such windows show merely the header, the collapse-triangle, and a few pixels of padding (in which a few pixels of the actual window title might be visible if lucky :) ).
Expanding and re-collapsing such windows displays them how I'd expect, i.e. the header, the collapse-triangle, and the full window title.
The text was updated successfully, but these errors were encountered: