Changeset View
Changeset View
Standalone View
Standalone View
mobile/app/package/contents/ui/Thumbnails.qml
Show All 23 Lines | |||||
24 | ThumbnailsBase { | 24 | ThumbnailsBase { | ||
25 | id: root | 25 | id: root | ||
26 | model: documentItem.matchingPages | 26 | model: documentItem.matchingPages | ||
27 | 27 | | |||
28 | ToolBar { | 28 | ToolBar { | ||
29 | id: toolBarContent | 29 | id: toolBarContent | ||
30 | width: root.width | 30 | width: root.width | ||
31 | height: searchField.height | 31 | height: searchField.height | ||
32 | TextField { | 32 | SearchField { | ||
33 | id: searchField | 33 | id: searchField | ||
34 | enabled: documentItem ? documentItem.supportsSearching : false | 34 | enabled: documentItem ? documentItem.supportsSearching : false | ||
35 | placeholderText: documentItem && documentItem.supportsSearching ? i18n("Search...") : i18n("This document isn't searchable.") | ||||
35 | anchors.centerIn: parent | 36 | anchors.centerIn: parent | ||
36 | onTextChanged: { | 37 | onTextChanged: { | ||
37 | if (text.length > 2) { | 38 | if (text.length > 2) { | ||
38 | documentItem.searchText(text); | 39 | documentItem.searchText(text); | ||
39 | } else { | 40 | } else { | ||
aacid: This needs to be !== to be 0.00000004 nanoseconds faster (same in the other file) | |||||
40 | documentItem.resetSearch(); | 41 | documentItem.resetSearch(); | ||
41 | } | 42 | } | ||
42 | } | 43 | } | ||
43 | } | 44 | } | ||
44 | Label { | 45 | Label { | ||
45 | anchors { | 46 | anchors { | ||
46 | left: searchField.right | 47 | left: searchField.right | ||
47 | verticalCenter: searchField.verticalCenter | 48 | verticalCenter: searchField.verticalCenter | ||
48 | } | 49 | } | ||
49 | visible: documentItem.matchingPages.length == 0 | 50 | visible: documentItem.matchingPages.length == 0 | ||
50 | text: i18n("No results found.") | 51 | text: i18n("No results found.") | ||
51 | } | 52 | } | ||
52 | } | 53 | } | ||
53 | } | 54 | } |
This needs to be !== to be 0.00000004 nanoseconds faster (same in the other file)