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