minor fixess
This commit is contained in:
@@ -5,10 +5,31 @@ import QtQuick.Layouts 1.12
|
||||
Dialog {
|
||||
id: editorDialog
|
||||
modal: true
|
||||
parent: Overlay.overlay
|
||||
title: editId === "" ? "Новая кнопка" : "Редактирование"
|
||||
anchors.centerIn: parent
|
||||
width: Math.min(520, parent ? parent.width * 0.95 : 520)
|
||||
height: Math.min(560, parent ? parent.height * 0.9 : 560)
|
||||
standardButtons: Dialog.Ok | Dialog.Cancel
|
||||
|
||||
readonly property color panelBg: "#161628"
|
||||
readonly property color panelFg: "#ffffff"
|
||||
readonly property color controlBg: "#2a2a40"
|
||||
|
||||
palette.button: controlBg
|
||||
palette.buttonText: panelFg
|
||||
palette.window: panelBg
|
||||
palette.windowText: panelFg
|
||||
palette.text: panelFg
|
||||
palette.base: "#222236"
|
||||
palette.highlight: "#4a4a70"
|
||||
palette.highlightedText: panelFg
|
||||
|
||||
background: Rectangle {
|
||||
color: panelBg
|
||||
radius: 4
|
||||
}
|
||||
|
||||
property string editId: ""
|
||||
property bool responseCheckWasEnabled: false
|
||||
|
||||
@@ -53,17 +74,22 @@ Dialog {
|
||||
open()
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
spacing: 6
|
||||
TextField {
|
||||
contentItem: ScrollView {
|
||||
id: scroll
|
||||
clip: true
|
||||
ScrollBar.vertical.policy: ScrollBar.AsNeeded
|
||||
|
||||
ColumnLayout {
|
||||
width: scroll.availableWidth
|
||||
spacing: 6
|
||||
TextField {
|
||||
id: labelF
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Подпись"
|
||||
}
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
Text { text: "Иконка:"; color: settingsContainer.darkMode ? "white" : "black" }
|
||||
Text { text: "Иконка:"; color: editorDialog.panelFg }
|
||||
ComboBox {
|
||||
id: iconCombo
|
||||
Layout.fillWidth: true
|
||||
@@ -76,7 +102,7 @@ Dialog {
|
||||
}
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
Text { text: "Метод:"; color: settingsContainer.darkMode ? "white" : "black" }
|
||||
Text { text: "Метод:"; color: editorDialog.panelFg }
|
||||
ComboBox {
|
||||
id: typeCombo
|
||||
model: ["http_get", "http_post"]
|
||||
@@ -104,7 +130,7 @@ Dialog {
|
||||
}
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
Text { text: "Цвет:"; color: settingsContainer.darkMode ? "white" : "black" }
|
||||
Text { text: "Цвет:"; color: editorDialog.panelFg }
|
||||
TextField {
|
||||
id: colorF
|
||||
Layout.fillWidth: true
|
||||
@@ -119,14 +145,14 @@ Dialog {
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
Text { text: "Срабатывание:"; color: settingsContainer.darkMode ? "white" : "black" }
|
||||
Text { text: "Срабатывание:"; color: editorDialog.panelFg }
|
||||
Switch {
|
||||
id: holdSwitch
|
||||
checked: true
|
||||
}
|
||||
Text {
|
||||
text: holdSwitch.checked ? "Удержание" : "Клик"
|
||||
color: settingsContainer.darkMode ? "#cccccc" : "#444444"
|
||||
color: "#cccccc"
|
||||
}
|
||||
Item { Layout.fillWidth: true }
|
||||
}
|
||||
@@ -136,7 +162,7 @@ Dialog {
|
||||
visible: holdSwitch.checked
|
||||
Text {
|
||||
text: "Длительность: " + Math.round(holdSlider.value) + " мс"
|
||||
color: settingsContainer.darkMode ? "white" : "black"
|
||||
color: editorDialog.panelFg
|
||||
Layout.preferredWidth: 180
|
||||
}
|
||||
Slider {
|
||||
@@ -149,16 +175,17 @@ Dialog {
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
Text { text: "Расширенная проверка:"; color: settingsContainer.darkMode ? "white" : "black" }
|
||||
Text { text: "Расширенная проверка:"; color: editorDialog.panelFg }
|
||||
Switch { id: responseCheckSwitch }
|
||||
Text {
|
||||
Layout.fillWidth: true
|
||||
text: "Правила JSON — в веб-конфигураторе"
|
||||
color: settingsContainer.darkMode ? "#cccccc" : "#444444"
|
||||
color: "#cccccc"
|
||||
font.pixelSize: 11
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onAccepted: {
|
||||
|
||||
Reference in New Issue
Block a user