Repository navigation
Let the list view's rows be sized in three steps like the grid's tiles #195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import QtQuick | ||
|
|
||
| // Ctrl+scroll over a view asks for a size step, the way Ctrl+= and Ctrl+- | ||
| // do: one step per notch of the wheel, up for bigger. The view says what | ||
| // a step means (the grid's tiles, the list's rows). | ||
| WheelHandler { | ||
| signal zoomRequested(int step) | ||
|
|
||
| acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad | ||
| acceptedModifiers: Qt.ControlModifier | ||
| // A touchpad sends many small deltas: a step per notch's worth | ||
| // (120), and nothing for an event that doesn't move up or down. | ||
| property real pending: 0 | ||
| onWheel: (event) => { | ||
| // Every whole notch is a step; the rest waits for the next event. | ||
| pending += event.angleDelta.y | ||
| while (Math.abs(pending) >= 120) { | ||
| const step = pending > 0 ? 1 : -1 | ||
| zoomRequested(step) | ||
| pending -= step * 120 | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1141,6 +1141,7 @@ private slots: | |
| width: 900; height: 620; visible: true | ||
| property string viewMode: "columns" | ||
| property real zoom: 1 | ||
| property real listZoom: 1 | ||
| property bool split: false | ||
| property bool helpVisible: false | ||
| property var activePane: null | ||
|
|
@@ -1211,6 +1212,7 @@ private slots: | |
| width: 900; height: 620; visible: true | ||
| property string viewMode: "columns" | ||
| property real zoom: 1 | ||
| property real listZoom: 1 | ||
| property bool split: false | ||
| property bool helpVisible: false | ||
| property var activePane: null | ||
|
|
@@ -7351,6 +7353,7 @@ private slots: | |
| width: 900; height: 620; visible: true | ||
| property string viewMode: "list" | ||
| property real zoom: 1 | ||
| property real listZoom: 1 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! |
||
| property bool split: false | ||
| property bool helpVisible: false | ||
| property var activePane: null | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.