linphone-desktop/tests/ui/modules/Linphone/Popup/DropDownMenu.qml
Ronan Abhamon 421eae38a3 feat(app): many changes:
- InvertedMouseArea use a asynchronous call on pressed event
- ListForm use an external style
- ListForm supports outside click
- ...
2016-09-28 17:31:09 +02:00

39 lines
857 B
QML

import QtQuick 2.7
import Linphone.Styles 1.0
// ===================================================================
// Low component to display a list/menu in a popup.
// ===================================================================
Rectangle {
default property alias content: content.data
property int entryHeight
property int maxMenuHeight
function show () {
visible = true
}
function hide () {
visible = false
}
// Ugly. Just ugly.
// `model` is a reference on a unknown component!
// See usage with SearchBox.
implicitHeight: {
var height = model.count * entryHeight
return height > maxMenuHeight ? maxMenuHeight : height
}
visible: false
Rectangle {
id: content
anchors.fill: parent
color: PopupStyle.backgroundColor
layer.enabled: true
layer.effect: PopupShadow { }
}
}