start begin install manager
This commit is contained in:
@@ -6,6 +6,11 @@ import QtQuick.Controls
|
|||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
property int status: 0;
|
||||||
|
property var installTarget: null;
|
||||||
|
signal search();
|
||||||
|
signal install();
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
spacing: 8
|
spacing: 8
|
||||||
@@ -18,6 +23,7 @@ Item {
|
|||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
color: Theme.color2
|
color: Theme.color2
|
||||||
font.pixelSize: 14
|
font.pixelSize: 14
|
||||||
|
enabled: root.status === ProcessManager.Status.Null
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: "#313244"
|
color: "#313244"
|
||||||
@@ -25,6 +31,18 @@ Item {
|
|||||||
border.width: 1
|
border.width: 1
|
||||||
border.color: packageSearchField.activeFocus ? Theme.color6 : Theme.color4
|
border.color: packageSearchField.activeFocus ? Theme.color6 : Theme.color4
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Задержку набора и очистку старого списка делает ProcessManager.
|
||||||
|
onTextChanged: {
|
||||||
|
if (root.installTarget !== null) root.installTarget = null;
|
||||||
|
root.search(text);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Enter при выбранном пакете возвращает к результатам поиска.
|
||||||
|
onAccepted: {
|
||||||
|
if (root.installTarget !== null) root.installTarget = null;
|
||||||
|
root.search(text);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|||||||
Reference in New Issue
Block a user