fix #LINQT-1407 close numeric pad

delegate mousearea color + padding

fix #LINQT-1408 reset call notif on pressed

try to fix notif coordinates #LINQT-1415
This commit is contained in:
Gaelle Braud 2024-11-13 11:44:45 +01:00 committed by gaelle
parent 10ab8395f7
commit 9c36745673
6 changed files with 127 additions and 127 deletions

View file

@ -17,14 +17,6 @@ Control.TabBar {
onDefaultAccountChanged: { onDefaultAccountChanged: {
if (defaultAccount) defaultAccount.core?.lRefreshNotifications() if (defaultAccount) defaultAccount.core?.lRefreshNotifications()
} }
Connections {
enabled: defaultAccount
target: defaultAccount.core
onUnreadCallNotificationsChanged: {
console.log("unread changed", currentIndex)
if (currentIndex === 0) defaultAccount?.core.lResetMissedCalls()
}
}
component UnreadNotification: Rectangle { component UnreadNotification: Rectangle {
id: unreadNotifications id: unreadNotifications

View file

@ -181,11 +181,13 @@ ListView {
id: contactDelegate id: contactDelegate
anchors.left: initial.visible ? initial.right : parent.left anchors.left: initial.visible ? initial.right : parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: 5 * DefaultStyle.dp anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
spacing: 16 * DefaultStyle.dp spacing: 16 * DefaultStyle.dp
z: 1 z: 1
Avatar { Avatar {
Layout.leftMargin: 5 * DefaultStyle.dp
Layout.preferredWidth: 45 * DefaultStyle.dp Layout.preferredWidth: 45 * DefaultStyle.dp
Layout.preferredHeight: 45 * DefaultStyle.dp Layout.preferredHeight: 45 * DefaultStyle.dp
contact: modelData contact: modelData
@ -344,8 +346,6 @@ ListView {
} }
} }
MouseArea { MouseArea {
id: contactArea id: contactArea
enabled: mainItem.selectionEnabled enabled: mainItem.selectionEnabled
@ -358,7 +358,8 @@ ListView {
Rectangle { Rectangle {
anchors.fill: contactArea anchors.fill: contactArea
opacity: 0.7 opacity: 0.7
color: DefaultStyle.main2_100 radius: 8 * DefaultStyle.dp
color: mainItem.currentIndex === index ? DefaultStyle.main2_200 : DefaultStyle.main2_100
visible: contactArea.containsMouse || friendPopup.hovered || mainItem.currentIndex === index visible: contactArea.containsMouse || friendPopup.hovered || mainItem.currentIndex === index
} }
Keys.onPressed: (event)=> { Keys.onPressed: (event)=> {

View file

@ -7,8 +7,8 @@ import UtilsCpp
Notification { Notification {
id: mainItem id: mainItem
radius: 20 * DefaultStyle.dp radius: 20 * DefaultStyle.dp
overriddenWidth: content.implicitWidth//101 * DefaultStyle.dp overriddenWidth: content.width//101 * DefaultStyle.dp
overriddenHeight: content.implicitHeight//422 * DefaultStyle.dp overriddenHeight: content.height//422 * DefaultStyle.dp
readonly property var call: notificationData && notificationData.call readonly property var call: notificationData && notificationData.call
property var state: call.core.state property var state: call.core.state

View file

@ -20,6 +20,7 @@ FocusScope {
signal transferCallToAnotherRequested(CallGui dest) signal transferCallToAnotherRequested(CallGui dest)
signal contactClicked(FriendGui contact) signal contactClicked(FriendGui contact)
clip: true clip: true
onVisibleChanged: if (numPadPopup.opened) numPadPopup.close()
ColumnLayout { ColumnLayout {
anchors.fill: parent anchors.fill: parent

View file

@ -78,6 +78,16 @@ Item {
sourceModel: AppCpp.calls sourceModel: AppCpp.calls
} }
MouseArea {
anchors.fill: parent
focus: true
z: 100
onPressed: {
if (mainStackView.currentItem.objectName === "mainStackLayout" && mainStackView.currentItem.currentIndex === 0
&& accountProxy.defaultAccount && accountProxy.defaultAccount.core.unreadCallNotifications > 0) accountProxy.defaultAccount.core.lResetMissedCalls()
mouse.accepted = false
}
}
Item{ Item{
Popup { Popup {
@ -612,6 +622,7 @@ Item {
id: mainStackLayoutComponent id: mainStackLayoutComponent
StackLayout { StackLayout {
id: mainStackLayout id: mainStackLayout
objectName: "mainStackLayout"
currentIndex: tabbar.currentIndex currentIndex: tabbar.currentIndex
onActiveFocusChanged: if(activeFocus && currentIndex >= 0) children[currentIndex].forceActiveFocus() onActiveFocusChanged: if(activeFocus && currentIndex >= 0) children[currentIndex].forceActiveFocus()
CallPage { CallPage {

View file

@ -284,6 +284,8 @@ AbstractMainPage {
RowLayout { RowLayout {
z: 1 z: 1
anchors.fill: parent anchors.fill: parent
anchors.leftMargin: 5 * DefaultStyle.dp
anchors.rightMargin: 5 * DefaultStyle.dp
spacing: 10 * DefaultStyle.dp spacing: 10 * DefaultStyle.dp
Avatar { Avatar {
id: historyAvatar id: historyAvatar
@ -353,7 +355,6 @@ AbstractMainPage {
} }
} }
Button { Button {
Layout.rightMargin: 5 * DefaultStyle.dp
padding: 0 padding: 0
background: Item { background: Item {
visible: false visible: false
@ -384,14 +385,10 @@ AbstractMainPage {
focus: true focus: true
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
opacity: 0.1 opacity: 0.7
color: DefaultStyle.main2_500main radius: 8 * DefaultStyle.dp
visible: parent.containsMouse color: historyListView.currentIndex === index ? DefaultStyle.main2_200 : DefaultStyle.main2_100
} visible: parent.containsMouse || historyListView.currentIndex === index
Rectangle {
anchors.fill: parent
visible: historyListView.currentIndex === model.index
color: DefaultStyle.main2_100
} }
onPressed: { onPressed: {
historyListView.currentIndex = model.index historyListView.currentIndex = model.index
@ -399,8 +396,6 @@ AbstractMainPage {
} }
} }
} }
//}
//}
onCurrentIndexChanged: { onCurrentIndexChanged: {
positionViewAtIndex(currentIndex, ListView.Visible) positionViewAtIndex(currentIndex, ListView.Visible)
mainItem.selectedRowHistoryGui = model.getAt(currentIndex) mainItem.selectedRowHistoryGui = model.getAt(currentIndex)