linux.x86.linphone/Linphone/view/Item/PopupButton.qml
Gaelle Braud a2154a6c7b FIXES:
contact list
generic VariantList
FriendModel resetAddresses
check null default account
address list update on save
generic item for white background lists
ui
fix set photo friend
protect friendmodel setters
remove main splitview to stick to the mock-up (keeping it commented cause it may be useful to be able to resize the panels)
default image avatar
fix crash when address not set
fix ui in call
Really fix call variantobject destroying himself before call started
fix: display suggestions
fix list view current item always reset cause updated every time contact history list changed
fix blinking call log list view on content changed
fix popup button popup y when exceed window
delete contact confirmation popup
fix popup call contact list
don't show popup if only one address possible
set/remove default address if append/remove from address list
2024-02-07 10:46:17 +01:00

71 lines
No EOL
1.5 KiB
QML

import QtQuick
import QtQuick.Controls 2.2 as Control
import QtQuick.Effects
import Linphone
Button {
id: mainItem
property alias popup: popup
checked: popup.visible
implicitWidth: 24 * DefaultStyle.dp
implicitHeight: 24 * DefaultStyle.dp
leftPadding: 0
rightPadding: 0
topPadding: 0
bottomPadding: 0
function close() {
popup.close()
}
background: Rectangle {
anchors.fill: mainItem
visible: mainItem.checked
color: DefaultStyle.main2_300
radius: 40 * DefaultStyle.dp
}
contentItem: Image {
source: AppIcons.more
sourceSize.width: 24 * DefaultStyle.dp
sourceSize.height: 24 * DefaultStyle.dp
width: 24 * DefaultStyle.dp
height: 24 * DefaultStyle.dp
}
onPressed: {
if (popup.visible) popup.close()
else popup.open()
}
Control.Popup {
id: popup
x: - width
y: mainItem.height
closePolicy: Popup.CloseOnPressOutsideParent |Popup.CloseOnPressOutside
onAboutToShow: {
var coord = mapToGlobal(mainItem.x, mainItem.y)
if (coord.y + popup.height >= mainApplicationWindow.height) {
y = -popup.height
} else {
y = mainItem.height
}
}
padding: 20 * DefaultStyle.dp
background: Item {
anchors.fill: parent
Rectangle {
id: callOptionsMenuPopup
anchors.fill: parent
color: DefaultStyle.grey_0
radius: 16 * DefaultStyle.dp
}
MultiEffect {
source: callOptionsMenuPopup
anchors.fill: callOptionsMenuPopup
shadowEnabled: true
shadowBlur: 1
shadowColor: DefaultStyle.grey_900
shadowOpacity: 0.4
}
}
}
}