mirror of https://github.com/cutefishos/calamares
commit
51431e0042
@ -1,63 +0,0 @@
|
|||||||
import io.calamares.ui 1.0
|
|
||||||
|
|
||||||
import QtQuick 2.10
|
|
||||||
import QtQuick.Controls 2.10
|
|
||||||
import QtQuick.Layouts 1.3
|
|
||||||
import org.kde.kirigami 2.7 as Kirigami
|
|
||||||
|
|
||||||
ItemDelegate {
|
|
||||||
|
|
||||||
id: control
|
|
||||||
|
|
||||||
|
|
||||||
property alias label1 : _label1
|
|
||||||
property alias label2 : _label2
|
|
||||||
|
|
||||||
hoverEnabled: true
|
|
||||||
|
|
||||||
property bool isCurrentItem: ListView.isCurrentItem
|
|
||||||
background: Rectangle {
|
|
||||||
|
|
||||||
color: isCurrentItem || hovered ? Kirigami.Theme.highlightColor : Kirigami.Theme.backgroundColor
|
|
||||||
opacity: isCurrentItem || hovered ? 0.8 : 0.5
|
|
||||||
}
|
|
||||||
|
|
||||||
width: 490 //parent.width
|
|
||||||
height: 36
|
|
||||||
|
|
||||||
contentItem: RowLayout {
|
|
||||||
|
|
||||||
anchors.fill: parent
|
|
||||||
anchors.margins: Kirigami.Units.smallSpacing
|
|
||||||
|
|
||||||
Label {
|
|
||||||
|
|
||||||
id: _label1
|
|
||||||
Layout.fillHeight: true
|
|
||||||
Layout.fillWidth: true
|
|
||||||
horizontalAlignment: Qt.AlignLeft
|
|
||||||
color: isCurrentItem ? Kirigami.Theme.highlightedTextColor : Kirigami.Theme.textColor
|
|
||||||
}
|
|
||||||
|
|
||||||
Label {
|
|
||||||
|
|
||||||
id: _label2
|
|
||||||
visible: text.length
|
|
||||||
Layout.fillHeight: true
|
|
||||||
Layout.maximumWidth: parent.width * 0.4
|
|
||||||
horizontalAlignment: Qt.AlignRight
|
|
||||||
color: isCurrentItem ? Kirigami.Theme.highlightedTextColor : Kirigami.Theme.textColor
|
|
||||||
opacity: isCurrentItem ? 1 : 0.7
|
|
||||||
font.weight: Font.Light
|
|
||||||
}
|
|
||||||
|
|
||||||
Kirigami.Icon {
|
|
||||||
|
|
||||||
source: "checkmark"
|
|
||||||
Layout.preferredWidth: 22
|
|
||||||
Layout.preferredHeight: 22
|
|
||||||
color: Kirigami.Theme.highlightedTextColor
|
|
||||||
visible: isCurrentItem
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,22 +0,0 @@
|
|||||||
import QtQuick 2.10
|
|
||||||
import QtQuick.Controls 2.10
|
|
||||||
import QtQuick.Layouts 1.3
|
|
||||||
import org.kde.kirigami 2.7 as Kirigami
|
|
||||||
|
|
||||||
ListView {
|
|
||||||
|
|
||||||
id: control
|
|
||||||
|
|
||||||
spacing: Kirigami.Units.smallSpacing
|
|
||||||
clip: true
|
|
||||||
boundsBehavior: Flickable.StopAtBounds
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
|
|
||||||
z: parent.z - 1
|
|
||||||
anchors.fill: parent
|
|
||||||
color: "#BDC3C7"
|
|
||||||
radius: 5
|
|
||||||
opacity: 0.7
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,83 +0,0 @@
|
|||||||
import QtQuick 2.10
|
|
||||||
import QtQuick.Controls 2.10
|
|
||||||
import QtQuick.Layouts 1.3
|
|
||||||
import org.kde.kirigami 2.7 as Kirigami
|
|
||||||
import QtGraphicalEffects 1.0
|
|
||||||
|
|
||||||
import io.calamares.ui 1.0
|
|
||||||
import io.calamares.core 1.0
|
|
||||||
|
|
||||||
Page {
|
|
||||||
|
|
||||||
id: control
|
|
||||||
width: 800 //parent.width
|
|
||||||
height: 550 //parent.height
|
|
||||||
|
|
||||||
Kirigami.Theme.backgroundColor: "#FAFAFA"
|
|
||||||
Kirigami.Theme.textColor: "#1F1F1F"
|
|
||||||
|
|
||||||
property string subtitle
|
|
||||||
property string message
|
|
||||||
|
|
||||||
default property alias content : _content.data
|
|
||||||
property alias stackView: _stackView
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
|
|
||||||
id: _content
|
|
||||||
|
|
||||||
anchors.fill: parent
|
|
||||||
spacing: Kirigami.Units.smallSpacing * 5
|
|
||||||
anchors.margins: Kirigami.Units.smallSpacing * 5
|
|
||||||
anchors.bottomMargin: 20
|
|
||||||
|
|
||||||
Label {
|
|
||||||
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.preferredHeight: Math.min(implicitHeight, 200)
|
|
||||||
horizontalAlignment: Qt.AlignHCenter
|
|
||||||
wrapMode: Text.NoWrap
|
|
||||||
elide: Text.ElideMiddle
|
|
||||||
text: control.title
|
|
||||||
color: Kirigami.Theme.textColor
|
|
||||||
font.bold: true
|
|
||||||
font.weight: Font.Bold
|
|
||||||
font.pointSize: 24
|
|
||||||
}
|
|
||||||
|
|
||||||
Label {
|
|
||||||
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.preferredHeight: Math.min(implicitHeight, 200)
|
|
||||||
horizontalAlignment: Qt.AlignHCenter
|
|
||||||
wrapMode: Text.Wrap
|
|
||||||
elide: Text.ElideMiddle
|
|
||||||
text: control.subtitle
|
|
||||||
color: Kirigami.Theme.textColor
|
|
||||||
font.weight: Font.Light
|
|
||||||
font.pointSize: 12
|
|
||||||
}
|
|
||||||
|
|
||||||
Label {
|
|
||||||
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.preferredHeight: Math.min(implicitHeight, 200)
|
|
||||||
horizontalAlignment: Qt.AlignHCenter
|
|
||||||
wrapMode: Text.Wrap
|
|
||||||
elide: Text.ElideMiddle
|
|
||||||
text: control.message
|
|
||||||
color: Kirigami.Theme.textColor
|
|
||||||
font.weight: Font.Light
|
|
||||||
font.pointSize: 10
|
|
||||||
}
|
|
||||||
|
|
||||||
StackView {
|
|
||||||
|
|
||||||
id: _stackView
|
|
||||||
Layout.fillHeight: true
|
|
||||||
Layout.preferredWidth: parent.width
|
|
||||||
clip: true
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue