Changeset View
Changeset View
Standalone View
Standalone View
mobile/app/package/contents/ui/TableOfContents.qml
Show All 14 Lines | |||||
15 | * License along with this program; if not, write to the | 15 | * License along with this program; if not, write to the | ||
16 | * Free Software Foundation, Inc., | 16 | * Free Software Foundation, Inc., | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | import QtQuick 2.1 | 20 | import QtQuick 2.1 | ||
21 | import QtQuick.Controls 1.3 | 21 | import QtQuick.Controls 1.3 | ||
22 | import QtQuick.Controls 2.0 as QQC2 | 22 | import QtQuick.Controls 2.0 as QQC2 | ||
23 | import org.kde.kirigami 2.0 as Kirigami | 23 | import org.kde.kirigami 2.7 as Kirigami | ||
24 | 24 | | |||
25 | Kirigami.Page { | 25 | Kirigami.Page { | ||
26 | id: root | 26 | id: root | ||
27 | leftPadding: 0 | 27 | leftPadding: 0 | ||
28 | topPadding: 0 | 28 | topPadding: 0 | ||
29 | rightPadding: 0 | 29 | rightPadding: 0 | ||
30 | bottomPadding: 0 | 30 | bottomPadding: 0 | ||
31 | property alias contentY: flickable.contentY | 31 | property alias contentY: flickable.contentY | ||
32 | property alias contentHeight: flickable.contentHeight | 32 | property alias contentHeight: flickable.contentHeight | ||
33 | 33 | | |||
34 | QQC2.ToolBar { | 34 | QQC2.ToolBar { | ||
35 | id: toolBarContent | 35 | id: toolBarContent | ||
36 | width: root.width | 36 | width: root.width | ||
37 | height: searchField.height | 37 | height: searchField.height + Kirigami.Units.largeSpacing | ||
38 | QQC2.TextField { | 38 | Kirigami.ActionTextField { | ||
39 | id: searchField | 39 | id: searchField | ||
40 | anchors.centerIn: parent | 40 | anchors.centerIn: parent | ||
41 | rightActions: [ | ||||
42 | Kirigami.Action { | ||||
43 | iconName: "edit-clear" | ||||
44 | visible: searchField.text != "" | ||||
45 | onTriggered: { | ||||
46 | searchField.text = "" | ||||
47 | searchField.accepted() | ||||
48 | } | ||||
49 | } | ||||
50 | ] | ||||
51 | focusSequence: "Ctrl+F" | ||||
52 | placeholderText: i18n("Search...") | ||||
41 | } | 53 | } | ||
42 | } | 54 | } | ||
43 | ScrollView { | 55 | ScrollView { | ||
44 | anchors { | 56 | anchors { | ||
45 | left: parent.left | 57 | left: parent.left | ||
46 | top: toolBarContent.bottom | 58 | top: toolBarContent.bottom | ||
47 | right: parent.right | 59 | right: parent.right | ||
48 | bottom: parent.bottom | 60 | bottom: parent.bottom | ||
Show All 24 Lines |