mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-07-23 17:05:28 +02:00
callbuttons: hide audio only
GitLab: #729 Change-Id: Ib444fdf5515f9242bbe627d695d05fafb16214d6
This commit is contained in:
parent
f8cfb86f6a
commit
08c78f49e7
5 changed files with 27 additions and 3 deletions
|
@ -48,6 +48,7 @@ extern const QString defaultDownloadPath;
|
|||
X(BaseZoom, 1.0) \
|
||||
X(ParticipantsSide, false) \
|
||||
X(HideSelf, false) \
|
||||
X(HideAudioOnly, false) \
|
||||
X(AutoUpdate, true) \
|
||||
X(StartMinimized, false) \
|
||||
X(ShowChatviewHorizontally, true) \
|
||||
|
|
|
@ -76,6 +76,7 @@ class GenericParticipantsFilterModel final : public QSortFilterProxyModel
|
|||
{
|
||||
Q_OBJECT
|
||||
QML_PROPERTY(bool, hideSelf)
|
||||
QML_PROPERTY(bool, hideAudioOnly)
|
||||
|
||||
public:
|
||||
explicit GenericParticipantsFilterModel(LRCInstance* lrcInstance,
|
||||
|
@ -98,6 +99,11 @@ public:
|
|||
sourceModel()->rowCount() > 1 &&
|
||||
sourceModel()->data(index, CallParticipant::Role::IsLocal).toBool())
|
||||
acceptState = false;
|
||||
if (acceptState &&
|
||||
hideAudioOnly_ &&
|
||||
sourceModel()->rowCount() > 1 &&
|
||||
sourceModel()->data(index, CallParticipant::Role::VideoMuted).toBool())
|
||||
acceptState = false;
|
||||
|
||||
return acceptState;
|
||||
}
|
||||
|
|
|
@ -253,6 +253,7 @@ Item {
|
|||
property string participantsSide: qsTr("On the side")
|
||||
property string participantsTop: qsTr("On the top")
|
||||
property string hideSelf: qsTr("Hide self")
|
||||
property string hideAudioOnly: qsTr("Hide participant without video")
|
||||
|
||||
// LineEditContextMenu
|
||||
property string copy: qsTr("Copy")
|
||||
|
|
|
@ -176,19 +176,25 @@ Control {
|
|||
case JamiStrings.hideSelf:
|
||||
UtilsAdapter.setAppValue(Settings.HideSelf, !layoutModel.get(index).ActiveSetting)
|
||||
GenericParticipantsFilterModel.hideSelf = UtilsAdapter.getAppValue(Settings.HideSelf)
|
||||
GenericParticipantsFilterModel.hideAudioOnly = UtilsAdapter.getAppValue(Settings.HideAudioOnly)
|
||||
GenericParticipantsFilterModel.reset()
|
||||
break
|
||||
case JamiStrings.hideAudioOnly:
|
||||
UtilsAdapter.setAppValue(Settings.HideAudioOnly, !layoutModel.get(index).ActiveSetting)
|
||||
GenericParticipantsFilterModel.hideSelf = UtilsAdapter.getAppValue(Settings.HideSelf)
|
||||
GenericParticipantsFilterModel.hideAudioOnly = UtilsAdapter.getAppValue(Settings.HideAudioOnly)
|
||||
GenericParticipantsFilterModel.reset()
|
||||
break
|
||||
}
|
||||
}
|
||||
onTriggered: {
|
||||
layoutModel.clear()
|
||||
if (!isGrid && isConference) {
|
||||
if (isConference) {
|
||||
layoutModel.append({"Name": JamiStrings.mosaic,
|
||||
"IconSource": JamiResources.mosaic_black_24dp_svg,
|
||||
"ActiveSetting": isGrid})
|
||||
layoutModel.append({})
|
||||
}
|
||||
if (isConference) {
|
||||
|
||||
var onTheSide = UtilsAdapter.getAppValue(Settings.ParticipantsSide)
|
||||
layoutModel.append({"Name": onTheSide ? JamiStrings.participantsSide : JamiStrings.participantsTop,
|
||||
"IconSource": onTheSide ? JamiResources.ontheside_black_24dp_svg : JamiResources.onthetop_black_24dp_svg,
|
||||
|
@ -202,6 +208,12 @@ Control {
|
|||
layoutModel.append({"Name": JamiStrings.viewFullScreen,
|
||||
"IconSource": JamiResources.open_in_full_24dp_svg,
|
||||
"ActiveSetting": layoutManager.isCallFullscreen})
|
||||
if (isConference) {
|
||||
layoutModel.append({})
|
||||
layoutModel.append({"Name": JamiStrings.hideAudioOnly,
|
||||
"IconSource": JamiResources.videocam_off_24dp_svg,
|
||||
"ActiveSetting": UtilsAdapter.getAppValue(Settings.HideAudioOnly)})
|
||||
}
|
||||
}
|
||||
},
|
||||
Action {
|
||||
|
|
|
@ -37,6 +37,7 @@ Item {
|
|||
|
||||
onVisibleChanged: {
|
||||
GenericParticipantsFilterModel.hideSelf = UtilsAdapter.getAppValue(Settings.HideSelf)
|
||||
GenericParticipantsFilterModel.hideAudioOnly = UtilsAdapter.getAppValue(Settings.HideAudioOnly)
|
||||
}
|
||||
|
||||
Connections {
|
||||
|
@ -45,6 +46,9 @@ Item {
|
|||
function onHideSelfChanged() {
|
||||
GenericParticipantsFilterModel.reset()
|
||||
}
|
||||
function onHideAudioOnlyChanged() {
|
||||
GenericParticipantsFilterModel.reset()
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
|
|
Loading…
Add table
Reference in a new issue