-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Fix #315779: Disable auto-size of vertical frame when dragging the height handle #7362
Fix #315779: Disable auto-size of vertical frame when dragging the height handle #7362
Conversation
There a few mtests that fail, seems those insist on 10 being the height of vertical frames. I don't quite get why and how thios is related to disabling the Autimatic site on dragging that size handle? |
libmscore/box.cpp
Outdated
@@ -790,11 +790,24 @@ void VBox::layout() | |||
contentHeight = minHeight(); | |||
|
|||
setHeight(contentHeight); | |||
setBoxHeight(Spatium(contentHeight / spatium())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this here the cause for the mtest fails?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems likely, as those now all get that default size set explicitly due to auto-size instead of keeping the old size value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I have found a way of doing it without this line. I will try that soon.
f6e599c
to
91311a0
Compare
That certainly looks a lot safer now. Just thinking it through - what is the expected behavior if you turn autosize off for a box that has been expanded already buy this - should the box snap to the height given in the Inspector? And then let's say you add more content to the box, and now it's not big enough - should turning it on automatically snap the box to the required size? Currently, both happen, and I think that's probably as expected. It looks to me like this change won;t affect that, which is good, but also works as I expect with respect to dragging, where starting a drag on an autosize-expanded box disables autosize but does not cause the box instantly shrink. In that sense it's very much like how Alt+drag of an autoplaced element disables autoplace but doesn't cause the position to suddenly reset. So on paper all is good as far as I am concerned. Once thing that has bugged me about the autosize design all along is that magic number 10 sp that basically serves as a minimum box height with autosize enabled. I'd have preferred this to have been a style setting, assuming we could work out the compatibility implications. FWIW, it's technically possible to implement that without much of a UI change, just add the style setting and mark the height property as styled in the boxStyle definition in box.cpp. This should automatically result in a "set as style" button being added to the Inspector. But, I'm not really recommending that right now - something to think about though. |
91311a0
to
b52c6ae
Compare
@cbjeukendrup Could you please port the changes to the master |
@igorkorsukov Yep, coming soon! |
[MU4] Ported #7362: Fix #315779: Disable auto-size of vertical frame when dragging the height handle
Resolves: https://musescore.org/en/node/315779