Files
archpack/qml/buttons/UpdateBtn.qml
2026-11-14 11:44:25 +03:00

35 lines
1018 B
QML

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
}
}