Skip to content

Commit 6c3e4c3

Browse files
Merge pull request #28365 from mathesoncalum/27798-blurry_percussion_pads
Fix #27798: Blurry percussion panel pads
2 parents 42bc471 + 3b90479 commit 6c3e4c3

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

src/notation/qml/MuseScore/NotationScene/internal/PercussionPanelPad.qml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import QtQuick 2.15
2323

2424
import Muse.Ui 1.0
2525
import Muse.UiComponents 1.0
26-
import Muse.GraphicalEffects 1.0
2726
import MuseScore.NotationScene 1.0
2827

2928
DropArea {
@@ -186,20 +185,12 @@ DropArea {
186185
// Loads either an empty slot or the pad content
187186
id: padLoader
188187

188+
readonly property real cornerRadius: swappableArea.radius - padLoader.anchors.margins
189+
189190
anchors.fill: parent
190191
// Defined as 1 in the spec, but causes some aliasing in practice...
191192
anchors.margins: 2 + swappableArea.border.width
192193

193-
// Can't simply use clip as this won't take into account radius...
194-
layer.enabled: ui.isEffectsAllowed
195-
layer.effect: EffectOpacityMask {
196-
maskSource: Rectangle {
197-
width: padLoader.width
198-
height: padLoader.height
199-
radius: swappableArea.radius - padLoader.anchors.margins
200-
}
201-
}
202-
203194
sourceComponent: Boolean(root.padModel) ? padContentComponent : emptySlotComponent
204195

205196
Component {
@@ -217,6 +208,8 @@ DropArea {
217208

218209
padSwapActive: dragHandler.active
219210

211+
cornerRadius: padLoader.cornerRadius
212+
220213
Connections {
221214
target: footerNavCtrl
222215
function onTriggered() {
@@ -232,6 +225,7 @@ DropArea {
232225
Rectangle {
233226
id: emptySlotBackground
234227
color: root.panelEnabled ? prv.enabledBackgroundColor : prv.disabledBackgroundColor
228+
radius: padLoader.cornerRadius
235229
}
236230
}
237231
}

src/notation/qml/MuseScore/NotationScene/internal/PercussionPanelPadContent.qml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ Column {
3838

3939
property bool padSwapActive: false
4040

41+
property real cornerRadius: 0
42+
4143
function openContextMenu(pos) {
4244
if (!root.padModel) {
4345
return
@@ -95,11 +97,14 @@ Column {
9597
}
9698
}
9799

98-
Rectangle {
100+
RoundedRectangle {
99101
id: padNameBackground
100102

101103
visible: !root.useNotationPreview
104+
102105
anchors.fill: parent
106+
topLeftRadius: root.cornerRadius
107+
topRightRadius: root.cornerRadius
103108

104109
color: Utils.colorWithAlpha(ui.theme.accentColor, ui.theme.buttonOpacityNormal)
105110
}
@@ -169,10 +174,12 @@ Column {
169174
color: root.useNotationPreview ? ui.theme.strokeColor : ui.theme.accentColor
170175
}
171176

172-
Rectangle {
177+
RoundedRectangle {
173178
id: footerArea
174179

175180
width: parent.width
181+
bottomLeftRadius: root.cornerRadius
182+
bottomRightRadius: root.cornerRadius
176183

177184
color: Utils.colorWithAlpha(ui.theme.buttonColor, ui.theme.buttonOpacityNormal)
178185

0 commit comments

Comments
 (0)