import QtQuick import QtQuick.Layouts import QtQuick.Controls Popup { id: root property int parentWidth: 0 property int parentHeight: 0 x: parentWidth - width y: parentHeight + 6 width: 190 padding: 12 modal: false closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside background: Rectangle { color: Theme.color1 radius: 3 border.width: 1 border.color: Theme.color4 } component RadioBtn: RadioButton { id: radio padding: 8 contentItem: Text { text: radio.text color: Theme.color2 font.pixelSize: 13 leftPadding: 24 verticalAlignment: Text.AlignVCenter } indicator: Rectangle { implicitWidth: 16 implicitHeight: 16 x: 8 y: (radio.height - height) / 2 radius: 3 color: Theme.colorTransparent border.width: 1 border.color: radio.checked ? Theme.color6 : Theme.color3 Rectangle { anchors.centerIn: parent width: 8 height: 8 radius: 3 color: Theme.color6 visible: radio.checked } } } contentItem: ColumnLayout { spacing: 6 Label { text: "Способ обновления" color: Theme.color3 font.pixelSize: 11 Layout.fillWidth: true } RadioBtn { id: yayRadio text: "yay" } RadioBtn { id: pacmanRadio text: "pacman" } Rectangle { Layout.fillWidth: true Layout.topMargin: 2 Layout.preferredHeight: 1 color: Theme.color4 } // Пункт меню «История»: открывает список завершённых заданий. Button { id: historyButton text: "История" Layout.fillWidth: true leftPadding: 8 rightPadding: 8 topPadding: 8 bottomPadding: 8 onClicked: { root.close() } background: Rectangle { radius: 3 color: historyButton.down ? Theme.color4 : historyButton.hovered ? Theme.color5 : Theme.colorTransparent } contentItem: Text { text: historyButton.text font.pixelSize: 13 color: Theme.color2 horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter } } } }