diff options
author | Bernd Weimer <bernd.weimer@qt.io> | 2022-11-22 16:49:13 +0100 |
---|---|---|
committer | Bernd Weimer <bernd.weimer@qt.io> | 2022-11-25 08:49:56 +0100 |
commit | dd5f398ea2cd66dccba1582cd910e398e8f66029 (patch) | |
tree | 26f7bd9148895f9c7f9c0da5a06299580ff2aa78 /examples/wayland/custom-extension/compositor/qml/CompositorScreen.qml | |
parent | c14916f5fd84f6b5483024b3df77592661a0f04e (diff) |
Improve examples
Updated signal handlers to new syntax to reduce noise (warnings).
Allowed to build examples with subfolders in one step, updated from
deprecated WlShell to XdgShell, etc.
Change-Id: If821363ffd1b38ea1d152f5a044b0609cf739014
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'examples/wayland/custom-extension/compositor/qml/CompositorScreen.qml')
-rw-r--r-- | examples/wayland/custom-extension/compositor/qml/CompositorScreen.qml | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/wayland/custom-extension/compositor/qml/CompositorScreen.qml b/examples/wayland/custom-extension/compositor/qml/CompositorScreen.qml index 724c0975a..ec70a4373 100644 --- a/examples/wayland/custom-extension/compositor/qml/CompositorScreen.qml +++ b/examples/wayland/custom-extension/compositor/qml/CompositorScreen.qml @@ -20,7 +20,7 @@ WaylandOutput { Rectangle { id: sidebar - width: 150 + width: 250 anchors.left: parent.left anchors.top: parent.top anchors.bottom: parent.bottom @@ -34,19 +34,20 @@ WaylandOutput { Repeater { model: comp.itemList Rectangle { - height: 36 + height: 54 width: sidebar.width - 5 color: "white" radius: 5 Text { - text: "window: " + modelData.shellSurface.title + "[" + modelData.shellSurface.className - + (modelData.isCustom ? "]\nfont size: " + modelData.fontSize :"]\n No extension") + text: "window: " + modelData.shellSurface.toplevel.title + "\n[" + + modelData.shellSurface.toplevel.appId + + (modelData.isCustom ? "]\nfont size: " + modelData.fontSize : "]\nNo extension") color: modelData.isCustom ? "black" : "darkgray" } MouseArea { enabled: modelData.isCustom anchors.fill: parent - onWheel: { + onWheel: (wheel) => { if (wheel.angleDelta.y > 0) modelData.fontSize++ else if (wheel.angleDelta.y < 0 && modelData.fontSize > 3) |