1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-14 22:42:34 +02:00
ScreenPlay/ScreenPlayUtil/qml/Search.qml
2022-05-05 13:02:54 +02:00

53 lines
1.1 KiB
QML

import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Material 2.0
import ScreenPlayApp
import ScreenPlay
Item {
id: root
width: 300
ToolButton {
id: icnSearch
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_search.svg"
height: 30
width: 30
icon.width: 30
icon.height: 30
icon.color: Material.iconColor
anchors {
right: parent.right
verticalCenter: parent.verticalCenter
}
}
TextField {
id: txtSearch
placeholderTextColor: Material.secondaryTextColor
width: 250
height: 40
color: Material.secondaryTextColor
placeholderText: qsTr("Search for Wallpaper & Widgets")
onTextChanged: {
if (txtSearch.text.length === 0)
App.installedListFilter.resetFilter();
else
App.installedListFilter.sortByName(txtSearch.text);
}
anchors {
right: icnSearch.left
rightMargin: 10
top: parent.top
topMargin: 10
}
}
}