diff --git a/README.md b/README.md index c275a14de..ad130b786 100644 --- a/README.md +++ b/README.md @@ -128,6 +128,8 @@ Usually, if it is about VPX or Decaf, this could come from your Perl installatio * If the application doesn't start and create an empty file with a random name, it could be come from a bad configuration between your application and others sub-modules. Check your configurations and force them with `-DCMAKE_BUILD_TYPE=` or `--config `. +* On Mac, the application can crash at the start from QOpenGLContext. A workaround is to deactivate the mipmap mode on images by adding into your configuration file (linphonerc): `mipmap_enabled=0` in `[ui]` section. + ## Specific instructions for the Mac Os X platform diff --git a/linphone-app/assets/languages/da.ts b/linphone-app/assets/languages/da.ts index aeeb5bd98..e49100424 100644 --- a/linphone-app/assets/languages/da.ts +++ b/linphone-app/assets/languages/da.ts @@ -2526,6 +2526,21 @@ Klik her: <a href="%1">%1</a> 'Check for updates' : Label switch for enabling check for updates + + mipmapLabel + 'Enable Mipmap' + + + + mipmapTooltip1 + 'This property holds whether the image uses mipmap filtering when scaled or transformed.' : first line of a tooltip about Mipmap mode. + + + + mipmapTooltip2 + 'Mipmap filtering gives better visual quality when scaling down compared to smooth, but it may come at a performance cost (both when initializing the image and during rendering).' : Second line of a tooltip about Mipmap mode. + + SettingsVideo diff --git a/linphone-app/assets/languages/de.ts b/linphone-app/assets/languages/de.ts index 90fe5637c..37a6cfbc9 100644 --- a/linphone-app/assets/languages/de.ts +++ b/linphone-app/assets/languages/de.ts @@ -2526,6 +2526,21 @@ Klicken Sie hier: <a href="%1">%1</a> 'Check for updates' : Label switch for enabling check for updates + + mipmapLabel + 'Enable Mipmap' + + + + mipmapTooltip1 + 'This property holds whether the image uses mipmap filtering when scaled or transformed.' : first line of a tooltip about Mipmap mode. + + + + mipmapTooltip2 + 'Mipmap filtering gives better visual quality when scaling down compared to smooth, but it may come at a performance cost (both when initializing the image and during rendering).' : Second line of a tooltip about Mipmap mode. + + SettingsVideo diff --git a/linphone-app/assets/languages/en.ts b/linphone-app/assets/languages/en.ts index 379d9f48a..7ec9d766e 100644 --- a/linphone-app/assets/languages/en.ts +++ b/linphone-app/assets/languages/en.ts @@ -2548,6 +2548,21 @@ Click here: <a href="%1">%1</a> checkForUpdateLabel 'Check for updates' : Label switch for enabling check for updates Check for updates + + + mipmapLabel + 'Enable Mipmap' + Enable Mipmap + + + mipmapTooltip1 + 'This property holds whether the image uses mipmap filtering when scaled or transformed.' : first line of a tooltip about Mipmap mode. + This property holds whether the image uses mipmap filtering when scaled or transformed. + + + mipmapTooltip2 + 'Mipmap filtering gives better visual quality when scaling down compared to smooth, but it may come at a performance cost (both when initializing the image and during rendering).' : Second line of a tooltip about Mipmap mode. + Mipmap filtering gives better visual quality when scaling down compared to smooth, but it may come at a performance cost (both when initializing the image and during rendering). diff --git a/linphone-app/assets/languages/es.ts b/linphone-app/assets/languages/es.ts index 62b173289..9efbd1683 100644 --- a/linphone-app/assets/languages/es.ts +++ b/linphone-app/assets/languages/es.ts @@ -2524,6 +2524,21 @@ Haga clic aquí: <a href="%1">%1 </a> checkForUpdateLabel 'Check for updates' : Label switch for enabling check for updates + + + + mipmapLabel + 'Enable Mipmap' + + + + mipmapTooltip1 + 'This property holds whether the image uses mipmap filtering when scaled or transformed.' : first line of a tooltip about Mipmap mode. + + + + mipmapTooltip2 + 'Mipmap filtering gives better visual quality when scaling down compared to smooth, but it may come at a performance cost (both when initializing the image and during rendering).' : Second line of a tooltip about Mipmap mode. diff --git a/linphone-app/assets/languages/fr_FR.ts b/linphone-app/assets/languages/fr_FR.ts index a05c23c14..58c22e796 100644 --- a/linphone-app/assets/languages/fr_FR.ts +++ b/linphone-app/assets/languages/fr_FR.ts @@ -2526,6 +2526,21 @@ Cliquez ici : <a href="%1">%1</a> 'Check for updates' : Label switch for enabling check for updates + + mipmapLabel + 'Enable Mipmap' + + + + mipmapTooltip1 + 'This property holds whether the image uses mipmap filtering when scaled or transformed.' : first line of a tooltip about Mipmap mode. + + + + mipmapTooltip2 + 'Mipmap filtering gives better visual quality when scaling down compared to smooth, but it may come at a performance cost (both when initializing the image and during rendering).' : Second line of a tooltip about Mipmap mode. + + SettingsVideo diff --git a/linphone-app/assets/languages/hu.ts b/linphone-app/assets/languages/hu.ts index 264311902..a91db8c33 100644 --- a/linphone-app/assets/languages/hu.ts +++ b/linphone-app/assets/languages/hu.ts @@ -2516,6 +2516,21 @@ Kattintson ide: <a href="%1">%1</a> 'Check for updates' : Label switch for enabling check for updates + + mipmapLabel + 'Enable Mipmap' + + + + mipmapTooltip1 + 'This property holds whether the image uses mipmap filtering when scaled or transformed.' : first line of a tooltip about Mipmap mode. + + + + mipmapTooltip2 + 'Mipmap filtering gives better visual quality when scaling down compared to smooth, but it may come at a performance cost (both when initializing the image and during rendering).' : Second line of a tooltip about Mipmap mode. + + SettingsVideo diff --git a/linphone-app/assets/languages/it.ts b/linphone-app/assets/languages/it.ts index 94ef1a6fe..8d1d04c40 100644 --- a/linphone-app/assets/languages/it.ts +++ b/linphone-app/assets/languages/it.ts @@ -2526,6 +2526,21 @@ Clicca: <a href="%1">%1</a> 'Check for updates' : Label switch for enabling check for updates + + mipmapLabel + 'Enable Mipmap' + + + + mipmapTooltip1 + 'This property holds whether the image uses mipmap filtering when scaled or transformed.' : first line of a tooltip about Mipmap mode. + + + + mipmapTooltip2 + 'Mipmap filtering gives better visual quality when scaling down compared to smooth, but it may come at a performance cost (both when initializing the image and during rendering).' : Second line of a tooltip about Mipmap mode. + + SettingsVideo diff --git a/linphone-app/assets/languages/ja.ts b/linphone-app/assets/languages/ja.ts index d73f252af..09dcce11f 100644 --- a/linphone-app/assets/languages/ja.ts +++ b/linphone-app/assets/languages/ja.ts @@ -2516,6 +2516,21 @@ 'Check for updates' : Label switch for enabling check for updates + + mipmapLabel + 'Enable Mipmap' + + + + mipmapTooltip1 + 'This property holds whether the image uses mipmap filtering when scaled or transformed.' : first line of a tooltip about Mipmap mode. + + + + mipmapTooltip2 + 'Mipmap filtering gives better visual quality when scaling down compared to smooth, but it may come at a performance cost (both when initializing the image and during rendering).' : Second line of a tooltip about Mipmap mode. + + SettingsVideo diff --git a/linphone-app/assets/languages/lt.ts b/linphone-app/assets/languages/lt.ts index a7faf12ed..ea671cfd9 100644 --- a/linphone-app/assets/languages/lt.ts +++ b/linphone-app/assets/languages/lt.ts @@ -2536,6 +2536,21 @@ Spustelėkite čia: <a href="%1">%1</a> 'Check for updates' : Label switch for enabling check for updates + + mipmapLabel + 'Enable Mipmap' + + + + mipmapTooltip1 + 'This property holds whether the image uses mipmap filtering when scaled or transformed.' : first line of a tooltip about Mipmap mode. + + + + mipmapTooltip2 + 'Mipmap filtering gives better visual quality when scaling down compared to smooth, but it may come at a performance cost (both when initializing the image and during rendering).' : Second line of a tooltip about Mipmap mode. + + SettingsVideo diff --git a/linphone-app/assets/languages/pt_BR.ts b/linphone-app/assets/languages/pt_BR.ts index 45020bf3b..6502ed313 100644 --- a/linphone-app/assets/languages/pt_BR.ts +++ b/linphone-app/assets/languages/pt_BR.ts @@ -2526,6 +2526,21 @@ Clique aqui: <a href="%1">%1 </a> 'Check for updates' : Label switch for enabling check for updates + + mipmapLabel + 'Enable Mipmap' + + + + mipmapTooltip1 + 'This property holds whether the image uses mipmap filtering when scaled or transformed.' : first line of a tooltip about Mipmap mode. + + + + mipmapTooltip2 + 'Mipmap filtering gives better visual quality when scaling down compared to smooth, but it may come at a performance cost (both when initializing the image and during rendering).' : Second line of a tooltip about Mipmap mode. + + SettingsVideo diff --git a/linphone-app/assets/languages/ru.ts b/linphone-app/assets/languages/ru.ts index 913c20d18..81cfb5f1e 100644 --- a/linphone-app/assets/languages/ru.ts +++ b/linphone-app/assets/languages/ru.ts @@ -2536,6 +2536,21 @@ 'Check for updates' : Label switch for enabling check for updates + + mipmapLabel + 'Enable Mipmap' + + + + mipmapTooltip1 + 'This property holds whether the image uses mipmap filtering when scaled or transformed.' : first line of a tooltip about Mipmap mode. + + + + mipmapTooltip2 + 'Mipmap filtering gives better visual quality when scaling down compared to smooth, but it may come at a performance cost (both when initializing the image and during rendering).' : Second line of a tooltip about Mipmap mode. + + SettingsVideo diff --git a/linphone-app/assets/languages/sv.ts b/linphone-app/assets/languages/sv.ts index af484b3f6..89204bf88 100644 --- a/linphone-app/assets/languages/sv.ts +++ b/linphone-app/assets/languages/sv.ts @@ -2526,6 +2526,21 @@ Klicka här: <a href="%1">%1</a> 'Check for updates' : Label switch for enabling check for updates + + mipmapLabel + 'Enable Mipmap' + + + + mipmapTooltip1 + 'This property holds whether the image uses mipmap filtering when scaled or transformed.' : first line of a tooltip about Mipmap mode. + + + + mipmapTooltip2 + 'Mipmap filtering gives better visual quality when scaling down compared to smooth, but it may come at a performance cost (both when initializing the image and during rendering).' : Second line of a tooltip about Mipmap mode. + + SettingsVideo diff --git a/linphone-app/assets/languages/tr.ts b/linphone-app/assets/languages/tr.ts index 585f21b8b..7ab01dd90 100644 --- a/linphone-app/assets/languages/tr.ts +++ b/linphone-app/assets/languages/tr.ts @@ -2516,6 +2516,21 @@ Buraya tıklayın: <a href="%1">%1</a> 'Check for updates' : Label switch for enabling check for updates + + mipmapLabel + 'Enable Mipmap' + + + + mipmapTooltip1 + 'This property holds whether the image uses mipmap filtering when scaled or transformed.' : first line of a tooltip about Mipmap mode. + + + + mipmapTooltip2 + 'Mipmap filtering gives better visual quality when scaling down compared to smooth, but it may come at a performance cost (both when initializing the image and during rendering).' : Second line of a tooltip about Mipmap mode. + + SettingsVideo diff --git a/linphone-app/assets/languages/uk.ts b/linphone-app/assets/languages/uk.ts index 0fd85acf4..79b484091 100644 --- a/linphone-app/assets/languages/uk.ts +++ b/linphone-app/assets/languages/uk.ts @@ -2536,6 +2536,21 @@ 'Check for updates' : Label switch for enabling check for updates + + mipmapLabel + 'Enable Mipmap' + + + + mipmapTooltip1 + 'This property holds whether the image uses mipmap filtering when scaled or transformed.' : first line of a tooltip about Mipmap mode. + + + + mipmapTooltip2 + 'Mipmap filtering gives better visual quality when scaling down compared to smooth, but it may come at a performance cost (both when initializing the image and during rendering).' : Second line of a tooltip about Mipmap mode. + + SettingsVideo diff --git a/linphone-app/assets/languages/zh_CN.ts b/linphone-app/assets/languages/zh_CN.ts index eac738fa3..d3e6d8a2e 100644 --- a/linphone-app/assets/languages/zh_CN.ts +++ b/linphone-app/assets/languages/zh_CN.ts @@ -2516,6 +2516,21 @@ 'Check for updates' : Label switch for enabling check for updates + + mipmapLabel + 'Enable Mipmap' + + + + mipmapTooltip1 + 'This property holds whether the image uses mipmap filtering when scaled or transformed.' : first line of a tooltip about Mipmap mode. + + + + mipmapTooltip2 + 'Mipmap filtering gives better visual quality when scaling down compared to smooth, but it may come at a performance cost (both when initializing the image and during rendering).' : Second line of a tooltip about Mipmap mode. + + SettingsVideo diff --git a/linphone-app/src/components/settings/SettingsModel.cpp b/linphone-app/src/components/settings/SettingsModel.cpp index 6289e7e80..de9cf4b98 100644 --- a/linphone-app/src/components/settings/SettingsModel.cpp +++ b/linphone-app/src/components/settings/SettingsModel.cpp @@ -1283,6 +1283,19 @@ bool SettingsModel::getShowStartVideoCallButton ()const{ return !!mConfig->getInt(UiSection, "show_start_video_button", 1); } +bool SettingsModel::isMipmapEnabled() const{ +#ifdef __APPLE__ + return !!mConfig->getInt(UiSection, "mipmap_enabled", 1); +#else + return !!mConfig->getInt(UiSection, "mipmap_enabled", 0); +#endif +} + +void SettingsModel::setMipmapEnabled(const bool& enabled){ + mConfig->setInt(UiSection, "mipmap_enabled", enabled); + emit mipmapEnabledChanged(); +} + // ============================================================================= // Advanced. // ============================================================================= diff --git a/linphone-app/src/components/settings/SettingsModel.hpp b/linphone-app/src/components/settings/SettingsModel.hpp index a4f28b611..dcad0f73f 100644 --- a/linphone-app/src/components/settings/SettingsModel.hpp +++ b/linphone-app/src/components/settings/SettingsModel.hpp @@ -184,6 +184,8 @@ class SettingsModel : public QObject { Q_PROPERTY(bool showStartChatButton READ getShowStartChatButton CONSTANT) Q_PROPERTY(bool showStartVideoCallButton READ getShowStartVideoCallButton CONSTANT) + Q_PROPERTY(bool mipmapEnabled READ isMipmapEnabled WRITE setMipmapEnabled NOTIFY mipmapEnabledChanged) + // Advanced. ----------------------------------------------------------------- Q_PROPERTY(QString logsFolder READ getLogsFolder WRITE setLogsFolder NOTIFY logsFolderChanged) @@ -465,6 +467,9 @@ public: Q_INVOKABLE bool getShowStartChatButton () const; Q_INVOKABLE bool getShowStartVideoCallButton () const; + bool isMipmapEnabled() const; + void setMipmapEnabled(const bool& enabled); + // Advanced. --------------------------------------------------------------------------- @@ -632,6 +637,7 @@ signals: void remoteProvisioningNotChanged (const QString &remoteProvisioning); void exitOnCloseChanged (bool value); + void mipmapEnabledChanged(); void checkForUpdateEnabledChanged(); diff --git a/linphone-app/ui/modules/Common/Image/Icon.qml b/linphone-app/ui/modules/Common/Image/Icon.qml index 39eff1bc5..4890625bd 100644 --- a/linphone-app/ui/modules/Common/Image/Icon.qml +++ b/linphone-app/ui/modules/Common/Image/Icon.qml @@ -2,6 +2,7 @@ import QtQuick 2.7 import QtGraphicalEffects 1.12 import Common 1.0 +import Linphone 1.0 import Utils 1.0 // ============================================================================= @@ -24,7 +25,7 @@ Item { Image { id:image property bool colorOverwriteEnabled : false - mipmap: Qt.platform.os === 'osx' + mipmap: SettingsModel.mipmapEnabled cache: Images.areReadOnlyImages function getIconSize () { Utils.assert( diff --git a/linphone-app/ui/modules/Common/Image/RoundedImage.qml b/linphone-app/ui/modules/Common/Image/RoundedImage.qml index 6edcb3c9c..61a193778 100644 --- a/linphone-app/ui/modules/Common/Image/RoundedImage.qml +++ b/linphone-app/ui/modules/Common/Image/RoundedImage.qml @@ -1,5 +1,7 @@ import QtQuick 2.7 +import Linphone 1.0 + // ============================================================================= Item { @@ -19,7 +21,7 @@ Item { Image { id: image - mipmap: Qt.platform.os === 'osx' + mipmap: SettingsModel.mipmapEnabled anchors.fill: parent fillMode: Image.PreserveAspectCrop sourceSize.width: parent.width diff --git a/linphone-app/ui/modules/Common/Tooltip/Tooltip.qml b/linphone-app/ui/modules/Common/Tooltip/Tooltip.qml index 03bf102d7..4acc92f2b 100644 --- a/linphone-app/ui/modules/Common/Tooltip/Tooltip.qml +++ b/linphone-app/ui/modules/Common/Tooltip/Tooltip.qml @@ -3,6 +3,7 @@ import QtQuick.Controls 2.2 as Core import QtGraphicalEffects 1.12 import Common 1.0 +import Linphone 1.0 import Common.Styles 1.0 import Utils 1.0 @@ -100,7 +101,7 @@ Core.ToolTip { // and `implicitWidth`. Core.Image { id: icon - mipmap: Qt.platform.os === 'osx' + mipmap: SettingsModel.mipmapEnabled fillMode: Core.Image.PreserveAspectFit height: TooltipStyle.arrowSize source: _edge diff --git a/linphone-app/ui/modules/Linphone/Chat/FileMessage.qml b/linphone-app/ui/modules/Linphone/Chat/FileMessage.qml index f446c6308..ae738fa54 100644 --- a/linphone-app/ui/modules/Linphone/Chat/FileMessage.qml +++ b/linphone-app/ui/modules/Linphone/Chat/FileMessage.qml @@ -109,7 +109,7 @@ Row { id: thumbnailImage Image { - mipmap: Qt.platform.os === 'osx' + mipmap: SettingsModel.mipmapEnabled source: rectangle.contentModel.thumbnail } } diff --git a/linphone-app/ui/modules/Linphone/Notifications/NotificationReceivedFileMessage.qml b/linphone-app/ui/modules/Linphone/Notifications/NotificationReceivedFileMessage.qml index 28a89c92c..b8cfe2dd1 100644 --- a/linphone-app/ui/modules/Linphone/Notifications/NotificationReceivedFileMessage.qml +++ b/linphone-app/ui/modules/Linphone/Notifications/NotificationReceivedFileMessage.qml @@ -2,6 +2,7 @@ import QtQuick 2.7 import QtQuick.Layouts 1.3 import Common 1.0 +import Linphone 1.0 import Linphone.Styles 1.0 import Utils 1.0 @@ -44,7 +45,7 @@ Notification { } Image{ id:image - mipmap: Qt.platform.os === 'osx' + mipmap: SettingsModel.mipmapEnabled Layout.fillHeight: true Layout.fillWidth: true fillMode: Image.PreserveAspectFit diff --git a/linphone-app/ui/views/App/Settings/SettingsUi.qml b/linphone-app/ui/views/App/Settings/SettingsUi.qml index 1c618ebce..651d25ab9 100644 --- a/linphone-app/ui/views/App/Settings/SettingsUi.qml +++ b/linphone-app/ui/views/App/Settings/SettingsUi.qml @@ -215,6 +215,24 @@ TabContainer { } } } + FormLine { + FormGroup { + //: 'Enable Mipmap' + label: qsTr('mipmapLabel') + + Switch { + checked: SettingsModel.mipmapEnabled + + onClicked: SettingsModel.mipmapEnabled = !checked + TooltipArea{ + //: 'This property holds whether the image uses mipmap filtering when scaled or transformed.' : first line of a tooltip about Mipmap mode. + text: qsTr('mipmapTooltip1')+'\n' + //: 'Mipmap filtering gives better visual quality when scaling down compared to smooth, but it may come at a performance cost (both when initializing the image and during rendering).' : Second line of a tooltip about Mipmap mode. + +qsTr('mipmapTooltip2') + } + } + } + } } } }