Changeset View
Changeset View
Standalone View
Standalone View
src/apps/marble-maps/Search.qml
Context not available. | |||||
64 | anchors.top: searchField.bottom | 64 | anchors.top: searchField.bottom | ||
---|---|---|---|---|---|
65 | anchors.left: searchField.left | 65 | anchors.left: searchField.left | ||
66 | width: searchField.width | 66 | width: searchField.width | ||
67 | height: childrenRect.height + 2 * itemSpacing | 67 | height: childrenRect.height | ||
68 | color: palette.base | 68 | color: palette.base | ||
69 | 69 | | |||
70 | property int delegateHeight: 0 | 70 | property int delegateHeight: 0 | ||
Context not available. | |||||
81 | id: bookmarksView | 81 | id: bookmarksView | ||
82 | anchors.left: parent.left | 82 | anchors.left: parent.left | ||
83 | anchors.right: parent.right | 83 | anchors.right: parent.right | ||
84 | height: background.delegateHeight * Math.min(6, model.count) | 84 | height: background.delegateHeight * Math.min(6, model.count) + 2 * background.itemSpacing | ||
85 | clip: true | 85 | clip: true | ||
86 | ScrollIndicator.vertical: ScrollIndicator { } | 86 | ScrollIndicator.vertical: ScrollIndicator { } | ||
87 | 87 | | |||
88 | model: bookmarks.model | 88 | model: bookmarks.model | ||
89 | | ||||
90 | MouseArea { | ||||
91 | anchors.bottom: parent.bottom | ||||
92 | height: 2 * background.itemSpacing | ||||
93 | width: parent.width | ||||
94 | visible: bookmarks.model.count <= 6 | ||||
95 | onClicked: { | ||||
96 | app.selectedPlacemark = bookmarks.placemark(bookmarks.model.count - 1) | ||||
97 | itemSelected(bookmarks.placemark(bookmarks.model.count - 1)) | ||||
98 | marbleMaps.centerOn(selectedPlacemark.longitude, selectedPlacemark.latitude) | ||||
99 | dialogLoader.focus = true | ||||
100 | } | ||||
101 | } | ||||
102 | | ||||
89 | delegate: Row { | 103 | delegate: Row { | ||
90 | width: bookmarksView.width | 104 | width: bookmarksView.width | ||
91 | height: background.itemSpacing + Math.max(bookmarkIcon.height, bookmarkText.height) | 105 | height: background.itemSpacing + Math.max(bookmarkIcon.height, bookmarkText.height) | ||
Context not available. |