1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-07 05:55:37 -05:00

workaround for all the terrible default QT scrolling behavior

- DankGridView, DankFlickable, DankListView\
- Touchpad behavior greatly improved by preserving momentum
- Fixed janky nested scrollers in control center
This commit is contained in:
bbedward
2025-08-07 15:22:40 -04:00
parent 02ab8e2db5
commit 98d2ca24a8
25 changed files with 973 additions and 788 deletions

View File

@@ -11,7 +11,15 @@ import qs.Widgets
Column {
id: root
property var bluetoothContextMenuWindow
function findBluetoothContextMenu() {
var p = parent;
while (p) {
if (p.bluetoothContextMenuWindow)
return p.bluetoothContextMenuWindow;
p = p.parent;
}
return null;
}
width: parent.width
spacing: Theme.spacingM
@@ -117,10 +125,11 @@ Column {
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
if (bluetoothContextMenuWindow) {
bluetoothContextMenuWindow.deviceData = modelData;
let localPos = btMenuButtonArea.mapToItem(bluetoothContextMenuWindow.parentItem, btMenuButtonArea.width / 2, btMenuButtonArea.height);
bluetoothContextMenuWindow.show(localPos.x, localPos.y);
var contextMenu = root.findBluetoothContextMenu();
if (contextMenu) {
contextMenu.deviceData = modelData;
let localPos = btMenuButtonArea.mapToItem(contextMenu.parentItem, btMenuButtonArea.width / 2, btMenuButtonArea.height);
contextMenu.show(localPos.x, localPos.y);
}
}
}