harbour-seaprint/qml/components/Setting.qml
Anton Thomasson 731db2dd1e Fix pulley going disabled with big ChoiceSettings
If ChoiceSetting uses the LargeChoiceDialog, it would leak an open
empty ContextMenu, which blocks usage of the PullDownMenu.
Add a hasMenu attribute to conditionally not open it.
2021-01-02 17:39:06 +01:00

36 lines
658 B
QML

import QtQuick 2.0
import Sailfish.Silica 1.0
Item {
height: button.height + (menu != undefined ? menu.height : 0)
width: parent.width
property string name
property string prettyName
property int tag
property bool valid: false
property var choice
property var default_choice
signal clicked()
onClicked: {
if (hasMenu)
{
menu.open(this)
}
}
property alias displayValue: button.value
ValueButton {
id: button
enabled: valid
label: prettyName
onClicked: parent.clicked()
}
property var menu
property bool hasMenu: true
}