diff --git a/examples/pdf/pdfviewer/viewer.qml b/examples/pdf/pdfviewer/viewer.qml
index 777a9660bb7e452f30c8ec3d9561682395b51895..e3bb4b474e7ff291761b371614dd700c065c50a6 100644
--- a/examples/pdf/pdfviewer/viewer.qml
+++ b/examples/pdf/pdfviewer/viewer.qml
@@ -170,6 +170,10 @@ ApplicationWindow {
                     onTriggered: view.copySelectionToClipboard()
                 }
             }
+            Shortcut {
+                sequence: StandardKey.Find
+                onActivated: searchField.forceActiveFocus()
+            }
             Shortcut {
                 sequence: StandardKey.Quit
                 onActivated: Qt.quit()
@@ -214,89 +218,85 @@ ApplicationWindow {
         id: searchDrawer
         edge: Qt.LeftEdge
         modal: false
-        width: searchLayout.implicitWidth
+        width: 300
         y: root.header.height
-        height: root.contentItem.height
+        height: view.height
         dim: false
-        Shortcut {
-            sequence: StandardKey.Find
-            onActivated: {
-                searchDrawer.open()
-                searchField.forceActiveFocus()
+        clip: true
+        ListView {
+            id: searchResultsList
+            anchors.fill: parent
+            anchors.margins: 2
+            model: view.searchModel
+            ScrollBar.vertical: ScrollBar { }
+            delegate: ItemDelegate {
+                width: parent ? parent.width : 0
+                text: "page " + (page + 1) + ": " + context
+                highlighted: ListView.isCurrentItem
+                onClicked: {
+                    searchResultsList.currentIndex = index
+                    view.goToLocation(page, location, 0)
+                    view.searchModel.currentResult = indexOnPage
+                }
             }
         }
-        ColumnLayout {
-            id: searchLayout
+    }
+
+    footer: ToolBar {
+        height: footerRow.implicitHeight
+        RowLayout {
+            id: footerRow
             anchors.fill: parent
-            anchors.margins: 2
-            RowLayout {
-                ToolButton {
-                    action: Action {
-                        icon.source: "resources/go-up-search.svg"
-                        shortcut: StandardKey.FindPrevious
-                        onTriggered: view.searchBack()
-                    }
-                    ToolTip.visible: enabled && hovered
-                    ToolTip.delay: 2000
-                    ToolTip.text: "find previous"
+            ToolButton {
+                action: Action {
+                    icon.source: "resources/go-up-search.svg"
+                    shortcut: StandardKey.FindPrevious
+                    onTriggered: view.searchBack()
                 }
-                TextField {
-                    id: searchField
-                    placeholderText: "search"
-                    Layout.minimumWidth: 200
-                    Layout.fillWidth: true
-                    Image {
-                        visible: searchField.text !== ""
-                        source: "resources/edit-clear.svg"
-                        anchors {
-                            right: parent.right
-                            top: parent.top
-                            bottom: parent.bottom
-                            margins: 3
-                            rightMargin: 5
-                        }
-                        TapHandler {
-                            onTapped: searchField.clear()
-                        }
+                ToolTip.visible: enabled && hovered
+                ToolTip.delay: 2000
+                ToolTip.text: "find previous"
+            }
+            TextField {
+                id: searchField
+                placeholderText: "search"
+                Layout.minimumWidth: 150
+                Layout.maximumWidth: 300
+                Layout.fillWidth: true
+                onAccepted: searchDrawer.open()
+                Image {
+                    visible: searchField.text !== ""
+                    source: "resources/edit-clear.svg"
+                    anchors {
+                        right: parent.right
+                        top: parent.top
+                        bottom: parent.bottom
+                        margins: 3
+                        rightMargin: 5
                     }
-                }
-                ToolButton {
-                    action: Action {
-                        icon.source: "resources/go-down-search.svg"
-                        shortcut: StandardKey.FindNext
-                        onTriggered: view.searchForward()
+                    TapHandler {
+                        onTapped: searchField.clear()
                     }
-                    ToolTip.visible: enabled && hovered
-                    ToolTip.delay: 2000
-                    ToolTip.text: "find next"
                 }
             }
-            ListView {
-                id: searchResultsList
-                Layout.fillWidth: true
-                Layout.fillHeight: true
-                clip: true
-                model: view.searchModel
-                ScrollBar.vertical: ScrollBar { }
-                delegate: ItemDelegate {
-                    width: parent ? parent.width : 0
-                    text: "page " + (page + 1) + ": " + context
-                    highlighted: ListView.isCurrentItem
-                    onClicked: {
-                        searchResultsList.currentIndex = index
-                        view.goToLocation(page, location, 0)
-                        view.searchModel.currentResult = indexOnPage
-                    }
+            ToolButton {
+                action: Action {
+                    icon.source: "resources/go-down-search.svg"
+                    shortcut: StandardKey.FindNext
+                    onTriggered: view.searchForward()
                 }
+                ToolTip.visible: enabled && hovered
+                ToolTip.delay: 2000
+                ToolTip.text: "find next"
+            }
+            Label {
+                Layout.fillWidth: true
+                property size implicitPointSize: document.pagePointSize(view.currentPage)
+                text: "page " + (view.currentPage + 1) + " of " + document.pageCount +
+                      " scale " + view.renderScale.toFixed(2) +
+                      " original " + implicitPointSize.width.toFixed(1) + "x" + implicitPointSize.height.toFixed(1) + "pts"
+                visible: document.status === PdfDocument.Ready
             }
         }
     }
-
-    footer: Label {
-        property size implicitPointSize: document.pagePointSize(view.currentPage)
-        text: "page " + (view.currentPage + 1) + " of " + document.pageCount +
-              " scale " + view.renderScale.toFixed(2) +
-              " original " + implicitPointSize.width.toFixed(1) + "x" + implicitPointSize.height.toFixed(1) + "pts"
-        visible: document.status === PdfDocument.Ready
-    }
 }