diff options
author | Oliver Eftevaag <oliver.eftevaag@qt.io> | 2024-03-04 18:05:52 +0100 |
---|---|---|
committer | Oliver Eftevaag <oliver.eftevaag@qt.io> | 2024-04-04 12:05:08 +0100 |
commit | 32a1bb8daeea8afdb18ec3448264e81519512059 (patch) | |
tree | 5bb4ebf89a44fec5f6877d739f6f90d6f4a490b4 | |
parent | b8047fbd788ce09afe4f5fef079099488c9ed42d (diff) |
Make buttons look acceptable on macOS
The buttons in the scene selection panel looked pretty ugly on macOS,
since the text wouldn't be in the center of the buttons.
By simplifying the delegate, the buttons should look better across
all the different platforms.
Pick-to: 6.7
Change-Id: I207e197acde5f9aee707a64c78799b46ee2e7c5f
Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
-rw-r--r-- | examples/multimedia/video/qmlvideo/qmlvideo/SceneSelectionPanel.qml | 41 |
1 files changed, 8 insertions, 33 deletions
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/SceneSelectionPanel.qml b/examples/multimedia/video/qmlvideo/qmlvideo/SceneSelectionPanel.qml index 0301f5452..91e7c6ad4 100644 --- a/examples/multimedia/video/qmlvideo/qmlvideo/SceneSelectionPanel.qml +++ b/examples/multimedia/video/qmlvideo/qmlvideo/SceneSelectionPanel.qml @@ -43,42 +43,17 @@ Rectangle { } Component { - id: leftDelegate - Item { - width: root.width / 2 - height: 0.8 * root.itemHeight - + id: buttonDelegate + Button { required property string name required property string source - Button { - anchors.fill: parent - anchors.margins: 5 - anchors.rightMargin: 2.5 - anchors.bottomMargin: 0 - text: parent.name - onClicked: root.sceneSource = parent.source - } - } - } - - Component { - id: rightDelegate - Item { width: root.width / 2 - height: 0.8 * root.itemHeight + height: root.itemHeight - required property string name - required property string source - - Button { - anchors.fill: parent - anchors.margins: 5 - anchors.leftMargin: 2.5 - anchors.bottomMargin: 0 - text: parent.name - onClicked: root.sceneSource = parent.source - } + text: name + padding: 3 + onClicked: root.sceneSource = source } } @@ -98,14 +73,14 @@ Rectangle { Column { Repeater { model: videolist - delegate: leftDelegate + delegate: buttonDelegate } } Column { Repeater { model: cameralist - delegate: rightDelegate + delegate: buttonDelegate } } } |