Compare commits

...

6 Commits

Author SHA1 Message Date
ea5b2d6589 misc: bump daemon
Change-Id: I9d10579e5bb231f4b457a0fd9f3c36c8bc491dbc
2023-09-22 15:04:16 -04:00
eaababc817 callactionbar: fix submenus layouts
Change-Id: I1d100b48db6ad95bf5e09642e9c12aad8ccf110a
2023-09-21 08:45:09 -04:00
aa96b723bc misc: bump daemon
Change-Id: I8ec5348b0a37c06e81ad3fc46c11822556391694
2023-09-20 21:16:46 -04:00
1616261bef misc: update plugin-store after plugin uninstall
Change-Id: Ibbb428e17f362f3645a530ad55fbd87d6719f98d
2023-09-20 14:58:32 -04:00
926ab72334 markdown: fix keyboard shortcuts
Change-Id: Ic02ab2df7a4a3870dbbe2f0e23160f13281ba2ac
GitLab: #1321
2023-09-20 14:54:54 -04:00
a6d16ba1f8 misc: pass HideSelf to true by default
Change-Id: I507ec00f9d94ae9cec5f63ca948bca1f9cdd82b3
2023-09-20 13:13:23 -04:00
9 changed files with 77 additions and 67 deletions

2
daemon

Submodule daemon updated: 86d147d080...3bbac87283

View File

@ -46,7 +46,7 @@ extern const QString defaultDownloadPath;
X(AppTheme, "System") \
X(BaseZoom, 1.0) \
X(ParticipantsSide, false) \
X(HideSelf, false) \
X(HideSelf, true) \
X(HideSpectators, false) \
X(AutoUpdate, true) \
X(PluginAutoUpdate, false) \

View File

@ -203,61 +203,70 @@ ItemDelegate {
anchors.fill: parent
color: menuItem.down ? "#c4aaaaaa" : menuItem.hovered ? "#c4777777" : "transparent"
}
contentItem: ColumnLayout {
// After update to qt 6.4.3 the layout was broken, adding a Rectangle
// as top level in the contentIntem is a workaround which removal can be
// tested with newer qt versions
contentItem: Rectangle {
anchors.fill: parent
spacing: 0
RowLayout {
Layout.fillWidth: true
Layout.rightMargin: 15
Layout.leftMargin: 20
Layout.fillHeight: true
Layout.alignment: {
if (menuAction.popupMode !== CallActionBar.ActionPopupMode.LayoutOption || TopMargin && BottomMargin) {
return Qt.AlignLeft | Qt.AlignVCenter;
}
if (TopMargin) {
Layout.bottomMargin = 4;
return Qt.AlignBottom;
}
Layout.topMargin = 4;
return Qt.AlignTop;
}
color: "transparent"
ColumnLayout {
anchors.fill: parent
spacing: 0
spacing: 6
ResponsiveImage {
source: menuAction.popupMode === CallActionBar.ActionPopupMode.ListElement || menuAction.popupMode === CallActionBar.ActionPopupMode.LayoutOption ? IconSource : (menuItem.ListView.isCurrentItem ? JamiResources.check_box_24dp_svg : JamiResources.check_box_outline_blank_24dp_svg)
color: "white"
width: 20
height: 20
}
Text {
id: delegateText
RowLayout {
Layout.fillWidth: true
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
text: menuAction.popupMode === CallActionBar.ActionPopupMode.ListElement || menuAction.popupMode === CallActionBar.ActionPopupMode.LayoutOption ? Name : DeviceName
elide: Text.ElideRight
font.pointSize: JamiTheme.participantFontSize
color: "white"
Layout.fillHeight: true
Layout.rightMargin: 15
Layout.leftMargin: 20
Layout.alignment: {
if (menuAction.popupMode !== CallActionBar.ActionPopupMode.LayoutOption || TopMargin && BottomMargin) {
return Qt.AlignLeft | Qt.AlignVCenter;
}
if (TopMargin) {
Layout.bottomMargin = 4;
return Qt.AlignBottom;
}
Layout.topMargin = 4;
return Qt.AlignTop;
}
spacing: 6
ResponsiveImage {
source: menuAction.popupMode === CallActionBar.ActionPopupMode.ListElement || menuAction.popupMode === CallActionBar.ActionPopupMode.LayoutOption ? IconSource : (menuItem.ListView.isCurrentItem ? JamiResources.check_box_24dp_svg : JamiResources.check_box_outline_blank_24dp_svg)
color: "white"
width: 20
height: 20
}
Text {
id: delegateText
Layout.fillWidth: true
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
text: menuAction.popupMode === CallActionBar.ActionPopupMode.ListElement || menuAction.popupMode === CallActionBar.ActionPopupMode.LayoutOption ? Name : DeviceName
elide: Text.ElideRight
font.pointSize: JamiTheme.participantFontSize
color: "white"
}
ResponsiveImage {
source: JamiResources.check_black_24dp_svg
color: "white"
width: 20
height: 20
visible: menuAction.popupMode === CallActionBar.ActionPopupMode.LayoutOption ? ActiveSetting : false
}
}
ResponsiveImage {
source: JamiResources.check_black_24dp_svg
color: "white"
width: 20
height: 20
visible: menuAction.popupMode === CallActionBar.ActionPopupMode.LayoutOption ? ActiveSetting : false
Rectangle {
id: buttonDiv
visible: menuAction.popupMode === CallActionBar.ActionPopupMode.LayoutOption ? SectionEnd : false
Layout.fillWidth: true
height: 1
opacity: 0.2
border.width: 0
color: JamiTheme.separationLine
Layout.alignment: Qt.AlignBottom
}
}
Rectangle {
id: buttonDiv
visible: menuAction.popupMode === CallActionBar.ActionPopupMode.LayoutOption ? SectionEnd : false
Layout.fillWidth: true
height: 1
opacity: 0.2
border.width: 0
color: JamiTheme.separationLine
Layout.alignment: Qt.AlignBottom
}
}
}

View File

@ -219,32 +219,32 @@ RowLayout {
},
"Link": function () {
if (!showPreview) {
listViewTypoSecond.itemAtIndex(0).action.triggered();
listViewTypoFirst.itemAtIndex(4).action.triggered();
}
},
"Code": function () {
if (!showPreview) {
listViewTypoSecond.itemAtIndex(1).action.triggered();
listViewTypoFirst.itemAtIndex(5).action.triggered();
}
},
"Quote": function () {
if (!showPreview) {
listViewTypoSecond.itemAtIndex(2).action.triggered();
listViewTypoSecond.itemAtIndex(0).action.triggered();
}
},
"Unordered list": function () {
if (!showPreview) {
listViewTypoSecond.itemAtIndex(3).action.triggered();
listViewTypoSecond.itemAtIndex(1).action.triggered();
}
},
"Ordered list": function () {
if (!showPreview) {
listViewTypoSecond.itemAtIndex(4).action.triggered();
listViewTypoSecond.itemAtIndex(2).action.triggered();
}
},
"Enter is new line": function () {
if (!showPreview) {
listViewTypoSecond.itemAtIndex(5).action.triggered();
listViewTypoSecond.itemAtIndex(3).action.triggered();
}
}
}

View File

@ -80,6 +80,8 @@ PluginListModel::data(const QModelIndex& index, int role) const
return QVariant(pluginStatus_.value(installedPlugins_.at(index.row())));
case Role::NewPluginAvailable:
return QVariant(newVersionAvailable_.value(installedPlugins_.at(index.row())));
case Role::Id:
return QVariant(details.id);
}
return QVariant();
}
@ -98,6 +100,7 @@ PluginListModel::roleNames() const
roles[Status] = "Status";
roles[PluginDescription] = "PluginDescription";
roles[NewPluginAvailable] = "NewPluginAvailable";
roles[Id] = "Id";
return roles;
}

View File

@ -38,7 +38,8 @@ public:
PluginIcon,
NewPluginAvailable,
IsLoaded,
Status
Status,
Id
};
Q_ENUM(Role)

View File

@ -79,7 +79,6 @@ void
PluginStoreListModel::reset()
{
beginResetModel();
plugins_.clear();
endResetModel();
}
@ -88,8 +87,8 @@ PluginStoreListModel::addPlugin(const QVariantMap& plugin)
{
beginInsertRows(QModelIndex(), plugins_.size(), plugins_.size());
plugins_.append(plugin);
endInsertRows();
sort();
endInsertRows();
}
void
@ -97,8 +96,8 @@ PluginStoreListModel::setPlugins(const QList<QVariantMap>& plugins)
{
beginResetModel();
plugins_ = filterPlugins(plugins);
endResetModel();
sort();
endResetModel();
}
void
@ -109,12 +108,12 @@ PluginStoreListModel::removePlugin(const QString& pluginId)
if (plugin["id"].toString() == pluginId) {
beginRemoveRows(QModelIndex(), index, index);
plugins_.removeAt(index);
sort();
endRemoveRows();
return;
}
index++;
}
sort();
}
void
@ -129,7 +128,6 @@ PluginStoreListModel::updatePlugin(const QVariantMap& plugin)
}
index++;
}
sort();
}
QColor
@ -221,11 +219,9 @@ PluginStoreListModel::rowFromPluginId(const QString& pluginId) const
void
PluginStoreListModel::sort()
{
beginResetModel();
std::sort(plugins_.begin(), plugins_.end(), [](const QVariantMap& a, const QVariantMap& b) {
return a["timestamp"].toString() < b["timestamp"].toString();
});
endResetModel();
}
QList<QVariantMap>

View File

@ -109,7 +109,7 @@ public:
// `data` represents the version in this case.
if (plugin.version < data) {
if (isAutoUpdaterEnabled()) {
installRemotePlugin(plugin.name);
installRemotePlugin(plugin.id);
return;
}
}

View File

@ -289,9 +289,10 @@ Item {
"buttonTitles": [JamiStrings.optionOk, JamiStrings.optionCancel],
"buttonStyles": [SimpleMessageDialog.ButtonStyle.TintedBlue, SimpleMessageDialog.ButtonStyle.TintedBlack],
"buttonCallBacks": [function () {
PluginListModel.setVersionStatus(PluginName, PluginStatus.INSTALLABLE);
PluginListModel.setVersionStatus(Id, PluginStatus.INSTALLABLE);
PluginModel.uninstallPlugin(PluginId);
PluginListModel.removePlugin(index);
PluginAdapter.getPluginsFromStore();
// could not call root from here
settings.ListView.view.parent.closed();
}]