mirror of https://github.com/cutefishos/calamares
[keyboard] fully functional QML module
added missing components listed as ResponsiveBase, ListItemDelegate & ListViewTemplate parts of which were on nitrux keyboard.qml no longer uses buttons within ListView, can't work as buttons and have them visible see https://doc.qt.io/qt-5/qml-qtquick-listview.html#footerPositioning-prop set ListView as actually visible within a normal calamares window sizemain
parent
5da2012465
commit
ccff4edd91
@ -0,0 +1,63 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
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: Kirigami.Theme.backgroundColor
|
||||
radius: 5
|
||||
opacity: 0.7
|
||||
}
|
||||
}
|
@ -0,0 +1,116 @@
|
||||
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: "#333"
|
||||
|
||||
property string subtitle
|
||||
property string message
|
||||
|
||||
default property alias content : _content.data
|
||||
property alias stackView: _stackView
|
||||
|
||||
background: Item {
|
||||
|
||||
id: _background
|
||||
|
||||
Image {
|
||||
|
||||
id: _wallpaper
|
||||
height: parent.height
|
||||
width: parent.width
|
||||
|
||||
sourceSize.width: 800
|
||||
sourceSize.height: 550
|
||||
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
antialiasing: false
|
||||
smooth: false
|
||||
asynchronous: true
|
||||
cache: true
|
||||
|
||||
source: "keyboard.jpg"
|
||||
}
|
||||
|
||||
FastBlur {
|
||||
|
||||
id: fastBlur
|
||||
anchors.fill: parent
|
||||
source: _wallpaper
|
||||
radius: 32
|
||||
transparentBorder: false
|
||||
cached: true
|
||||
}
|
||||
}
|
||||
|
||||
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: "white"
|
||||
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: "white"
|
||||
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: "white"
|
||||
font.weight: Font.Light
|
||||
font.pointSize: 10
|
||||
}
|
||||
|
||||
StackView {
|
||||
|
||||
id: _stackView
|
||||
Layout.fillHeight: true
|
||||
Layout.preferredWidth: parent.width
|
||||
clip: true
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 101 KiB |
Loading…
Reference in New Issue