Hide participant view in ICS when there is none.

This commit is contained in:
Julien Wadel 2022-11-17 12:18:06 +01:00
parent f924a17055
commit ba2d41365e
3 changed files with 7 additions and 3 deletions

View file

@ -49,6 +49,7 @@ public:
Q_PROPERTY(QString uri READ getUri NOTIFY uriChanged) Q_PROPERTY(QString uri READ getUri NOTIFY uriChanged)
Q_PROPERTY(bool isScheduled READ isScheduled WRITE setIsScheduled NOTIFY isScheduledChanged) Q_PROPERTY(bool isScheduled READ isScheduled WRITE setIsScheduled NOTIFY isScheduledChanged)
Q_PROPERTY(int inviteMode READ getInviteMode WRITE setInviteMode NOTIFY inviteModeChanged) Q_PROPERTY(int inviteMode READ getInviteMode WRITE setInviteMode NOTIFY inviteModeChanged)
Q_PROPERTY(int participantCount READ getParticipantCount NOTIFY participantsChanged)
Q_PROPERTY(LinphoneEnums::ConferenceInfoState state READ getConferenceInfoState NOTIFY conferenceInfoStateChanged) Q_PROPERTY(LinphoneEnums::ConferenceInfoState state READ getConferenceInfoState NOTIFY conferenceInfoStateChanged)
Q_PROPERTY(LinphoneEnums::ConferenceSchedulerState conferenceSchedulerState READ getConferenceSchedulerState NOTIFY conferenceSchedulerStateChanged) Q_PROPERTY(LinphoneEnums::ConferenceSchedulerState conferenceSchedulerState READ getConferenceSchedulerState NOTIFY conferenceSchedulerStateChanged)

View file

@ -179,6 +179,8 @@ Loader{
Layout.preferredHeight: parent.participantLineHeight Layout.preferredHeight: parent.participantLineHeight
Layout.preferredWidth: ChatCalendarMessageStyle.participants.iconSize Layout.preferredWidth: ChatCalendarMessageStyle.participants.iconSize
Layout.alignment: Qt.AlignTop Layout.alignment: Qt.AlignTop
visible: mainItem.conferenceInfoModel.participantCount > 0
clip: false clip: false
Icon{ Icon{
anchors.top: parent.top anchors.top: parent.top

View file

@ -109,12 +109,14 @@ Loader{
} }
RowLayout { RowLayout {
id: participantsRow id: participantsRow
property int participantCount: mainItem.conferenceInfoModel.participantCount
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: ChatCalendarMessageStyle.participants.iconSize Layout.preferredHeight: ChatCalendarMessageStyle.participants.iconSize
Layout.leftMargin: 5 Layout.leftMargin: 5
Layout.rightMargin: 15 Layout.rightMargin: 15
spacing: ChatCalendarMessageStyle.participants.spacing spacing: ChatCalendarMessageStyle.participants.spacing
visible: participantsRow.participantCount > 0
Icon{ Icon{
icon: ChatCalendarMessageStyle.participants.icon icon: ChatCalendarMessageStyle.participants.icon
@ -124,13 +126,12 @@ Loader{
Text { Text {
id: participantsList id: participantsList
property int participantCount: mainItem.conferenceInfoModel.getParticipantCount()
Layout.fillWidth: true Layout.fillWidth: true
color: ChatCalendarMessageStyle.participants.color color: ChatCalendarMessageStyle.participants.color
elide: Text.ElideRight elide: Text.ElideRight
font.pointSize: ChatCalendarMessageStyle.participants.pointSize font.pointSize: ChatCalendarMessageStyle.participants.pointSize
//: '%1 participant' : number(=%1) of participant. //: '%1 participant' : number(=%1) of participant.
text: qsTr('icsParticipants', '', participantCount).arg(participantCount) text: qsTr('icsParticipants', '', participantsRow.participantCount).arg(participantsRow.participantCount)
} }
} }
ColumnLayout{ ColumnLayout{