Skip to content
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

26658: Vertically center percussions pads within the panel #26684

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/notation/qml/MuseScore/NotationScene/PercussionPanel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Item {
width: Math.min(rowLayout.width, parent.width)

contentWidth: rowLayout.width
contentHeight: rowLayout.height
contentHeight: rowLayout.height + rowLayout.anchors.topMargin

StyledScrollBar.vertical: verticalScrollBar

Expand Down Expand Up @@ -152,6 +152,8 @@ Item {
}

height: padGrid.cellHeight * padGrid.numRows
anchors.top: parent.top
anchors.topMargin: Math.max((flickable.height - height) / 2, 0)
spacing: padGrid.spacing / 2

NavigationPanel {
Expand Down Expand Up @@ -240,10 +242,8 @@ Item {
property Item swapOriginPad: null
property bool isKeyboardSwapActive: false

Layout.alignment: Qt.AlignTop
Layout.fillHeight: true

width: cellWidth * numColumns
Layout.fillHeight: true

interactive: false

Expand Down Expand Up @@ -433,6 +433,7 @@ Item {
visible: !percModel.enabled

anchors.centerIn: parent
anchors.verticalCenterOffset: rowLayout.anchors.topMargin / 2

font: ui.theme.bodyFont
text: qsTrc("notation/percussion", "Select an unpitched percussion staff to see available sounds")
Expand Down
Loading