Skip to content

Commit

Permalink
26658: Vertically center percussions pad within the panel
Browse files Browse the repository at this point in the history
  • Loading branch information
krasko78 committed Feb 23, 2025
1 parent 9033dc2 commit d24826a
Showing 1 changed file with 5 additions and 4 deletions.
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

0 comments on commit d24826a

Please sign in to comment.