Http Version - Fix to show error when requests fail, and changed display type of distance in UI from float to Int

This commit is contained in:
unrealdragon 2026-08-12 14:32:54 +05:30
commit e1d57eae32

View file

@ -10,6 +10,8 @@ Rectangle {
property int font_enlarged_text_size: 20
property int font_normal_text_size: 16
property string text: "Connect"
property string text2: "Stop"
property int mode: 0
signal connect;
layer.enabled: true
layer.effect: MultiEffect {
@ -20,7 +22,7 @@ Rectangle {
anchors.centerIn: parent
font.pointSize: root.font_enlarged_text_size
color: root.font_color
text: root.text
text: mode ? root.text2 : root.text
horizontalAlignment: Text.AlignHCenter
}
@ -46,10 +48,16 @@ Rectangle {
settings_rect_pressed_prev = root.color
root.color = "#5A1F4F1F"
root.connect();
switchMode();
}
onReleased: {
root.color = settings_rect_pressed_prev
}
}
function switchMode() {
if(root.mode === 0)
root.mode = 1
else
root.mode = 0;
}
}