Piano Roll UI Improvements: Add toolbar close button, double-click to close, optimize detach mode UXll#2230
Open
27704534 wants to merge 7 commits into
Open
Piano Roll UI Improvements: Add toolbar close button, double-click to close, optimize detach mode UXll#223027704534 wants to merge 7 commits into
27704534 wants to merge 7 commits into
Conversation
Author
|
Because the China's bad internet,And my Cloudflare WARP didn't work well.So my Git and Nuget didn't work well.I have to use the strange way to edit it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a close button to the top-right corner of the piano roll toolbar, along with a few quality-of-life improvements for detach mode.
New Features
Toolbar Close Button
Added an X button at the top-right corner of the piano roll — click to hide the roll. The button position stays fixed and doesn't shift when the parameter panel toggles, which feels natural to Windows users. It automatically hides in detach mode to avoid duplication with the window's native close button.
Double-Click to Close
Double-clicking the empty area of the toolbar also closes the piano roll. Threshold is set to 300ms to prevent accidental triggers.
Detach Mode Menu Polish
The "View → Piano Roll → Hide" menu item is now automatically hidden in detach mode, since the window already has a system close button making it redundant.
Implementation Notes
Uses a "floating button + placeholder" layout approach: the close button stays fixed at the top-right corner, and a placeholder element shifts the parameter panel button left by 20px when the panel is collapsed to prevent overlap. The shift is barely noticeable in normal use, but the fixed close button position is a clear quality-of-life improvement.
The close button reuses the existing toolbar ToggleButton style. IsChecked is manually reset after click to avoid leftover selected background on the next open — the user never sees this since the roll hides immediately.
The placeholder uses nested double Border for multi-condition visibility (detach mode + panel state) without adding new ViewModel properties, keeping changes minimal.
Files Changed
OpenUtau/Controls/PianoRoll.axaml
OpenUtau/ViewModels/PianoRollViewModel.cs
OpenUtau/Controls/PianoRoll.axaml.cs
Compatibility
All changes are fully backward compatible and do not affect core functionality like rendering or editing.