-
Notifications
You must be signed in to change notification settings - Fork 60
feat: Add support for modifying the plugin popup cursor shape via the… #1434
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: master
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 |
|---|---|---|
|
|
@@ -16,6 +16,7 @@ Item { | |
| property bool inputEventsEnabled: true | ||
| property bool hovered: hoverHandler.hovered | ||
| property bool pressed: tapHandler.pressed | ||
| property int cursorShape: Qt.ArrowCursor | ||
|
|
||
| implicitWidth: shellSurface ? shellSurface.width : 10 | ||
| implicitHeight: shellSurface ? shellSurface.height : 10 | ||
|
|
@@ -42,6 +43,7 @@ Item { | |
|
|
||
| HoverHandler { | ||
| id: hoverHandler | ||
| cursorShape: root.cursorShape | ||
| } | ||
| TapHandler { | ||
| id: tapHandler | ||
|
|
@@ -111,5 +113,17 @@ Item { | |
| }) | ||
| }) | ||
| } | ||
|
|
||
| function onCursorShapeRequested(cursorShape) | ||
| { | ||
| console.log("onCursorShapeRequested:", cursorShape) | ||
| // Qt::CursorShape range is 0-21, plus 24 (BitmapCursor) and 25 (CustomCursor). | ||
| // We set a default if the value is out of logical bounds. | ||
| if (cursorShape < 0 || cursorShape > 25) { | ||
yixinshark marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| root.cursorShape = Qt.ArrowCursor | ||
| } else { | ||
| root.cursorShape = cursorShape | ||
| } | ||
|
Comment on lines
+122
to
+126
|
||
| } | ||
| } | ||
| } | ||
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.
这里要不要再加个cursorShape属性,导出到qml中,