linux.x86.linphone/Linphone/view/Control/Display/Chat/ImageFileView.qml
data 3b3bb966d4 Add ringtone selection dropdown and various bugfixes
- Add ComboBox for ringtone selection in Call Settings
- Convert MKV ringtones to WAV format (Linphone only supports WAV)
- Fix ComboSetting to support dialPlan type for international prefix
- Disable account devices feature to prevent API errors
- Disable automatic update check on startup
- Add ringtone fallback to default when custom file not found
- Fix ringtone dropdown to not override setting on initialization

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-08 08:31:15 +01:00

50 lines
1.7 KiB
QML
Executable file

import QtQuick
import QtQuick.Controls as Control
import QtQuick.Layouts
import Linphone
import UtilsCpp
import 'qrc:/qt/qml/Linphone/view/Control/Tool/Helper/utils.js' as Utils
// =============================================================================
// ---------------------------------------------------------------------
// Separated file to show a single image bigger in chat message
// The FileView file does not allow that as it is a Loader and the image
// is reloaded everytime the message becomes visible again. It causes the
// chat message not to be able to adapt its size according to the painted
// size of the image
// ---------------------------------------------------------------------
Image {
id: mainItem
property ChatMessageContentGui contentGui
mipmap: false//SettingsModel.mipmapEnabled
autoTransform: true
fillMode: Image.PreserveAspectFit
source: contentGui && contentGui.core.thumbnail || ""
MouseArea {
anchors.fill: parent
hoverEnabled: true
propagateComposedEvents: true
cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor
// Changing cursor in MouseArea seems not to work with the Loader
// Use override cursor for this case
onContainsMouseChanged: {
if (containsMouse) UtilsCpp.setGlobalCursor(Qt.PointingHandCursor)
else UtilsCpp.restoreGlobalCursor()
}
onPressed: (mouse) => {
mouse.accepted = true
// if(SettingsModel.isVfsEncrypted){
// window.attachVirtualWindow(Utils.buildCommonDialogUri('FileViewDialog'), {
// contentGui: mainItem.contentGui,
// }, function (status) {
// })
// }else
mainItem.contentGui.core.lOpenFile()
}
}
}