add pages and update button
This commit is contained in:
34
qml/buttons/UpdateBtn.qml
Normal file
34
qml/buttons/UpdateBtn.qml
Normal file
@@ -0,0 +1,34 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
Button {
|
||||
id: root
|
||||
implicitHeight: 44
|
||||
font.pixelSize: 15
|
||||
font.bold: true
|
||||
|
||||
property int packageCount: 0
|
||||
property bool isChecking: false
|
||||
property bool isUpdating: false
|
||||
property bool isInstalling: false
|
||||
|
||||
enabled: !root.isUpdating && !root.isChecking && !root.isInstalling && root.packageCount > 0
|
||||
text: root.isUpdating ? "Обновление..." : root.isChecking ? "Проверка..." : root.packageCount > 0 ? "Обновить систему" : "✓ Всё обновлено"
|
||||
|
||||
background: Rectangle {
|
||||
radius: 1
|
||||
color: !root.enabled ? "#313244" : root.down ? "#6f8fd8" : root.hovered ? "#89b4fa" : "#8CAAEE"
|
||||
border.width: root.visualFocus ? 2 : 0
|
||||
border.color: "#cdd6f4"
|
||||
|
||||
Behavior on color { ColorAnimation { duration: 100 } }
|
||||
}
|
||||
|
||||
contentItem: Text {
|
||||
text: root.text
|
||||
font: root.font
|
||||
color: root.enabled ? "#1e1e2e" : "#585b70"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ import QtQuick.Controls
|
||||
|
||||
TabBar {
|
||||
id: root
|
||||
spacing: 0 // у Fusion TabBar.spacing по умолчанию -1
|
||||
|
||||
property int parentWidth: 0
|
||||
|
||||
@@ -25,7 +26,7 @@ TabBar {
|
||||
|
||||
contentItem: Text {
|
||||
text: tabElement.text
|
||||
color: tabElement.checked ? "#cdd6f4" : "#a6adc8"
|
||||
color: tabElement.checked ? Theme.color2 : Theme.color3
|
||||
font.pixelSize: 13
|
||||
font.bold: tabElement.checked
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
@@ -44,7 +45,7 @@ TabBar {
|
||||
anchors.margins: 0
|
||||
height: 1
|
||||
radius: 1
|
||||
color: "#89b4fa"
|
||||
color: Theme.color6
|
||||
visible: tabElement.checked
|
||||
}
|
||||
}
|
||||
|
||||
4
qml/components/pages/DeletePg.qml
Normal file
4
qml/components/pages/DeletePg.qml
Normal file
@@ -0,0 +1,4 @@
|
||||
import QtQuick
|
||||
|
||||
Item { }
|
||||
|
||||
6
qml/components/pages/InstallPg.qml
Normal file
6
qml/components/pages/InstallPg.qml
Normal file
@@ -0,0 +1,6 @@
|
||||
import QtQuick
|
||||
|
||||
Item { }
|
||||
|
||||
|
||||
|
||||
23
qml/components/pages/UpdatePg.qml
Normal file
23
qml/components/pages/UpdatePg.qml
Normal file
@@ -0,0 +1,23 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import "../../buttons" as Buttons
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
spacing: 12
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
|
||||
Buttons.UpdateBtn {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ QtObject {
|
||||
readonly property color color3: "#6c7086"
|
||||
readonly property color color4: "#45475a"
|
||||
readonly property color color5: "#313244"
|
||||
readonly property color color6: "#89b4fa"
|
||||
readonly property color colorTransparent: "transparent"
|
||||
|
||||
readonly property int fontSize: 12
|
||||
|
||||
Reference in New Issue
Block a user