chore(niconbutton): renamed allowScroll to handleWheel for clarity

This commit is contained in:
Lemmy
2026-03-09 00:40:23 -04:00
parent cab1117712
commit 29d0b1f63b
2 changed files with 5 additions and 7 deletions
+2 -2
View File
@@ -1039,7 +1039,7 @@ Rectangle {
baseSize: Style.baseWidgetSize * 0.75
tooltipText: modelData.tooltip
z: 1
allowScroll: true
handleWheel: true
onClicked: {
if (modelData.action) {
modelData.action();
@@ -1414,7 +1414,7 @@ Rectangle {
baseSize: Style.baseWidgetSize * 0.75
tooltipText: modelData.tooltip
z: 11
allowScroll: true
handleWheel: true
onClicked: {
if (modelData.action) {
modelData.action();
+3 -5
View File
@@ -14,7 +14,7 @@ Item {
property string tooltipText
property string tooltipDirection: "auto"
property bool allowClickWhenDisabled: false
property bool allowScroll: false
property bool handleWheel: false
property bool hovering: false
property color colorBg: Color.mSurfaceVariant
@@ -124,12 +124,10 @@ Item {
}
}
onWheel: wheel => {
if (root.allowScroll) {
if (root.handleWheel) {
root.wheel(wheel.angleDelta.y);
wheel.accepted = false;
} else {
wheel.accepted = true;
}
wheel.accepted = false;
}
}
}