Skip to content

Piano Roll UI Improvements: Add toolbar close button, double-click to close, optimize detach mode UXll#2230

Open
27704534 wants to merge 13 commits into
openutau:masterfrom
27704534:fix-PianoRoll
Open

Piano Roll UI Improvements: Add toolbar close button, double-click to close, optimize detach mode UXll#2230
27704534 wants to merge 13 commits into
openutau:masterfrom
27704534:fix-PianoRoll

Conversation

@27704534

@27704534 27704534 commented Jun 25, 2026

Copy link
Copy Markdown
image image image image

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.

@27704534

Copy link
Copy Markdown
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.

@atouu

atouu commented Jun 27, 2026

Copy link
Copy Markdown
Member

Hello, I opened a PR in 27704534#1 that improves this:

Changes:

  • Use standard button instead of toggle for hide
  • Use DoubleTapped instead
  • Restructure menus and strings
  • Merged detach-pianoroll-prefs-toggle to here.

Also, I recommend not to over comment if the code is already clear.

@atouu atouu added the ui label Jun 27, 2026
runit-xze added a commit to runit-xze/OpenUtau that referenced this pull request Jul 25, 2026
Merge upstream openutau#2230: Piano Roll UI Improvements
runit-xze added a commit to runit-xze/OpenUtau that referenced this pull request Jul 25, 2026
…ton, detach mode UX)

Cherry-picked from openutau#2230: openutau#2230
Resolved real conflict in PreferencesViewModel.cs: kept our computed ThemeEditable (from openutau#2205's IObservable fix) and added this PR's DetachPianoRoll property, which is unrelated and used correctly elsewhere in the auto-merged files.
runit-xze added a commit to runit-xze/OpenUtau that referenced this pull request Jul 25, 2026
Merge upstream openutau#2230: Piano Roll UI Improvements
runit-xze added a commit to runit-xze/OpenUtau that referenced this pull request Jul 25, 2026
…ghlighting

Cherry-picked from openutau#2263: openutau#2263
Conflicts were independent additions colliding at the same insertion points against already-merged features (openutau#2182's DiffSinger phrase boundary rendering, openutau#2230's detach-pianoroll menu item, openutau#2067's metronome preferences UI):
- NotesCanvas.cs: combined the phoneme-error-aware hasError computation (existing) with this PR's playback-highlight blending, using consistent brush constants; kept both private method blocks (phrase boundary rendering + highlight animation) side by side, no actual overlap.
- PianoRoll.axaml / PreferencesDialog.axaml: concatenated both menu items / settings sections, no overlap.
runit-xze added a commit to runit-xze/OpenUtau that referenced this pull request Jul 25, 2026
Cherry-picked from openutau#2092: openutau#2092
Conflict in MainWindow.axaml.cs was stale: this PR's actual change there is just adding nullable-reference '!' annotations, unrelated to its real feature. The touched method (SetPianoRollAttachment) was independently rewritten by openutau#2230 (already merged); kept our current, restructured version rather than reintroducing the pre-openutau#2230 branch logic.
runit-xze added a commit to runit-xze/OpenUtau that referenced this pull request Jul 25, 2026
…ghlighting

Cherry-picked from openutau#2263: openutau#2263
Conflicts were independent additions colliding at the same insertion points against already-merged features (openutau#2182's DiffSinger phrase boundary rendering, openutau#2230's detach-pianoroll menu item, openutau#2067's metronome preferences UI):
- NotesCanvas.cs: combined the phoneme-error-aware hasError computation (existing) with this PR's playback-highlight blending, using consistent brush constants; kept both private method blocks (phrase boundary rendering + highlight animation) side by side, no actual overlap.
- PianoRoll.axaml / PreferencesDialog.axaml: concatenated both menu items / settings sections, no overlap.
runit-xze added a commit to runit-xze/OpenUtau that referenced this pull request Jul 25, 2026
Cherry-picked from openutau#2092: openutau#2092
Conflict in MainWindow.axaml.cs was stale: this PR's actual change there is just adding nullable-reference '!' annotations, unrelated to its real feature. The touched method (SetPianoRollAttachment) was independently rewritten by openutau#2230 (already merged); kept our current, restructured version rather than reintroducing the pre-openutau#2230 branch logic.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants