- implemented new delegates
This commit is contained in:
parent
d4756e54b8
commit
a5ef26277e
1 changed files with 23 additions and 41 deletions
|
@ -211,7 +211,7 @@ Popup {
|
||||||
top: parent.top
|
top: parent.top
|
||||||
left: parent.left
|
left: parent.left
|
||||||
leftMargin: ( parent.width - headlineUnderline.width ) / 2
|
leftMargin: ( parent.width - headlineUnderline.width ) / 2
|
||||||
topMargin: headlineUnderline.anchors.topMargin * 0.8
|
topMargin: headlineUnderline.anchors.topMargin * 0.95
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -248,36 +248,15 @@ Popup {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----Style Settings----*/
|
/*----Style Settings----*/
|
||||||
ItemDelegate {
|
SmoothSwitchDelegate {
|
||||||
id: style_del
|
id: styleDel
|
||||||
text: qsTr("change style")
|
text: qsTr("dark mode")
|
||||||
width: parent.width
|
|
||||||
|
|
||||||
contentItem: Text {
|
checked: speedBackend.readSetting("theme") === "Dark"
|
||||||
text: parent.text
|
|
||||||
color: appTheme.style.textColor
|
|
||||||
font.pixelSize: options_stack.text_pixelSize
|
|
||||||
}
|
|
||||||
|
|
||||||
onClicked: {
|
onCheckedChanged: {
|
||||||
appTheme.changeTheme()
|
speedBackend.writeSetting("theme", checked ? "Dark":"Light")
|
||||||
}
|
appTheme.refreshTheme()
|
||||||
}
|
|
||||||
|
|
||||||
/*----Error Dialog----*/
|
|
||||||
ItemDelegate {
|
|
||||||
id: error_del
|
|
||||||
text: qsTr("open error popup")
|
|
||||||
width: parent.width
|
|
||||||
|
|
||||||
contentItem: Text {
|
|
||||||
text: parent.text
|
|
||||||
color: appTheme.style.textColor
|
|
||||||
font.pixelSize: options_stack.text_pixelSize
|
|
||||||
}
|
|
||||||
|
|
||||||
onClicked: {
|
|
||||||
errorDialog.open()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -300,7 +279,7 @@ Popup {
|
||||||
type: "baseStation"
|
type: "baseStation"
|
||||||
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
font.pixelSize: options_stack.text_pixelSize
|
font.pixelSize: height * 0.6
|
||||||
}
|
}
|
||||||
|
|
||||||
NextPageDelegate {
|
NextPageDelegate {
|
||||||
|
@ -340,7 +319,7 @@ Popup {
|
||||||
return val
|
return val
|
||||||
}
|
}
|
||||||
|
|
||||||
SwitchDelegate {
|
SmoothSwitchDelegate {
|
||||||
id: ready_del
|
id: ready_del
|
||||||
text: qsTr("say 'ready'")
|
text: qsTr("say 'ready'")
|
||||||
contentItem: Text {
|
contentItem: Text {
|
||||||
|
@ -363,7 +342,7 @@ Popup {
|
||||||
indicator: SimpleIndicator{}
|
indicator: SimpleIndicator{}
|
||||||
}
|
}
|
||||||
|
|
||||||
ItemDelegate {
|
SmoothItemDelegate {
|
||||||
id: ready_delay_del
|
id: ready_delay_del
|
||||||
text: qsTr("delay (ms)")
|
text: qsTr("delay (ms)")
|
||||||
contentItem: Text {
|
contentItem: Text {
|
||||||
|
@ -394,7 +373,7 @@ Popup {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SwitchDelegate {
|
SmoothSwitchDelegate {
|
||||||
id: at_marks_del
|
id: at_marks_del
|
||||||
text: qsTr("say\n'at your marks'")
|
text: qsTr("say\n'at your marks'")
|
||||||
contentItem: Text {
|
contentItem: Text {
|
||||||
|
@ -416,7 +395,7 @@ Popup {
|
||||||
indicator: SimpleIndicator{}
|
indicator: SimpleIndicator{}
|
||||||
}
|
}
|
||||||
|
|
||||||
ItemDelegate {
|
SmoothItemDelegate {
|
||||||
id: at_marks_delay_del
|
id: at_marks_delay_del
|
||||||
text: qsTr("delay (ms)")
|
text: qsTr("delay (ms)")
|
||||||
contentItem: Text {
|
contentItem: Text {
|
||||||
|
@ -457,12 +436,15 @@ Popup {
|
||||||
id: baseStationConnections_list
|
id: baseStationConnections_list
|
||||||
property string title: qsTr("connections")
|
property string title: qsTr("connections")
|
||||||
property int delegateHeight: height * 0.18
|
property int delegateHeight: height * 0.18
|
||||||
|
|
||||||
|
boundsBehavior: Flickable.StopAtBounds
|
||||||
|
|
||||||
model: speedBackend.baseStationConnections.length
|
model: speedBackend.baseStationConnections.length
|
||||||
delegate: ConnectionDelegate {
|
delegate: ConnectionDelegate {
|
||||||
enabled: false
|
enabled: false
|
||||||
font.pixelSize: options_stack.text_pixelSize
|
font.pixelSize: height * 0.6
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: baseStationConnections_list.delegateHeight
|
//height: baseStationConnections_list.delegateHeight
|
||||||
|
|
||||||
text: speedBackend.baseStationConnections[index]["name"]
|
text: speedBackend.baseStationConnections[index]["name"]
|
||||||
status: {'status': speedBackend.baseStationConnections[index]["state"], 'progress': speedBackend.baseStationConnections[index]["progress"]}
|
status: {'status': speedBackend.baseStationConnections[index]["state"], 'progress': speedBackend.baseStationConnections[index]["progress"]}
|
||||||
|
@ -477,7 +459,7 @@ Popup {
|
||||||
property: "opacity"
|
property: "opacity"
|
||||||
from: 0
|
from: 0
|
||||||
to: 1
|
to: 1
|
||||||
duration: 200
|
duration: 300
|
||||||
easing.type: Easing.InOutQuad
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -486,7 +468,7 @@ Popup {
|
||||||
property: "opacity"
|
property: "opacity"
|
||||||
from: 1
|
from: 1
|
||||||
to: 0
|
to: 0
|
||||||
duration: 200
|
duration: 300
|
||||||
easing.type: Easing.InOutQuad
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -496,7 +478,7 @@ Popup {
|
||||||
property: "opacity"
|
property: "opacity"
|
||||||
from: 1
|
from: 1
|
||||||
to: 0
|
to: 0
|
||||||
duration: 200
|
duration: 300
|
||||||
easing.type: Easing.InOutQuad
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -505,7 +487,7 @@ Popup {
|
||||||
property: "opacity"
|
property: "opacity"
|
||||||
from: 0
|
from: 0
|
||||||
to: 1
|
to: 1
|
||||||
duration: 200
|
duration: 300
|
||||||
easing.type: Easing.InOutQuad
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue