This commit is contained in:
Henry Riehl
2026-02-27 13:38:33 +00:00
parent 3ba93cdb7f
commit e751ba7442
2 changed files with 9 additions and 2 deletions
+2
View File
@@ -1035,6 +1035,7 @@ Rectangle {
baseSize: Style.baseWidgetSize * 0.75
tooltipText: modelData.tooltip
z: 1
allowScroll: true
onClicked: {
if (modelData.action) {
modelData.action();
@@ -1411,6 +1412,7 @@ Rectangle {
baseSize: Style.baseWidgetSize * 0.75
tooltipText: modelData.tooltip
z: 11
allowScroll: true
onClicked: {
if (modelData.action) {
modelData.action();
+7 -2
View File
@@ -14,6 +14,7 @@ Item {
property string tooltipText
property string tooltipDirection: "auto"
property bool allowClickWhenDisabled: false
property bool allowScroll: false
property bool hovering: false
property color colorBg: Color.mSurfaceVariant
@@ -123,8 +124,12 @@ Item {
}
}
onWheel: wheel => {
root.wheel(wheel.angleDelta.y);
wheel.accepted = false;
if (root.allowScroll) {
root.wheel(wheel.angleDelta.y);
wheel.accepted = false;
} else {
wheel.accepted = true;
}
}
}
}