mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-04 14:55:43 +02:00
callbuttons: hide self
GitLab: #729 Change-Id: I59ec525d181ec1d6655a0e9889728bd6b9128721
This commit is contained in:
parent
824ba581c8
commit
f8cfb86f6a
8 changed files with 54 additions and 10 deletions
9
resources/icons/hidemyself_black_24dp.svg
Normal file
9
resources/icons/hidemyself_black_24dp.svg
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
|
||||||
|
<path d="M18.3,2H5.8C3.7,2,2,3.7,2,5.8v12.4C2,20.3,3.7,22,5.8,22h12.4c2.1,0,3.8-1.7,3.8-3.7V5.8C22,3.7,20.3,2,18.3,2z M3.5,5.7
|
||||||
|
c0-1.2,1-2.2,2.3-2.2h5.5V11H3.5V5.7z M11.3,12.5L11.3,12.5L11.3,12.5L11.3,12.5z M3.5,12.5h6.7l-6.6,6.6c-0.1-0.3-0.2-0.6-0.2-0.9
|
||||||
|
V12.5z M5.8,20.5c-0.4,0-0.8-0.1-1.1-0.3l6.6-6.6v6.9H5.8z M20.6,18.2c0,1.3-1,2.3-2.3,2.3h-5.5v-8h7.8V18.2z M20.6,11h-7.8V3.5h5.5
|
||||||
|
c1.3,0,2.3,1,2.3,2.3V11z"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 765 B |
|
@ -47,6 +47,7 @@ extern const QString defaultDownloadPath;
|
||||||
X(EnableDarkTheme, false) \
|
X(EnableDarkTheme, false) \
|
||||||
X(BaseZoom, 1.0) \
|
X(BaseZoom, 1.0) \
|
||||||
X(ParticipantsSide, false) \
|
X(ParticipantsSide, false) \
|
||||||
|
X(HideSelf, false) \
|
||||||
X(AutoUpdate, true) \
|
X(AutoUpdate, true) \
|
||||||
X(StartMinimized, false) \
|
X(StartMinimized, false) \
|
||||||
X(ShowChatviewHorizontally, true) \
|
X(ShowChatviewHorizontally, true) \
|
||||||
|
|
|
@ -75,6 +75,7 @@ struct Item
|
||||||
class GenericParticipantsFilterModel final : public QSortFilterProxyModel
|
class GenericParticipantsFilterModel final : public QSortFilterProxyModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
QML_PROPERTY(bool, hideSelf)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit GenericParticipantsFilterModel(LRCInstance* lrcInstance,
|
explicit GenericParticipantsFilterModel(LRCInstance* lrcInstance,
|
||||||
|
@ -90,7 +91,15 @@ public:
|
||||||
{
|
{
|
||||||
// Accept all participants in participants list filtered with active status.
|
// Accept all participants in participants list filtered with active status.
|
||||||
auto index = sourceModel()->index(sourceRow, 0, sourceParent);
|
auto index = sourceModel()->index(sourceRow, 0, sourceParent);
|
||||||
return !sourceModel()->data(index, CallParticipant::Role::Active).toBool();
|
|
||||||
|
bool acceptState = !sourceModel()->data(index, CallParticipant::Role::Active).toBool();
|
||||||
|
if (acceptState &&
|
||||||
|
hideSelf_ &&
|
||||||
|
sourceModel()->rowCount() > 1 &&
|
||||||
|
sourceModel()->data(index, CallParticipant::Role::IsLocal).toBool())
|
||||||
|
acceptState = false;
|
||||||
|
|
||||||
|
return acceptState;
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_INVOKABLE void reset()
|
Q_INVOKABLE void reset()
|
||||||
|
|
|
@ -252,6 +252,7 @@ Item {
|
||||||
property string notMuted: qsTr("Not muted")
|
property string notMuted: qsTr("Not muted")
|
||||||
property string participantsSide: qsTr("On the side")
|
property string participantsSide: qsTr("On the side")
|
||||||
property string participantsTop: qsTr("On the top")
|
property string participantsTop: qsTr("On the top")
|
||||||
|
property string hideSelf: qsTr("Hide self")
|
||||||
|
|
||||||
// LineEditContextMenu
|
// LineEditContextMenu
|
||||||
property string copy: qsTr("Copy")
|
property string copy: qsTr("Copy")
|
||||||
|
|
|
@ -173,25 +173,35 @@ Control {
|
||||||
var onTheSide = UtilsAdapter.getAppValue(Settings.ParticipantsSide)
|
var onTheSide = UtilsAdapter.getAppValue(Settings.ParticipantsSide)
|
||||||
UtilsAdapter.setAppValue(Settings.ParticipantsSide, !onTheSide)
|
UtilsAdapter.setAppValue(Settings.ParticipantsSide, !onTheSide)
|
||||||
participantsSide = !onTheSide
|
participantsSide = !onTheSide
|
||||||
|
case JamiStrings.hideSelf:
|
||||||
|
UtilsAdapter.setAppValue(Settings.HideSelf, !layoutModel.get(index).ActiveSetting)
|
||||||
|
GenericParticipantsFilterModel.hideSelf = UtilsAdapter.getAppValue(Settings.HideSelf)
|
||||||
|
GenericParticipantsFilterModel.reset()
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
layoutModel.clear()
|
layoutModel.clear()
|
||||||
layoutModel.append({"Name": JamiStrings.viewFullScreen,
|
if (!isGrid && isConference) {
|
||||||
"IconSource": JamiResources.open_in_full_24dp_svg,
|
layoutModel.append({"Name": JamiStrings.mosaic,
|
||||||
"ActiveSetting": layoutManager.isCallFullscreen})
|
"IconSource": JamiResources.mosaic_black_24dp_svg,
|
||||||
if (isConference) {
|
"ActiveSetting": isGrid})
|
||||||
layoutModel.append({})
|
layoutModel.append({})
|
||||||
|
}
|
||||||
|
if (isConference) {
|
||||||
var onTheSide = UtilsAdapter.getAppValue(Settings.ParticipantsSide)
|
var onTheSide = UtilsAdapter.getAppValue(Settings.ParticipantsSide)
|
||||||
layoutModel.append({"Name": onTheSide ? JamiStrings.participantsSide : JamiStrings.participantsTop,
|
layoutModel.append({"Name": onTheSide ? JamiStrings.participantsSide : JamiStrings.participantsTop,
|
||||||
"IconSource": onTheSide ? JamiResources.ontheside_black_24dp_svg : JamiResources.onthetop_black_24dp_svg,
|
"IconSource": onTheSide ? JamiResources.ontheside_black_24dp_svg : JamiResources.onthetop_black_24dp_svg,
|
||||||
"ActiveSetting": true})
|
"ActiveSetting": true})
|
||||||
layoutModel.append({})
|
layoutModel.append({})
|
||||||
layoutModel.append({"Name": JamiStrings.mosaic,
|
layoutModel.append({"Name": JamiStrings.hideSelf,
|
||||||
"IconSource": JamiResources.mosaic_black_24dp_svg,
|
"IconSource": JamiResources.hidemyself_black_24dp_svg,
|
||||||
"ActiveSetting": isGrid})
|
"ActiveSetting": UtilsAdapter.getAppValue(Settings.HideSelf)})
|
||||||
|
layoutModel.append({})
|
||||||
}
|
}
|
||||||
|
layoutModel.append({"Name": JamiStrings.viewFullScreen,
|
||||||
|
"IconSource": JamiResources.open_in_full_24dp_svg,
|
||||||
|
"ActiveSetting": layoutManager.isCallFullscreen})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Action {
|
Action {
|
||||||
|
|
|
@ -35,6 +35,18 @@ Item {
|
||||||
property bool inLine: CallParticipantsModel.conferenceLayout === CallParticipantsModel.ONE_WITH_SMALL
|
property bool inLine: CallParticipantsModel.conferenceLayout === CallParticipantsModel.ONE_WITH_SMALL
|
||||||
property bool participantsSide
|
property bool participantsSide
|
||||||
|
|
||||||
|
onVisibleChanged: {
|
||||||
|
GenericParticipantsFilterModel.hideSelf = UtilsAdapter.getAppValue(Settings.HideSelf)
|
||||||
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: GenericParticipantsFilterModel
|
||||||
|
|
||||||
|
function onHideSelfChanged() {
|
||||||
|
GenericParticipantsFilterModel.reset()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: callVideoMedia
|
id: callVideoMedia
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,8 @@ SplitView {
|
||||||
SplitView.minimumWidth: parent.width / 6
|
SplitView.minimumWidth: parent.width / 6
|
||||||
SplitView.maximumWidth: inLine? parent.width / 2 : parent.width
|
SplitView.maximumWidth: inLine? parent.width / 2 : parent.width
|
||||||
|
|
||||||
visible: inLine || CallParticipantsModel.conferenceLayout === CallParticipantsModel.GRID
|
visible: commonParticipants.count > 0 &&
|
||||||
|
(inLine || CallParticipantsModel.conferenceLayout === CallParticipantsModel.GRID)
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
property int lowLimit: 0
|
property int lowLimit: 0
|
||||||
|
|
|
@ -82,7 +82,8 @@ SplitView {
|
||||||
SplitView.minimumHeight: parent.height / 6
|
SplitView.minimumHeight: parent.height / 6
|
||||||
SplitView.maximumHeight: inLine? parent.height / 2 : parent.height
|
SplitView.maximumHeight: inLine? parent.height / 2 : parent.height
|
||||||
|
|
||||||
visible: inLine || CallParticipantsModel.conferenceLayout === CallParticipantsModel.GRID
|
visible: commonParticipants.count > 0 &&
|
||||||
|
(inLine || CallParticipantsModel.conferenceLayout === CallParticipantsModel.GRID)
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
property int lowLimit: 0
|
property int lowLimit: 0
|
||||||
|
|
Loading…
Add table
Reference in a new issue