mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-04-21 21:52:03 +02:00
misc: Qt 6.2.0 initial migration
Remove unsupported QtQuick One component and it will be added back in the following patches Change-Id: Iad206a880096cf956a4220a81dca85a993721fbd
This commit is contained in:
parent
1a476218ae
commit
be41f0e7a6
197 changed files with 1137 additions and 1694 deletions
111
CMakeLists.txt
111
CMakeLists.txt
|
@ -153,27 +153,39 @@ set(COMMON_HEADERS
|
||||||
${SRC_DIR}/previewengine.h)
|
${SRC_DIR}/previewengine.h)
|
||||||
|
|
||||||
set(QML_LIBS
|
set(QML_LIBS
|
||||||
Qt5::Quick
|
Qt::Quick
|
||||||
Qt5::QuickWidgets
|
Qt::Network
|
||||||
Qt5::Network
|
Qt::NetworkAuth
|
||||||
Qt5::Svg
|
Qt::Svg
|
||||||
Qt5::Sql
|
Qt::Gui
|
||||||
Qt5::Concurrent
|
Qt::Qml
|
||||||
Qt5::QuickControls2
|
Qt::QmlModels
|
||||||
Qt5::WebEngine
|
Qt::Positioning
|
||||||
Qt5::Core
|
Qt::Sql
|
||||||
Qt5::WebEngineWidgets)
|
Qt::Concurrent
|
||||||
|
Qt::Core
|
||||||
|
Qt::Core5Compat
|
||||||
|
Qt::WebEngineCore
|
||||||
|
Qt::WebEngineQuick
|
||||||
|
Qt::WebChannel
|
||||||
|
Qt::WebEngineWidgets)
|
||||||
|
|
||||||
set(QML_LIBS_LIST
|
set(QML_LIBS_LIST
|
||||||
Core
|
|
||||||
Concurrent
|
|
||||||
Quick
|
Quick
|
||||||
QuickWidgets
|
|
||||||
Network
|
Network
|
||||||
|
NetworkAuth
|
||||||
Svg
|
Svg
|
||||||
|
Gui
|
||||||
|
Qml
|
||||||
|
QmlModels
|
||||||
|
Positioning
|
||||||
Sql
|
Sql
|
||||||
QuickControls2
|
Concurrent
|
||||||
WebEngine
|
Core
|
||||||
|
Core5Compat
|
||||||
|
WebEngineCore
|
||||||
|
WebEngineQuick
|
||||||
|
WebChannel
|
||||||
WebEngineWidgets)
|
WebEngineWidgets)
|
||||||
|
|
||||||
set(WINDOWS_SYS_LIBS Shell32.lib
|
set(WINDOWS_SYS_LIBS Shell32.lib
|
||||||
|
@ -185,6 +197,14 @@ set(WINDOWS_SYS_LIBS Shell32.lib
|
||||||
Crypt32.lib
|
Crypt32.lib
|
||||||
Strmiids.lib)
|
Strmiids.lib)
|
||||||
|
|
||||||
|
# Here we let find_package(<PackageName>...) try to find Qt 6,
|
||||||
|
# If it is found, find_package will succeed, and the CMake variable
|
||||||
|
# QT_VERSION_MAJOR will be defined 6.
|
||||||
|
find_package(QT NAMES Qt6 COMPONENTS ${QML_LIBS_LIST} REQUIRED)
|
||||||
|
if (${QT_VERSION_MAJOR} STRLESS 6)
|
||||||
|
message(FATAL_ERROR "We currently only support Qt6" )
|
||||||
|
endif()
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
# preprocessor defines
|
# preprocessor defines
|
||||||
add_definitions(-DUNICODE -DQT_NO_DEBUG -DNDEBUG)
|
add_definitions(-DUNICODE -DQT_NO_DEBUG -DNDEBUG)
|
||||||
|
@ -240,7 +260,7 @@ else()
|
||||||
list(APPEND COMMON_HEADERS
|
list(APPEND COMMON_HEADERS
|
||||||
${SRC_DIR}/dbuserrorhandler.h
|
${SRC_DIR}/dbuserrorhandler.h
|
||||||
${SRC_DIR}/xrectsel.h)
|
${SRC_DIR}/xrectsel.h)
|
||||||
list(APPEND QML_LIBS Qt5::DBus)
|
list(APPEND QML_LIBS Qt::DBus)
|
||||||
list(APPEND QML_LIBS_LIST DBus)
|
list(APPEND QML_LIBS_LIST DBus)
|
||||||
|
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig REQUIRED)
|
||||||
|
@ -318,21 +338,16 @@ else()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Qt find package
|
# Qt find package
|
||||||
if(QT5_VER AND QT5_PATH)
|
if(QT6_VER AND QT6_PATH)
|
||||||
string(REPLACE "." ";" VERSION_LIST ${QT5_VER})
|
message(STATUS "Using custom Qt version")
|
||||||
list(GET VERSION_LIST 0 QT5_VER_MAJOR)
|
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS ${QML_LIBS_LIST}
|
||||||
list(GET VERSION_LIST 1 QT5_VER_MINOR)
|
PATHS ${QT6_PATH} NO_DEFAULT_PATH)
|
||||||
list(GET VERSION_LIST 2 QT5_VER_PATCH)
|
# Linguist tools is not required.
|
||||||
|
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS LinguistTools
|
||||||
if((${QT5_VER_MAJOR} GREATER_EQUAL 5) AND (${QT5_VER_MINOR} GREATER_EQUAL 14))
|
PATHS ${QT6_PATH} NO_DEFAULT_PATH)
|
||||||
message(STATUS "Using custom Qt version")
|
|
||||||
find_package(Qt5 ${QT5_VER} REQUIRED COMPONENTS ${QML_LIBS_LIST}
|
|
||||||
PATHS ${QT5_PATH} NO_DEFAULT_PATH)
|
|
||||||
find_package(Qt5LinguistTools ${QT5_VER} PATHS ${QT5_PATH} NO_DEFAULT_PATH)
|
|
||||||
endif()
|
|
||||||
else()
|
else()
|
||||||
find_package(Qt5 REQUIRED COMPONENTS ${QML_LIBS_LIST})
|
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS ${QML_LIBS_LIST})
|
||||||
find_package(Qt5LinguistTools)
|
find_package(Qt${QT_VERSION_MAJOR}LinguistTools)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# common include
|
# common include
|
||||||
|
@ -340,19 +355,19 @@ include_directories(${PROJECT_SOURCE_DIR}
|
||||||
${SRC_DIR})
|
${SRC_DIR})
|
||||||
|
|
||||||
# common executable sources
|
# common executable sources
|
||||||
add_executable(${PROJECT_NAME}
|
qt_add_executable(${PROJECT_NAME} MANUAL_FINALIZATION
|
||||||
${SRC_DIR}/main.cpp
|
${SRC_DIR}/main.cpp
|
||||||
${COMMON_HEADERS}
|
${COMMON_HEADERS}
|
||||||
${COMMON_SOURCES}
|
${COMMON_SOURCES}
|
||||||
${QML_RESOURCES}
|
${QML_RESOURCES}
|
||||||
${QML_RESOURCES_QML}
|
${QML_RESOURCES_QML}
|
||||||
${LRC_SRC_PATH}/webresource.qrc)
|
${LRC_SRC_PATH}/webresource.qrc)
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
# Makes it a GUI executable instead of a console application
|
# Makes it a GUI executable instead of a console application
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES WIN32_EXECUTABLE TRUE)
|
set_target_properties(${PROJECT_NAME} PROPERTIES WIN32_EXECUTABLE TRUE)
|
||||||
|
|
||||||
target_link_libraries(${PROJECT_NAME}
|
target_link_libraries(${PROJECT_NAME} PRIVATE
|
||||||
${QML_LIBS}
|
${QML_LIBS}
|
||||||
${QRENCODE_LIB}
|
${QRENCODE_LIB}
|
||||||
${WINDOWS_SYS_LIBS})
|
${WINDOWS_SYS_LIBS})
|
||||||
|
@ -367,14 +382,14 @@ if(MSVC)
|
||||||
# executable icon
|
# executable icon
|
||||||
target_sources(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/ico.rc)
|
target_sources(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/ico.rc)
|
||||||
|
|
||||||
target_link_libraries(${PROJECT_NAME}
|
target_link_libraries(${PROJECT_NAME} PRIVATE
|
||||||
${RINGCLIENT_STATIC_LIB}
|
${RINGCLIENT_STATIC_LIB}
|
||||||
${QTWRAPPER_LIB}
|
${QTWRAPPER_LIB}
|
||||||
${DRING_LIB}
|
${DRING_LIB}
|
||||||
${GNUTLS_LIB})
|
${GNUTLS_LIB})
|
||||||
|
|
||||||
# translations
|
# translations
|
||||||
if(Qt5LinguistTools_FOUND)
|
if(Qt${QT_VERSION_MAJOR}LinguistTools_FOUND)
|
||||||
message("Releasing and copying translation files")
|
message("Releasing and copying translation files")
|
||||||
file(MAKE_DIRECTORY "${JAMI_OUTPUT_DIRECTORY_RELEASE}/share/ring/translations/")
|
file(MAKE_DIRECTORY "${JAMI_OUTPUT_DIRECTORY_RELEASE}/share/ring/translations/")
|
||||||
file(MAKE_DIRECTORY "${JAMI_OUTPUT_DIRECTORY_RELEASE}/share/libringclient/translations/")
|
file(MAKE_DIRECTORY "${JAMI_OUTPUT_DIRECTORY_RELEASE}/share/libringclient/translations/")
|
||||||
|
@ -384,8 +399,9 @@ if(MSVC)
|
||||||
"${JAMI_OUTPUT_DIRECTORY_RELEASE}/share/ring/translations")
|
"${JAMI_OUTPUT_DIRECTORY_RELEASE}/share/ring/translations")
|
||||||
set_source_files_properties(${TS_LRC_FILES} PROPERTIES OUTPUT_LOCATION
|
set_source_files_properties(${TS_LRC_FILES} PROPERTIES OUTPUT_LOCATION
|
||||||
"${JAMI_OUTPUT_DIRECTORY_RELEASE}/share/libringclient/translations")
|
"${JAMI_OUTPUT_DIRECTORY_RELEASE}/share/libringclient/translations")
|
||||||
qt5_add_translation(QM_CLIENT_FILES ${TS_CLIENT_FILES})
|
|
||||||
qt5_add_translation(QM_LRC_FILES ${TS_LRC_FILES})
|
qt_add_translation(QM_CLIENT_FILES ${TS_CLIENT_FILES})
|
||||||
|
qt_add_translation(QM_LRC_FILES ${TS_LRC_FILES})
|
||||||
target_sources(${PROJECT_NAME} PRIVATE ${QM_CLIENT_FILES})
|
target_sources(${PROJECT_NAME} PRIVATE ${QM_CLIENT_FILES})
|
||||||
target_sources(${PROJECT_NAME} PRIVATE ${QM_LRC_FILES})
|
target_sources(${PROJECT_NAME} PRIVATE ${QM_LRC_FILES})
|
||||||
endif()
|
endif()
|
||||||
|
@ -426,7 +442,7 @@ if(MSVC)
|
||||||
# executable name
|
# executable name
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "Jami")
|
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "Jami")
|
||||||
else()
|
else()
|
||||||
target_link_libraries(${PROJECT_NAME}
|
target_link_libraries(${PROJECT_NAME} PRIVATE
|
||||||
${QML_LIBS}
|
${QML_LIBS}
|
||||||
${LRC_LIB_NAME}
|
${LRC_LIB_NAME}
|
||||||
${qrencode}
|
${qrencode}
|
||||||
|
@ -516,12 +532,13 @@ else()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# translations
|
# translations
|
||||||
if(Qt5LinguistTools_FOUND)
|
if(Qt${QT_VERSION_MAJOR}LinguistTools_FOUND)
|
||||||
message("Releasing and copying translation files")
|
message("Releasing and copying translation files")
|
||||||
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/share/ring/translations/")
|
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/share/ring/translations/")
|
||||||
file(GLOB TS_FILES ${PROJECT_SOURCE_DIR}/translations/*.ts)
|
file(GLOB TS_FILES ${PROJECT_SOURCE_DIR}/translations/*.ts)
|
||||||
set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION "share/ring/translations")
|
set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION "share/ring/translations")
|
||||||
qt5_add_translation(QM_FILES ${TS_FILES})
|
|
||||||
|
qt_add_translation(QM_FILES ${TS_FILES})
|
||||||
add_custom_target(translations ALL DEPENDS ${QM_FILES})
|
add_custom_target(translations ALL DEPENDS ${QM_FILES})
|
||||||
install(DIRECTORY "${CMAKE_BINARY_DIR}/share/ring/translations/"
|
install(DIRECTORY "${CMAKE_BINARY_DIR}/share/ring/translations/"
|
||||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/ring/translations)
|
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/ring/translations)
|
||||||
|
@ -537,6 +554,10 @@ else()
|
||||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
|
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
qt_import_qml_plugins(${PROJECT_NAME})
|
||||||
|
qt_finalize_executable(${PROJECT_NAME})
|
||||||
|
|
||||||
# test
|
# test
|
||||||
if(ENABLE_TESTS)
|
if(ENABLE_TESTS)
|
||||||
message("Add Jami tests")
|
message("Add Jami tests")
|
||||||
|
|
|
@ -12,7 +12,7 @@ from enum import Enum
|
||||||
# vs help
|
# vs help
|
||||||
win_sdk_default = '10.0.16299.0'
|
win_sdk_default = '10.0.16299.0'
|
||||||
win_toolset_default = '142'
|
win_toolset_default = '142'
|
||||||
qt_version_default = '5.15.0'
|
qt_version_default = '6.2.0'
|
||||||
|
|
||||||
vs_where_path = os.path.join(
|
vs_where_path = os.path.join(
|
||||||
os.environ['ProgramFiles(x86)'], 'Microsoft Visual Studio', 'Installer', 'vswhere.exe'
|
os.environ['ProgramFiles(x86)'], 'Microsoft Visual Studio', 'Installer', 'vswhere.exe'
|
||||||
|
@ -22,6 +22,7 @@ host_is_64bit = (False, True)[platform.machine().endswith('64')]
|
||||||
this_dir = os.path.dirname(os.path.realpath(__file__))
|
this_dir = os.path.dirname(os.path.realpath(__file__))
|
||||||
build_dir = os.path.join(this_dir, 'build')
|
build_dir = os.path.join(this_dir, 'build')
|
||||||
temp_path = os.environ['TEMP']
|
temp_path = os.environ['TEMP']
|
||||||
|
openssl_include_dir = 'C:\\Qt\\Tools\\OpenSSL\\Win_x64\\include\\openssl'
|
||||||
|
|
||||||
# project path
|
# project path
|
||||||
jami_qt_project = os.path.join(build_dir, 'jami-qt.vcxproj')
|
jami_qt_project = os.path.join(build_dir, 'jami-qt.vcxproj')
|
||||||
|
@ -214,20 +215,37 @@ def build(arch, toolset, sdk_version, config_str, project_path_under_current_pat
|
||||||
|
|
||||||
qt_dir = os.path.join("C:\\", 'Qt', qtver)
|
qt_dir = os.path.join("C:\\", 'Qt', qtver)
|
||||||
cmake_gen = getCMakeGenerator(getLatestVSVersion())
|
cmake_gen = getCMakeGenerator(getLatestVSVersion())
|
||||||
msvc_folder = 'msvc2019_64'
|
qt_major_version = getQtVersionNumber(qtver, QtVerison.Major)
|
||||||
|
qt_general_macro = 'Qt' + qt_major_version
|
||||||
|
msvc_folder = '\\msvc2019_64'
|
||||||
|
|
||||||
|
qt_cmake_dir = qt_dir + msvc_folder + '\\lib\\cmake\\'
|
||||||
|
cmake_prefix_path = qt_dir + msvc_folder
|
||||||
|
|
||||||
qt_cmake_dir = os.path.join(qt_dir, msvc_folder, 'lib', 'cmake')
|
qt_cmake_dir = os.path.join(qt_dir, msvc_folder, 'lib', 'cmake')
|
||||||
cmake_prefix_path = os.path.join(qt_dir, msvc_folder)
|
cmake_prefix_path = os.path.join(qt_dir, msvc_folder)
|
||||||
cmake_options = [
|
cmake_options = [
|
||||||
'-DCMAKE_PREFIX_PATH=' + cmake_prefix_path,
|
'-DCMAKE_PREFIX_PATH=' + cmake_prefix_path,
|
||||||
'-DQt5_DIR=' + qt_cmake_dir + 'Qt5',
|
'-DOPENSSL_INCLUDE_DIR=' + openssl_include_dir,
|
||||||
'-DQt5Core_DIR=' + qt_cmake_dir + 'Qt5Core',
|
'-DQT_DIR=' + qt_dir + msvc_folder,
|
||||||
'-DQt5Sql_DIR=' + qt_cmake_dir + 'Qt5Sql',
|
'-D' + qt_general_macro + '_DIR=' + qt_cmake_dir + qt_general_macro,
|
||||||
'-DQt5LinguistTools_DIR=' + qt_cmake_dir + 'Qt5LinguistTools',
|
'-D' + qt_general_macro + 'Core_DIR=' + qt_cmake_dir + qt_general_macro + 'Core',
|
||||||
'-DQt5Concurrent_DIR=' + qt_cmake_dir + 'Qt5Concurrent',
|
'-D' + qt_general_macro + 'Core5Compat_DIR=' + qt_cmake_dir + qt_general_macro + 'Core5Compat',
|
||||||
'-DQt5Gui_DIR=' + qt_cmake_dir + 'Qt5Gui',
|
'-D' + qt_general_macro + 'WebEngineCore_DIR=' + qt_cmake_dir + qt_general_macro + 'WebEngineCore',
|
||||||
'-DQt5Test_DIR=' + qt_cmake_dir + 'Qt5Test',
|
'-D' + qt_general_macro + 'WebEngineQuick_DIR=' + qt_cmake_dir + qt_general_macro + 'WebEngineQuick',
|
||||||
'-DQt5QuickTest_DIR=' + qt_cmake_dir + 'Qt5QuickTest',
|
'-D' + qt_general_macro + 'WebChannel_DIR=' + qt_cmake_dir + qt_general_macro + 'WebChannel',
|
||||||
|
'-D' + qt_general_macro + 'WebEngineWidgets_DIR=' + qt_cmake_dir + qt_general_macro + 'WebEngineWidgets',
|
||||||
|
'-D' + qt_general_macro + 'Sql_DIR=' + qt_cmake_dir + qt_general_macro + 'Sql',
|
||||||
|
'-D' + qt_general_macro + 'LinguistTools_DIR=' + qt_cmake_dir + qt_general_macro + 'LinguistTools',
|
||||||
|
'-D' + qt_general_macro + 'Concurrent_DIR=' + qt_cmake_dir + qt_general_macro + 'Concurrent',
|
||||||
|
'-D' + qt_general_macro + 'Network_DIR=' + qt_cmake_dir + qt_general_macro + 'Network',
|
||||||
|
'-D' + qt_general_macro + 'NetworkAuth_DIR=' + qt_cmake_dir + qt_general_macro + 'NetworkAuth',
|
||||||
|
'-D' + qt_general_macro + 'Gui_DIR=' + qt_cmake_dir + qt_general_macro + 'Gui',
|
||||||
|
'-D' + qt_general_macro + 'Qml_DIR=' + qt_cmake_dir + qt_general_macro + 'Qml',
|
||||||
|
'-D' + qt_general_macro + 'QmlModels_DIR=' + qt_cmake_dir + qt_general_macro + 'QmlModels',
|
||||||
|
'-D' + qt_general_macro + 'Positioning_DIR=' + qt_cmake_dir + qt_general_macro + 'Positioning',
|
||||||
|
'-D' + qt_general_macro + 'Test_DIR=' + qt_cmake_dir + qt_general_macro + 'Test',
|
||||||
|
'-D' + qt_general_macro + 'QuickTest_DIR=' + qt_cmake_dir + qt_general_macro + 'QuickTest',
|
||||||
'-DENABLE_TESTS=' + (str("ENABLE_TESTS") if test_building_type != TestBuilding.NoTests else ''),
|
'-DENABLE_TESTS=' + (str("ENABLE_TESTS") if test_building_type != TestBuilding.NoTests else ''),
|
||||||
'-DCMAKE_SYSTEM_VERSION=' + sdk_version
|
'-DCMAKE_SYSTEM_VERSION=' + sdk_version
|
||||||
]
|
]
|
||||||
|
@ -384,6 +402,10 @@ def main():
|
||||||
|
|
||||||
parsed_args = parse_args()
|
parsed_args = parse_args()
|
||||||
|
|
||||||
|
if int(getQtVersionNumber(parsed_args.qtver, QtVerison.Major)) < 6:
|
||||||
|
print('We currently only support Qt6')
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
test_building_type = TestBuilding.NoTests
|
test_building_type = TestBuilding.NoTests
|
||||||
|
|
||||||
if parsed_args.withtest:
|
if parsed_args.withtest:
|
||||||
|
|
7
qml.qrc
7
qml.qrc
|
@ -10,7 +10,7 @@
|
||||||
<file>src/commoncomponents/PasswordDialog.qml</file>
|
<file>src/commoncomponents/PasswordDialog.qml</file>
|
||||||
<file>src/commoncomponents/MaterialLineEdit.qml</file>
|
<file>src/commoncomponents/MaterialLineEdit.qml</file>
|
||||||
<file>src/commoncomponents/PhotoboothView.qml</file>
|
<file>src/commoncomponents/PhotoboothView.qml</file>
|
||||||
<file>src/commoncomponents/ListViewJami.qml</file>
|
<file>src/commoncomponents/JamiListView.qml</file>
|
||||||
<file>src/commoncomponents/DeleteAccountDialog.qml</file>
|
<file>src/commoncomponents/DeleteAccountDialog.qml</file>
|
||||||
<file>src/commoncomponents/CustomBorder.qml</file>
|
<file>src/commoncomponents/CustomBorder.qml</file>
|
||||||
<file>src/commoncomponents/PushButton.qml</file>
|
<file>src/commoncomponents/PushButton.qml</file>
|
||||||
|
@ -41,8 +41,6 @@
|
||||||
<file>src/settingsview/components/AudioSettings.qml</file>
|
<file>src/settingsview/components/AudioSettings.qml</file>
|
||||||
<file>src/settingsview/components/VideoSettings.qml</file>
|
<file>src/settingsview/components/VideoSettings.qml</file>
|
||||||
<file>src/settingsview/components/GeneralSettingsPage.qml</file>
|
<file>src/settingsview/components/GeneralSettingsPage.qml</file>
|
||||||
<file>src/settingsview/components/KeyBoardShortcutTable.qml</file>
|
|
||||||
<file>src/settingsview/components/KeyBoardShortcutKey.qml</file>
|
|
||||||
<file>src/settingsview/components/PluginSettingsPage.qml</file>
|
<file>src/settingsview/components/PluginSettingsPage.qml</file>
|
||||||
<file>src/settingsview/components/PluginListSettingsView.qml</file>
|
<file>src/settingsview/components/PluginListSettingsView.qml</file>
|
||||||
<file>src/settingsview/components/PluginListPreferencesView.qml</file>
|
<file>src/settingsview/components/PluginListPreferencesView.qml</file>
|
||||||
|
@ -172,5 +170,8 @@
|
||||||
<file>src/commoncomponents/DataTransferMessageDelegate.qml</file>
|
<file>src/commoncomponents/DataTransferMessageDelegate.qml</file>
|
||||||
<file>src/mainview/components/ScrollToBottomButton.qml</file>
|
<file>src/mainview/components/ScrollToBottomButton.qml</file>
|
||||||
<file>src/commoncomponents/TypingDots.qml</file>
|
<file>src/commoncomponents/TypingDots.qml</file>
|
||||||
|
<file>src/commoncomponents/JamiScrollBar.qml</file>
|
||||||
|
<file>qtquickcontrols2.conf</file>
|
||||||
|
<file>src/commoncomponents/JamiFlickable.qml</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
9
qtquickcontrols2.conf
Normal file
9
qtquickcontrols2.conf
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
; This file can be edited to change the style of the application
|
||||||
|
; Read "Qt Quick Controls 2 Configuration File" for details:
|
||||||
|
; https://doc.qt.io/qt/qtquickcontrols2-configuration.html
|
||||||
|
|
||||||
|
[Controls]
|
||||||
|
Style=Universal
|
||||||
|
|
||||||
|
[Universal]
|
||||||
|
Theme=Light
|
|
@ -16,11 +16,10 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
import QtQuick.Controls.Universal 2.15
|
import Qt5Compat.GraphicalEffects
|
||||||
import QtGraphicalEffects 1.15
|
|
||||||
|
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
|
@ -33,8 +32,6 @@ ApplicationWindow {
|
||||||
property bool connectionFailed: false
|
property bool connectionFailed: false
|
||||||
property int preferredMargin: 15
|
property int preferredMargin: 15
|
||||||
|
|
||||||
Universal.theme: Universal.Light
|
|
||||||
|
|
||||||
title: "Jami"
|
title: "Jami"
|
||||||
|
|
||||||
width: 600
|
width: 600
|
||||||
|
@ -201,7 +198,7 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
overlay.modal: ColorOverlay {
|
Overlay.modal: ColorOverlay {
|
||||||
source: root.contentItem
|
source: root.contentItem
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
|
|
|
@ -20,12 +20,11 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Window 2.15
|
import QtQuick.Window
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
import QtQuick.Controls.Universal 2.15
|
import Qt5Compat.GraphicalEffects
|
||||||
import QtGraphicalEffects 1.15
|
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
|
@ -40,55 +39,18 @@ import "commoncomponents"
|
||||||
ApplicationWindow {
|
ApplicationWindow {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property ApplicationWindow appWindow : root
|
|
||||||
|
|
||||||
// To facilitate reparenting of the callview during
|
|
||||||
// fullscreen mode, we need QQuickItem based object.
|
|
||||||
Item {
|
|
||||||
id: appContainer
|
|
||||||
anchors.fill: parent
|
|
||||||
}
|
|
||||||
property bool isFullScreen: false
|
|
||||||
visibility: !visible ?
|
|
||||||
Window.Hidden : (isFullScreen ?
|
|
||||||
Window.FullScreen :
|
|
||||||
Window.Windowed)
|
|
||||||
function toggleFullScreen() {
|
|
||||||
isFullScreen = !isFullScreen
|
|
||||||
}
|
|
||||||
|
|
||||||
enum LoadedSource {
|
enum LoadedSource {
|
||||||
WizardView = 0,
|
WizardView = 0,
|
||||||
MainView,
|
MainView,
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
Universal.theme: Universal.Light
|
property ApplicationWindow appWindow : root
|
||||||
|
property bool isFullScreen: false
|
||||||
|
|
||||||
title: JamiStrings.appTitle
|
function toggleFullScreen() {
|
||||||
|
isFullScreen = !isFullScreen
|
||||||
width: {
|
|
||||||
if (checkLoadedSource() === MainApplicationWindow.LoadedSource.WizardView)
|
|
||||||
return JamiTheme.wizardViewMinWidth
|
|
||||||
return JamiTheme.mainViewPreferredWidth
|
|
||||||
}
|
}
|
||||||
height: {
|
|
||||||
if (checkLoadedSource() === MainApplicationWindow.LoadedSource.WizardView)
|
|
||||||
return JamiTheme.wizardViewMinHeight
|
|
||||||
return JamiTheme.mainViewPreferredHeight
|
|
||||||
}
|
|
||||||
minimumWidth: {
|
|
||||||
if (checkLoadedSource() === MainApplicationWindow.LoadedSource.WizardView)
|
|
||||||
return JamiTheme.wizardViewMinWidth
|
|
||||||
return JamiTheme.mainViewMinWidth
|
|
||||||
}
|
|
||||||
minimumHeight: {
|
|
||||||
if (checkLoadedSource() === MainApplicationWindow.LoadedSource.WizardView)
|
|
||||||
return JamiTheme.wizardViewMinHeight
|
|
||||||
return JamiTheme.mainViewMinHeight
|
|
||||||
}
|
|
||||||
|
|
||||||
visible: mainApplicationLoader.status === Loader.Ready
|
|
||||||
|
|
||||||
function checkLoadedSource() {
|
function checkLoadedSource() {
|
||||||
var sourceString = mainApplicationLoader.source.toString()
|
var sourceString = mainApplicationLoader.source.toString()
|
||||||
|
@ -123,7 +85,45 @@ ApplicationWindow {
|
||||||
hide()
|
hide()
|
||||||
}
|
}
|
||||||
|
|
||||||
AccountMigrationDialog{
|
visibility: !visible ?
|
||||||
|
Window.Hidden : (isFullScreen ?
|
||||||
|
Window.FullScreen :
|
||||||
|
Window.Windowed)
|
||||||
|
|
||||||
|
title: JamiStrings.appTitle
|
||||||
|
|
||||||
|
width: {
|
||||||
|
if (checkLoadedSource() === MainApplicationWindow.LoadedSource.WizardView)
|
||||||
|
return JamiTheme.wizardViewMinWidth
|
||||||
|
return JamiTheme.mainViewPreferredWidth
|
||||||
|
}
|
||||||
|
height: {
|
||||||
|
if (checkLoadedSource() === MainApplicationWindow.LoadedSource.WizardView)
|
||||||
|
return JamiTheme.wizardViewMinHeight
|
||||||
|
return JamiTheme.mainViewPreferredHeight
|
||||||
|
}
|
||||||
|
minimumWidth: {
|
||||||
|
if (checkLoadedSource() === MainApplicationWindow.LoadedSource.WizardView)
|
||||||
|
return JamiTheme.wizardViewMinWidth
|
||||||
|
return JamiTheme.mainViewMinWidth
|
||||||
|
}
|
||||||
|
minimumHeight: {
|
||||||
|
if (checkLoadedSource() === MainApplicationWindow.LoadedSource.WizardView)
|
||||||
|
return JamiTheme.wizardViewMinHeight
|
||||||
|
return JamiTheme.mainViewMinHeight
|
||||||
|
}
|
||||||
|
|
||||||
|
visible: mainApplicationLoader.status === Loader.Ready
|
||||||
|
|
||||||
|
// To facilitate reparenting of the callview during
|
||||||
|
// fullscreen mode, we need QQuickItem based object.
|
||||||
|
Item {
|
||||||
|
id: appContainer
|
||||||
|
|
||||||
|
anchors.fill: parent
|
||||||
|
}
|
||||||
|
|
||||||
|
AccountMigrationDialog {
|
||||||
id: accountMigrationDialog
|
id: accountMigrationDialog
|
||||||
|
|
||||||
visible: false
|
visible: false
|
||||||
|
@ -165,17 +165,6 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
overlay.modal: ColorOverlay {
|
|
||||||
source: root.contentItem
|
|
||||||
color: "transparent"
|
|
||||||
|
|
||||||
// Color animation for overlay when pop up is shown.
|
|
||||||
ColorAnimation on color {
|
|
||||||
to: Qt.rgba(0, 0, 0, 0.33)
|
|
||||||
duration: 500
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: LRCInstance
|
target: LRCInstance
|
||||||
|
|
||||||
|
@ -220,6 +209,17 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Overlay.modal: ColorOverlay {
|
||||||
|
source: root.contentItem
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
|
// Color animation for overlay when pop up is shown.
|
||||||
|
ColorAnimation on color {
|
||||||
|
to: Qt.rgba(0, 0, 0, 0.33)
|
||||||
|
duration: 500
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onClosing: root.close()
|
onClosing: root.close()
|
||||||
|
|
||||||
onScreenChanged: JamiQmlUtils.mainApplicationScreen = root.screen
|
onScreenChanged: JamiQmlUtils.mainApplicationScreen = root.screen
|
||||||
|
|
|
@ -144,7 +144,7 @@ AccountAdapter::createJamiAccount(QString registeredName,
|
||||||
|
|
||||||
connectFailure();
|
connectFailure();
|
||||||
|
|
||||||
QtConcurrent::run([this, settings] {
|
auto futureResult = QtConcurrent::run([this, settings] {
|
||||||
lrcInstance_->accountModel().createNewAccount(lrc::api::profile::Type::JAMI,
|
lrcInstance_->accountModel().createNewAccount(lrc::api::profile::Type::JAMI,
|
||||||
settings["alias"].toString(),
|
settings["alias"].toString(),
|
||||||
settings["archivePath"].toString(),
|
settings["archivePath"].toString(),
|
||||||
|
@ -189,7 +189,7 @@ AccountAdapter::createSIPAccount(const QVariantMap& settings)
|
||||||
|
|
||||||
connectFailure();
|
connectFailure();
|
||||||
|
|
||||||
QtConcurrent::run([this, settings] {
|
auto futureResult = QtConcurrent::run([this, settings] {
|
||||||
lrcInstance_->accountModel().createNewAccount(lrc::api::profile::Type::SIP,
|
lrcInstance_->accountModel().createNewAccount(lrc::api::profile::Type::SIP,
|
||||||
settings["alias"].toString(),
|
settings["alias"].toString(),
|
||||||
settings["archivePath"].toString(),
|
settings["archivePath"].toString(),
|
||||||
|
@ -233,7 +233,7 @@ AccountAdapter::createJAMSAccount(const QVariantMap& settings)
|
||||||
|
|
||||||
connectFailure();
|
connectFailure();
|
||||||
|
|
||||||
QtConcurrent::run([this, settings] {
|
auto futureResult = QtConcurrent::run([this, settings] {
|
||||||
lrcInstance_->accountModel().connectToAccountManager(settings["username"].toString(),
|
lrcInstance_->accountModel().connectToAccountManager(settings["username"].toString(),
|
||||||
settings["password"].toString(),
|
settings["password"].toString(),
|
||||||
settings["manager"].toString());
|
settings["manager"].toString());
|
||||||
|
@ -278,7 +278,7 @@ AccountAdapter::setCurrAccDisplayName(const QString& text)
|
||||||
void
|
void
|
||||||
AccountAdapter::setCurrentAccountAvatarFile(const QString& source)
|
AccountAdapter::setCurrentAccountAvatarFile(const QString& source)
|
||||||
{
|
{
|
||||||
QtConcurrent::run([this, source]() {
|
auto futureResult = QtConcurrent::run([this, source]() {
|
||||||
QPixmap image;
|
QPixmap image;
|
||||||
if (!image.load(source)) {
|
if (!image.load(source)) {
|
||||||
qWarning() << "Not a valid image file";
|
qWarning() << "Not a valid image file";
|
||||||
|
@ -298,7 +298,7 @@ AccountAdapter::setCurrentAccountAvatarFile(const QString& source)
|
||||||
void
|
void
|
||||||
AccountAdapter::setCurrentAccountAvatarBase64(const QString& data)
|
AccountAdapter::setCurrentAccountAvatarBase64(const QString& data)
|
||||||
{
|
{
|
||||||
QtConcurrent::run([this, data]() {
|
auto futureResult = QtConcurrent::run([this, data]() {
|
||||||
auto accountId = lrcInstance_->get_currentAccountId();
|
auto accountId = lrcInstance_->get_currentAccountId();
|
||||||
lrcInstance_->accountModel().setAvatar(accountId, data);
|
lrcInstance_->accountModel().setAvatar(accountId, data);
|
||||||
});
|
});
|
||||||
|
@ -346,7 +346,7 @@ AccountAdapter::exportToFile(const QString& accountId,
|
||||||
void
|
void
|
||||||
AccountAdapter::setArchivePasswordAsync(const QString& accountID, const QString& password)
|
AccountAdapter::setArchivePasswordAsync(const QString& accountID, const QString& password)
|
||||||
{
|
{
|
||||||
QtConcurrent::run([this, accountID, password] {
|
auto futureResult = QtConcurrent::run([this, accountID, password] {
|
||||||
auto config = lrcInstance_->accountModel().getAccountConfig(accountID);
|
auto config = lrcInstance_->accountModel().getAccountConfig(accountID);
|
||||||
config.archivePassword = password;
|
config.archivePassword = password;
|
||||||
lrcInstance_->accountModel().setAccountConfig(accountID, config);
|
lrcInstance_->accountModel().setAccountConfig(accountID, config);
|
||||||
|
|
|
@ -129,7 +129,7 @@ AvAdapter::shareAllScreens()
|
||||||
void
|
void
|
||||||
AvAdapter::captureScreen(int screenNumber)
|
AvAdapter::captureScreen(int screenNumber)
|
||||||
{
|
{
|
||||||
QtConcurrent::run([this, screenNumber]() {
|
auto futureResult = QtConcurrent::run([this, screenNumber]() {
|
||||||
QScreen* screen = QGuiApplication::screens().at(screenNumber);
|
QScreen* screen = QGuiApplication::screens().at(screenNumber);
|
||||||
if (!screen)
|
if (!screen)
|
||||||
return;
|
return;
|
||||||
|
@ -149,7 +149,7 @@ AvAdapter::captureScreen(int screenNumber)
|
||||||
void
|
void
|
||||||
AvAdapter::captureAllScreens()
|
AvAdapter::captureAllScreens()
|
||||||
{
|
{
|
||||||
QtConcurrent::run([this]() {
|
auto futureResult = QtConcurrent::run([this]() {
|
||||||
auto screens = QGuiApplication::screens();
|
auto screens = QGuiApplication::screens();
|
||||||
|
|
||||||
QList<QPixmap> scrs;
|
QList<QPixmap> scrs;
|
||||||
|
@ -338,7 +338,7 @@ AvAdapter::getScreenNumber() const
|
||||||
// Get display
|
// Get display
|
||||||
QString display_env {getenv("DISPLAY")};
|
QString display_env {getenv("DISPLAY")};
|
||||||
if (!display_env.isEmpty()) {
|
if (!display_env.isEmpty()) {
|
||||||
auto list = display_env.split(':', QString::SplitBehavior::SkipEmptyParts);
|
auto list = display_env.split(':', Qt::SkipEmptyParts);
|
||||||
// Should only be one display, so get the first one
|
// Should only be one display, so get the first one
|
||||||
if (list.size() > 0) {
|
if (list.size() > 0) {
|
||||||
display = list.at(0).toInt();
|
display = list.at(0).toInt();
|
||||||
|
|
|
@ -344,10 +344,9 @@ CallOverlayModel::eventFilter(QObject* object, QEvent* event)
|
||||||
{
|
{
|
||||||
if (event->type() == QEvent::MouseMove) {
|
if (event->type() == QEvent::MouseMove) {
|
||||||
auto mouseEvent = static_cast<QMouseEvent*>(event);
|
auto mouseEvent = static_cast<QMouseEvent*>(event);
|
||||||
QPoint eventPos(mouseEvent->x(), mouseEvent->y());
|
|
||||||
auto windowItem = static_cast<QQuickWindow*>(object)->contentItem();
|
auto windowItem = static_cast<QQuickWindow*>(object)->contentItem();
|
||||||
Q_FOREACH (const auto& item, watchedItems_) {
|
Q_FOREACH (const auto& item, watchedItems_) {
|
||||||
if (item->contains(windowItem->mapToItem(item, eventPos))) {
|
if (item->contains(windowItem->mapToItem(item, mouseEvent->pos()))) {
|
||||||
Q_EMIT mouseMoved(item);
|
Q_EMIT mouseMoved(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,10 +16,10 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Window 2.15
|
import QtQuick.Window
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
|
@ -194,7 +194,6 @@ Window {
|
||||||
visible: false
|
visible: false
|
||||||
|
|
||||||
title: JamiStrings.authenticate
|
title: JamiStrings.authenticate
|
||||||
modality: Qt.WindowModal
|
|
||||||
flags: Qt.WindowStaysOnTopHint
|
flags: Qt.WindowStaysOnTopHint
|
||||||
|
|
||||||
width: 600
|
width: 600
|
||||||
|
@ -504,7 +503,7 @@ Window {
|
||||||
onSpinnerDisplyStateChanged: {
|
onSpinnerDisplyStateChanged: {
|
||||||
switch (spinnerDisplyState) {
|
switch (spinnerDisplyState) {
|
||||||
case "spinnerLabel_Regular":
|
case "spinnerLabel_Regular":
|
||||||
background = Qt.createQmlObject("import QtQuick 2.15;
|
background = Qt.createQmlObject("import QtQuick;
|
||||||
import \"qrc:/src/constant/\";
|
import \"qrc:/src/constant/\";
|
||||||
AnimatedImage {
|
AnimatedImage {
|
||||||
source: JamiResources.jami_eclipse_spinner_gif
|
source: JamiResources.jami_eclipse_spinner_gif
|
||||||
|
@ -514,7 +513,7 @@ Window {
|
||||||
mipmap: true}", spinnerLabel)
|
mipmap: true}", spinnerLabel)
|
||||||
break
|
break
|
||||||
case "spinnerLabel_Failure":
|
case "spinnerLabel_Failure":
|
||||||
background = Qt.createQmlObject("import QtQuick 2.15;
|
background = Qt.createQmlObject("import QtQuick;
|
||||||
import \"qrc:/src/constant/\";
|
import \"qrc:/src/constant/\";
|
||||||
Image {
|
Image {
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
|
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
@ -64,7 +64,7 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: ScreenInfo
|
target: CurrentScreenInfo
|
||||||
|
|
||||||
function onDevicePixelRatioChanged() {
|
function onDevicePixelRatioChanged() {
|
||||||
image.updateSource()
|
image.updateSource()
|
||||||
|
@ -94,7 +94,7 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
opacity: status === Image.Ready
|
opacity: status === Image.Ready
|
||||||
scale: Math.min(opacity + 0.5, 1.0)
|
scale: Math.min(image.opacity + 0.5, 1.0)
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
|
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Dialogs 1.3
|
import QtQuick.Controls
|
||||||
|
|
||||||
Dialog {
|
Dialog {
|
||||||
id: root
|
id: root
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
|
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
|
|
||||||
// Inspired by
|
// Inspired by
|
||||||
// https://stackoverflow.com/questions/16534489/qml-control-border-width-and-color-on-any-one-side-of-rectangle-element
|
// https://stackoverflow.com/questions/16534489/qml-control-border-width-and-color-on-any-one-side-of-rectangle-element
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
|
|
|
@ -18,11 +18,11 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
import QtGraphicalEffects 1.15
|
import Qt5Compat.GraphicalEffects
|
||||||
import QtWebEngine 1.10
|
import QtWebEngine
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
|
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtWebEngine 1.10
|
import QtWebEngine
|
||||||
import QtWebChannel 1.15
|
import QtWebChannel
|
||||||
|
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
@ -50,14 +50,14 @@ WebEngineView {
|
||||||
id: webViewChannel
|
id: webViewChannel
|
||||||
}
|
}
|
||||||
|
|
||||||
onNavigationRequested: {
|
onNavigationRequested: function (request) {
|
||||||
if (request.navigationType === WebEngineView.LinkClickedNavigation) {
|
if (request.navigationType === WebEngineView.LinkClickedNavigation) {
|
||||||
MessagesAdapter.openUrl(request.url)
|
MessagesAdapter.openUrl(request.url)
|
||||||
request.action = WebEngineView.IgnoreRequest
|
request.action = WebEngineView.IgnoreRequest
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onContextMenuRequested: {
|
onContextMenuRequested: function (request) {
|
||||||
var needContextMenu = request.selectedText.length || request.isContentEditable
|
var needContextMenu = request.selectedText.length || request.isContentEditable
|
||||||
if (!needContextMenu)
|
if (!needContextMenu)
|
||||||
request.accepted = true
|
request.accepted = true
|
||||||
|
|
|
@ -18,9 +18,9 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import Qt.labs.platform 1.1
|
import Qt.labs.platform
|
||||||
|
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
||||||
|
|
50
src/commoncomponents/JamiFlickable.qml
Normal file
50
src/commoncomponents/JamiFlickable.qml
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2020 by Savoir-faire Linux
|
||||||
|
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
|
|
||||||
|
import net.jami.Constants 1.1
|
||||||
|
|
||||||
|
Flickable {
|
||||||
|
id: root
|
||||||
|
|
||||||
|
property bool attachedFlickableMoving: root.moving
|
||||||
|
property alias verticalHandleColor: verticalScrollBar.handleColor
|
||||||
|
property alias horizontalHandleColor: horizontalScrollBar.handleColor
|
||||||
|
|
||||||
|
maximumFlickVelocity: 1024
|
||||||
|
clip: true
|
||||||
|
|
||||||
|
ScrollBar.vertical: JamiScrollBar {
|
||||||
|
id: verticalScrollBar
|
||||||
|
|
||||||
|
attachedFlickableMoving: root.attachedFlickableMoving
|
||||||
|
}
|
||||||
|
ScrollBar.horizontal: JamiScrollBar {
|
||||||
|
id: horizontalScrollBar
|
||||||
|
|
||||||
|
attachedFlickableMoving: root.attachedFlickableMoving
|
||||||
|
orientation: Qt.Horizontal
|
||||||
|
}
|
||||||
|
|
||||||
|
Keys.onLeftPressed: horizontalScrollBar.decrease()
|
||||||
|
Keys.onRightPressed: horizontalScrollBar.increase()
|
||||||
|
Keys.onUpPressed: verticalScrollBar.decrease()
|
||||||
|
Keys.onDownPressed: verticalScrollBar.increase()
|
||||||
|
}
|
|
@ -1,6 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2019-2020 by Savoir-faire Linux
|
* Copyright (C) 2019-2020 by Savoir-faire Linux
|
||||||
* Author: Yang Wang <yang.wang@savoirfairelinux.com>
|
* Author: Yang Wang <yang.wang@savoirfairelinux.com>
|
||||||
|
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -16,32 +17,24 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
|
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
||||||
Rectangle {
|
ListView {
|
||||||
id: listViewBackground
|
id: root
|
||||||
|
|
||||||
property alias model: listView.model
|
layer.mipmap: false
|
||||||
property alias delegate: listView.delegate
|
clip: true
|
||||||
property alias currentIndex: listView.currentIndex
|
maximumFlickVelocity: 1024
|
||||||
|
|
||||||
border.width: 0
|
ScrollBar.vertical: JamiScrollBar {
|
||||||
|
id: verticalScrollBar
|
||||||
|
|
||||||
color: JamiTheme.backgroundColor
|
attachedFlickableMoving: root.moving
|
||||||
|
|
||||||
ListView {
|
|
||||||
id: listView
|
|
||||||
|
|
||||||
anchors.fill: parent
|
|
||||||
|
|
||||||
visible: listViewBackground.visible
|
|
||||||
layer.mipmap: false
|
|
||||||
clip: true
|
|
||||||
maximumFlickVelocity: 1024
|
|
||||||
|
|
||||||
ScrollBar.vertical: ScrollBar { }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Keys.onUpPressed: verticalScrollBar.decrease()
|
||||||
|
Keys.onDownPressed: verticalScrollBar.increase()
|
||||||
}
|
}
|
84
src/commoncomponents/JamiScrollBar.qml
Normal file
84
src/commoncomponents/JamiScrollBar.qml
Normal file
|
@ -0,0 +1,84 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2020 by Savoir-faire Linux
|
||||||
|
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
|
|
||||||
|
import net.jami.Constants 1.1
|
||||||
|
|
||||||
|
// Assumed to be attached to Flickable
|
||||||
|
ScrollBar {
|
||||||
|
id: root
|
||||||
|
|
||||||
|
property bool attachedFlickableMoving: false
|
||||||
|
property alias handleColor: scrollBarRect.color
|
||||||
|
|
||||||
|
active: {
|
||||||
|
if (root.orientation === Qt.Horizontal)
|
||||||
|
return visible
|
||||||
|
else
|
||||||
|
return hovered || pressed || attachedFlickableMoving
|
||||||
|
}
|
||||||
|
hoverEnabled: true
|
||||||
|
orientation: Qt.Vertical
|
||||||
|
|
||||||
|
topPadding: root.orientation === Qt.Vertical ? 2 : 0
|
||||||
|
leftPadding: root.orientation === Qt.Horizontal ? 2 : 0
|
||||||
|
bottomPadding: 2
|
||||||
|
rightPadding: 2
|
||||||
|
|
||||||
|
contentItem: Rectangle {
|
||||||
|
id: scrollBarRect
|
||||||
|
|
||||||
|
implicitHeight: JamiTheme.scrollBarHandleSize
|
||||||
|
implicitWidth: JamiTheme.scrollBarHandleSize
|
||||||
|
radius: width / 2
|
||||||
|
color: pressed ? Qt.darker(JamiTheme.scrollBarHandleColor, 2.0) :
|
||||||
|
JamiTheme.scrollBarHandleColor
|
||||||
|
opacity: 0
|
||||||
|
|
||||||
|
states: State {
|
||||||
|
name: "active"
|
||||||
|
when: root.policy === ScrollBar.AlwaysOn ||
|
||||||
|
(root.active && root.size < 1.0)
|
||||||
|
PropertyChanges {
|
||||||
|
target: root.contentItem
|
||||||
|
opacity: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
transitions: Transition {
|
||||||
|
from: "active"
|
||||||
|
SequentialAnimation {
|
||||||
|
PauseAnimation { duration: JamiTheme.longFadeDuration }
|
||||||
|
NumberAnimation { target: root.contentItem
|
||||||
|
duration: JamiTheme.shortFadeDuration
|
||||||
|
property: "opacity"
|
||||||
|
to: 0.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
background: Rectangle {
|
||||||
|
implicitHeight: scrollBarRect.implicitHeight
|
||||||
|
implicitWidth: scrollBarRect.implicitWidth
|
||||||
|
color: JamiTheme.transparentColor
|
||||||
|
radius: width / 2
|
||||||
|
}
|
||||||
|
}
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
|
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
|
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
|
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
||||||
|
@ -62,8 +62,8 @@ TextField {
|
||||||
color: readOnly? "transparent" : backgroundColor
|
color: readOnly? "transparent" : backgroundColor
|
||||||
}
|
}
|
||||||
|
|
||||||
onReleased: {
|
onReleased: function (event) {
|
||||||
if (event.button == Qt.RightButton)
|
if (event.button === Qt.RightButton)
|
||||||
lineEditContextMenu.openMenuAt(event)
|
lineEditContextMenu.openMenuAt(event)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ TextField {
|
||||||
// Use editingFinished when the info is saved by focus lost
|
// Use editingFinished when the info is saved by focus lost
|
||||||
// (since losing focus will also emit editingFinished)
|
// (since losing focus will also emit editingFinished)
|
||||||
// Use accepted when the info is not saved by focus lost
|
// Use accepted when the info is not saved by focus lost
|
||||||
Keys.onPressed: {
|
Keys.onPressed: function (event) {
|
||||||
if (event.key === Qt.Key_Enter ||
|
if (event.key === Qt.Key_Enter ||
|
||||||
event.key === Qt.Key_Return) {
|
event.key === Qt.Key_Return) {
|
||||||
if (loseFocusWhenEnterPressed)
|
if (loseFocusWhenEnterPressed)
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
|
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtGraphicalEffects 1.0
|
import Qt5Compat.GraphicalEffects
|
||||||
|
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtGraphicalEffects 1.15
|
import Qt5Compat.GraphicalEffects
|
||||||
|
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
||||||
|
@ -29,11 +29,6 @@ Popup {
|
||||||
property bool autoClose: true
|
property bool autoClose: true
|
||||||
property alias backgroundColor: container.color
|
property alias backgroundColor: container.color
|
||||||
|
|
||||||
onContentItemChanged: {
|
|
||||||
if(root.contentItem !== null)
|
|
||||||
root.contentItem.parent = container
|
|
||||||
}
|
|
||||||
|
|
||||||
parent: Overlay.overlay
|
parent: Overlay.overlay
|
||||||
|
|
||||||
// center in parent
|
// center in parent
|
||||||
|
@ -65,9 +60,9 @@ Popup {
|
||||||
horizontalOffset: 3.0
|
horizontalOffset: 3.0
|
||||||
verticalOffset: 3.0
|
verticalOffset: 3.0
|
||||||
radius: container.radius * 4
|
radius: container.radius * 4
|
||||||
samples: JamiTheme.modalPopupDropShadowSamples
|
|
||||||
color: JamiTheme.shadowColor
|
color: JamiTheme.shadowColor
|
||||||
source: container
|
source: container
|
||||||
|
transparentBorder: true
|
||||||
}
|
}
|
||||||
|
|
||||||
enter: Transition {
|
enter: Transition {
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
|
@ -16,10 +16,10 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
import Qt.labs.platform 1.1
|
import Qt.labs.platform
|
||||||
import QtGraphicalEffects 1.15
|
import Qt5Compat.GraphicalEffects
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
|
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
||||||
|
|
|
@ -16,10 +16,10 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
import QtGraphicalEffects 1.15
|
import Qt5Compat.GraphicalEffects
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtGraphicalEffects 1.15
|
import Qt5Compat.GraphicalEffects
|
||||||
|
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
import net.jami.Helpers 1.1
|
import net.jami.Helpers 1.1
|
||||||
|
@ -48,7 +48,7 @@ Item {
|
||||||
height: Math.trunc(containerHeight * Math.sqrt(2) * 0.5) + 3 - padding
|
height: Math.trunc(containerHeight * Math.sqrt(2) * 0.5) + 3 - padding
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: ScreenInfo
|
target: CurrentScreenInfo
|
||||||
|
|
||||||
function onDevicePixelRatioChanged() {
|
function onDevicePixelRatioChanged() {
|
||||||
image.setSourceSize()
|
image.setSourceSize()
|
||||||
|
|
|
@ -16,10 +16,10 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
import QtGraphicalEffects 1.15
|
import Qt5Compat.GraphicalEffects
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
|
|
||||||
// UI dev tool to visualize components/layouts
|
// UI dev tool to visualize components/layouts
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
|
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
||||||
|
@ -111,19 +111,18 @@ ComboBox {
|
||||||
}
|
}
|
||||||
|
|
||||||
popup: Popup {
|
popup: Popup {
|
||||||
|
id: popup
|
||||||
|
|
||||||
y: root.height - 1
|
y: root.height - 1
|
||||||
width: root.width
|
width: root.width
|
||||||
implicitHeight: contentItem.implicitHeight
|
implicitHeight: contentItem.implicitHeight
|
||||||
padding: 1
|
padding: 1
|
||||||
|
|
||||||
contentItem: ListView {
|
contentItem: JamiListView {
|
||||||
id: listView
|
id: listView
|
||||||
|
|
||||||
clip: true
|
implicitHeight: popup.contentHeight
|
||||||
implicitHeight: contentHeight
|
|
||||||
model: root.delegateModel
|
model: root.delegateModel
|
||||||
|
|
||||||
ScrollBar.vertical: ScrollBar {}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtGraphicalEffects 1.15
|
import Qt5Compat.GraphicalEffects
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
|
@ -17,10 +17,10 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
import QtGraphicalEffects 1.15
|
import Qt5Compat.GraphicalEffects
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtGraphicalEffects 1.15
|
import Qt5Compat.GraphicalEffects
|
||||||
|
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtGraphicalEffects 1.15
|
import Qt5Compat.GraphicalEffects
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtGraphicalEffects 1.15
|
import Qt5Compat.GraphicalEffects
|
||||||
|
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
||||||
|
@ -111,8 +111,8 @@ Menu {
|
||||||
horizontalOffset: 3.0
|
horizontalOffset: 3.0
|
||||||
verticalOffset: 3.0
|
verticalOffset: 3.0
|
||||||
radius: 16.0
|
radius: 16.0
|
||||||
samples: 16
|
|
||||||
color: JamiTheme.shadowColor
|
color: JamiTheme.shadowColor
|
||||||
|
transparentBorder: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
|
|
||||||
import "../../commoncomponents/contextmenu"
|
import "../../commoncomponents/contextmenu"
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
||||||
|
@ -54,10 +54,13 @@ MenuItem {
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
id: background
|
id: background
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.leftMargin: 1
|
anchors.leftMargin: 1
|
||||||
anchors.rightMargin: 1
|
anchors.rightMargin: 1
|
||||||
color: "transparent"
|
|
||||||
|
color: menuItemContentRect.hovered ?
|
||||||
|
JamiTheme.hoverColor : JamiTheme.backgroundColor
|
||||||
}
|
}
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -127,25 +130,6 @@ MenuItem {
|
||||||
menuItem.clicked()
|
menuItem.clicked()
|
||||||
parentMenu.close()
|
parentMenu.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
states: [
|
|
||||||
State {
|
|
||||||
name: "hovered"
|
|
||||||
when: hovered
|
|
||||||
PropertyChanges {
|
|
||||||
target: background
|
|
||||||
color: JamiTheme.hoverColor
|
|
||||||
}
|
|
||||||
},
|
|
||||||
State {
|
|
||||||
name: "normal"
|
|
||||||
when: !hovered
|
|
||||||
PropertyChanges {
|
|
||||||
target: background
|
|
||||||
color: JamiTheme.backgroundColor
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
highlighted: true
|
highlighted: true
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
|
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
||||||
|
|
|
@ -16,10 +16,10 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtWebEngine 1.10
|
import QtWebEngine
|
||||||
import QtWebChannel 1.15
|
import QtWebChannel
|
||||||
|
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
|
@ -82,8 +82,8 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onLoadingChanged: {
|
onLoadingChanged: function (loadingInfo) {
|
||||||
if (loadRequest.status == WebEngineView.LoadSucceededStatus) {
|
if (loadingInfo.status === WebEngineView.LoadSucceededStatus) {
|
||||||
emojiPickerWebView.runJavaScript(UtilsAdapter.qStringFromFile(
|
emojiPickerWebView.runJavaScript(UtilsAdapter.qStringFromFile(
|
||||||
":qwebchannel.js"))
|
":qwebchannel.js"))
|
||||||
emojiPickerWebView.runJavaScript(
|
emojiPickerWebView.runJavaScript(
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
// JamiQmlUtils as a singleton is to provide global property entry
|
// JamiQmlUtils as a singleton is to provide global property entry
|
||||||
pragma Singleton
|
pragma Singleton
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
|
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
// JamiStrings as a singleton is to provide global strings entries.
|
// JamiStrings as a singleton is to provide global strings entries.
|
||||||
pragma Singleton
|
pragma Singleton
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
|
|
||||||
import net.jami.Helpers 1.1
|
import net.jami.Helpers 1.1
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
// JamiTheme as a singleton is to provide global theme property entry.
|
// JamiTheme as a singleton is to provide global theme property entry.
|
||||||
pragma Singleton
|
pragma Singleton
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
|
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
import net.jami.Enums 1.1
|
import net.jami.Enums 1.1
|
||||||
|
@ -173,6 +173,9 @@ Item {
|
||||||
// Files To Send Container
|
// Files To Send Container
|
||||||
property color removeFileButtonColor: Qt.rgba(96, 95, 97, 0.5)
|
property color removeFileButtonColor: Qt.rgba(96, 95, 97, 0.5)
|
||||||
|
|
||||||
|
// JamiScrollBar
|
||||||
|
property color scrollBarHandleColor: "#cecece"
|
||||||
|
|
||||||
// TypingDots
|
// TypingDots
|
||||||
property color typingDotsNormalColor: darkTheme ? "#686b72" : "lightgrey"
|
property color typingDotsNormalColor: darkTheme ? "#686b72" : "lightgrey"
|
||||||
property color typingDotsEnlargeColor: darkTheme ? "white" : Qt.darker("lightgrey", 3.0)
|
property color typingDotsEnlargeColor: darkTheme ? "white" : Qt.darker("lightgrey", 3.0)
|
||||||
|
@ -194,6 +197,7 @@ Item {
|
||||||
property color bgDarkMode_: rgba256(32, 32, 32, 100)
|
property color bgDarkMode_: rgba256(32, 32, 32, 100)
|
||||||
|
|
||||||
property int shortFadeDuration: 150
|
property int shortFadeDuration: 150
|
||||||
|
property int longFadeDuration: 400
|
||||||
property int recordBlinkDuration: 500
|
property int recordBlinkDuration: 500
|
||||||
property int overlayFadeDelay: 4000
|
property int overlayFadeDelay: 4000
|
||||||
property int overlayFadeDuration: 250
|
property int overlayFadeDuration: 250
|
||||||
|
@ -274,7 +278,6 @@ Item {
|
||||||
|
|
||||||
// Modal Popup
|
// Modal Popup
|
||||||
property real modalPopupRadius: 4
|
property real modalPopupRadius: 4
|
||||||
property real modalPopupDropShadowSamples: 16
|
|
||||||
|
|
||||||
// MessageWebView
|
// MessageWebView
|
||||||
property real chatViewHairLineSize: 1
|
property real chatViewHairLineSize: 1
|
||||||
|
@ -336,6 +339,9 @@ Item {
|
||||||
property real usernameLineEditPointSize: 9
|
property real usernameLineEditPointSize: 9
|
||||||
property real usernameLineEditlookupInterval: 200
|
property real usernameLineEditlookupInterval: 200
|
||||||
|
|
||||||
|
// JamiScrollBar
|
||||||
|
property int scrollBarHandleSize: 6
|
||||||
|
|
||||||
// Main application spec
|
// Main application spec
|
||||||
property real mainViewMinWidth: 332
|
property real mainViewMinWidth: 332
|
||||||
property real mainViewMinHeight: 500
|
property real mainViewMinHeight: 500
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
pragma Singleton
|
pragma Singleton
|
||||||
import QtQml 2.15
|
import QtQml
|
||||||
QtObject {
|
QtObject {
|
||||||
//readonly property int unknown: -1
|
//readonly property int unknown: -1
|
||||||
readonly property int single: 0
|
readonly property int single: 0
|
||||||
|
|
|
@ -49,18 +49,20 @@ ContactAdapter::getContactSelectableModel(int type)
|
||||||
// Adjust filter.
|
// Adjust filter.
|
||||||
switch (listModeltype_) {
|
switch (listModeltype_) {
|
||||||
case SmartListModel::Type::CONVERSATION:
|
case SmartListModel::Type::CONVERSATION:
|
||||||
selectableProxyModel_->setPredicate([this](const QModelIndex& index, const QRegExp&) {
|
selectableProxyModel_->setPredicate(
|
||||||
return !defaultModerators_.contains(index.data(Role::URI).toString());
|
[this](const QModelIndex& index, const QRegularExpression&) {
|
||||||
});
|
return !defaultModerators_.contains(index.data(Role::URI).toString());
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SmartListModel::Type::CONFERENCE:
|
case SmartListModel::Type::CONFERENCE:
|
||||||
selectableProxyModel_->setPredicate([](const QModelIndex& index, const QRegExp&) {
|
selectableProxyModel_->setPredicate([](const QModelIndex& index, const QRegularExpression&) {
|
||||||
return index.data(Role::Presence).toBool();
|
return index.data(Role::Presence).toBool();
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case SmartListModel::Type::TRANSFER:
|
case SmartListModel::Type::TRANSFER:
|
||||||
selectableProxyModel_->setPredicate([this](const QModelIndex& index, const QRegExp& regexp) {
|
selectableProxyModel_->setPredicate([this](const QModelIndex& index,
|
||||||
|
const QRegularExpression& regexp) {
|
||||||
// Exclude current sip callee and filtered contact.
|
// Exclude current sip callee and filtered contact.
|
||||||
bool match = true;
|
bool match = true;
|
||||||
const auto& conv = lrcInstance_->getConversationFromConvUid(
|
const auto& conv = lrcInstance_->getConversationFromConvUid(
|
||||||
|
@ -70,12 +72,13 @@ ContactAdapter::getContactSelectableModel(int type)
|
||||||
->getAccountInfo(lrcInstance_->get_currentAccountId())
|
->getAccountInfo(lrcInstance_->get_currentAccountId())
|
||||||
.contactModel->bestIdForContact(conv.participants[0]);
|
.contactModel->bestIdForContact(conv.participants[0]);
|
||||||
|
|
||||||
QRegExp matchExcept = QRegExp(QString("\\b(?!" + calleeDisplayId + "\\b)\\w+"));
|
QRegularExpression matchExcept = QRegularExpression(
|
||||||
match = matchExcept.indexIn(index.data(Role::BestId).toString()) != -1;
|
QString("\\b(?!" + calleeDisplayId + "\\b)\\w+"));
|
||||||
|
match = matchExcept.match(index.data(Role::BestId).toString()).hasMatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (match) {
|
if (match) {
|
||||||
match = regexp.indexIn(index.data(Role::BestId).toString()) != -1;
|
match = regexp.match(index.data(Role::BestId).toString()).hasMatch();
|
||||||
}
|
}
|
||||||
return match && !index.parent().isValid();
|
return match && !index.parent().isValid();
|
||||||
});
|
});
|
||||||
|
@ -95,13 +98,13 @@ ContactAdapter::setSearchFilter(const QString& filter)
|
||||||
smartListModel_->setConferenceableFilter(filter);
|
smartListModel_->setConferenceableFilter(filter);
|
||||||
} else if (listModeltype_ == SmartListModel::Type::CONVERSATION) {
|
} else if (listModeltype_ == SmartListModel::Type::CONVERSATION) {
|
||||||
selectableProxyModel_->setPredicate(
|
selectableProxyModel_->setPredicate(
|
||||||
[this, filter](const QModelIndex& index, const QRegExp&) {
|
[this, filter](const QModelIndex& index, const QRegularExpression&) {
|
||||||
return (!defaultModerators_.contains(index.data(Role::URI).toString())
|
return (!defaultModerators_.contains(index.data(Role::URI).toString())
|
||||||
&& index.data(Role::Title).toString().contains(filter));
|
&& index.data(Role::Title).toString().contains(filter));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
selectableProxyModel_->setFilterRegExp(
|
selectableProxyModel_->setFilterRegularExpression(
|
||||||
QRegExp(filter, Qt::CaseInsensitive, QRegExp::FixedString));
|
QRegularExpression(filter, QRegularExpression::CaseInsensitiveOption));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -190,9 +193,10 @@ ContactAdapter::contactSelected(int index)
|
||||||
void
|
void
|
||||||
ContactAdapter::connectSignals()
|
ContactAdapter::connectSignals()
|
||||||
{
|
{
|
||||||
connect(lrcInstance_->getCurrentContactModel(),
|
if (lrcInstance_->getCurrentContactModel())
|
||||||
&ContactModel::bannedStatusChanged,
|
connect(lrcInstance_->getCurrentContactModel(),
|
||||||
this,
|
&ContactModel::bannedStatusChanged,
|
||||||
&ContactAdapter::bannedStatusChanged,
|
this,
|
||||||
Qt::UniqueConnection);
|
&ContactAdapter::bannedStatusChanged,
|
||||||
|
Qt::UniqueConnection);
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ class SelectableProxyModel final : public QSortFilterProxyModel
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
using FilterPredicate = std::function<bool(const QModelIndex&, const QRegExp&)>;
|
using FilterPredicate = std::function<bool(const QModelIndex&, const QRegularExpression&)>;
|
||||||
|
|
||||||
explicit SelectableProxyModel(QObject* parent = nullptr)
|
explicit SelectableProxyModel(QObject* parent = nullptr)
|
||||||
: QSortFilterProxyModel(parent)
|
: QSortFilterProxyModel(parent)
|
||||||
|
@ -61,7 +61,7 @@ public:
|
||||||
{
|
{
|
||||||
// Accept all contacts in conversation list filtered with account type, except those in a call.
|
// Accept all contacts in conversation list filtered with account type, except those in a call.
|
||||||
auto index = sourceModel()->index(sourceRow, 0, sourceParent);
|
auto index = sourceModel()->index(sourceRow, 0, sourceParent);
|
||||||
return filterPredicate_ ? filterPredicate_(index, filterRegExp()) : false;
|
return filterPredicate_ ? filterPredicate_(index, filterRegularExpression()) : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool lessThan(const QModelIndex& left, const QModelIndex& right) const override
|
bool lessThan(const QModelIndex& left, const QModelIndex& right) const override
|
||||||
|
|
|
@ -93,7 +93,7 @@ bool
|
||||||
ConversationListProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex& sourceParent) const
|
ConversationListProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex& sourceParent) const
|
||||||
{
|
{
|
||||||
QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
|
QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
|
||||||
auto rx = filterRegExp();
|
auto rx = filterRegularExpression();
|
||||||
auto uriStripper = URI(rx.pattern());
|
auto uriStripper = URI(rx.pattern());
|
||||||
bool stripScheme = (uriStripper.schemeType() < URI::SchemeType::COUNT__);
|
bool stripScheme = (uriStripper.schemeType() < URI::SchemeType::COUNT__);
|
||||||
FlagPack<URI::Section> flags = URI::Section::USER_INFO | URI::Section::HOSTNAME
|
FlagPack<URI::Section> flags = URI::Section::USER_INFO | URI::Section::HOSTNAME
|
||||||
|
@ -118,16 +118,18 @@ ConversationListProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex& s
|
||||||
|
|
||||||
// banned contacts require exact match
|
// banned contacts require exact match
|
||||||
if (index.data(Role::IsBanned).toBool()) {
|
if (index.data(Role::IsBanned).toBool()) {
|
||||||
if (!rx.isEmpty()) {
|
if (!rx.isValid()) {
|
||||||
Q_FOREACH (const auto& filter, toFilter)
|
Q_FOREACH (const auto& filter, toFilter) {
|
||||||
if (rx.exactMatch(filter)) {
|
auto matchResult = rx.match(filter);
|
||||||
|
if (matchResult.hasMatch() && matchResult.captured(0) == filter) {
|
||||||
match = true;
|
match = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Q_FOREACH (const auto& filter, toFilter)
|
Q_FOREACH (const auto& filter, toFilter)
|
||||||
if (rx.indexIn(filter) != -1) {
|
if (rx.match(filter).hasMatch()) {
|
||||||
match = true;
|
match = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,7 +95,7 @@ ConversationListModelBase::dataForItem(item_t item, int role) const
|
||||||
if (!draft.isEmpty()) {
|
if (!draft.isEmpty()) {
|
||||||
// Pencil Emoji
|
// Pencil Emoji
|
||||||
uint cp = 0x270F;
|
uint cp = 0x270F;
|
||||||
auto emojiString = QString::fromUcs4(&cp, 1);
|
auto emojiString = QString::fromUcs4(reinterpret_cast<char32_t*>(&cp), 1);
|
||||||
return emojiString + draft;
|
return emojiString + draft;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
16
src/main.cpp
16
src/main.cpp
|
@ -24,7 +24,8 @@
|
||||||
|
|
||||||
#include <QCryptographicHash>
|
#include <QCryptographicHash>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QtWebEngine>
|
#include <QtWebEngineCore>
|
||||||
|
#include <QtWebEngineQuick>
|
||||||
|
|
||||||
#include <clocale>
|
#include <clocale>
|
||||||
|
|
||||||
|
@ -74,23 +75,16 @@ main(int argc, char* argv[])
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
qtWebEngineChromiumFlags << disableWebSecurity;
|
qtWebEngineChromiumFlags << disableWebSecurity;
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 2, 0)
|
|
||||||
// To be recovered in Qt 6.2 and above
|
|
||||||
// https://bugs.chromium.org/p/chromium/issues/detail?id=1060099#c6*/
|
|
||||||
qtWebEngineChromiumFlags << singleProcess;
|
qtWebEngineChromiumFlags << singleProcess;
|
||||||
#endif
|
|
||||||
|
QtWebEngineQuick::initialize();
|
||||||
|
|
||||||
QApplication::setApplicationName("Jami");
|
QApplication::setApplicationName("Jami");
|
||||||
QApplication::setOrganizationDomain("jami.net");
|
QApplication::setOrganizationDomain("jami.net");
|
||||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true);
|
|
||||||
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
|
||||||
QApplication::setQuitOnLastWindowClosed(false);
|
QApplication::setQuitOnLastWindowClosed(false);
|
||||||
QCoreApplication::setAttribute(Qt::AA_UseOpenGLES);
|
|
||||||
QCoreApplication::setApplicationVersion(QString(VERSION_STRING));
|
QCoreApplication::setApplicationVersion(QString(VERSION_STRING));
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
|
||||||
QApplication::setHighDpiScaleFactorRoundingPolicy(
|
QApplication::setHighDpiScaleFactorRoundingPolicy(
|
||||||
Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
|
Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
|
||||||
#endif
|
|
||||||
QtWebEngine::initialize();
|
|
||||||
|
|
||||||
auto newArgv = parseInputArgument(argc, argv, qtWebEngineChromiumFlags);
|
auto newArgv = parseInputArgument(argc, argv, qtWebEngineChromiumFlags);
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ ScreenInfo::setCurrentFocusWindow(QWindow* window)
|
||||||
{
|
{
|
||||||
if (window && !currentFocusWindow_) {
|
if (window && !currentFocusWindow_) {
|
||||||
currentFocusWindow_ = window;
|
currentFocusWindow_ = window;
|
||||||
setDevicePixelRatio(currentFocusWindow_->screen()->devicePixelRatio());
|
set_devicePixelRatio(currentFocusWindow_->screen()->devicePixelRatio());
|
||||||
|
|
||||||
disconnect(devicePixelRatioConnection_);
|
disconnect(devicePixelRatioConnection_);
|
||||||
disconnect(currentFocusWindowScreenConnection_);
|
disconnect(currentFocusWindowScreenConnection_);
|
||||||
|
@ -105,11 +105,11 @@ ScreenInfo::setCurrentFocusWindow(QWindow* window)
|
||||||
currentFocusWindowScreenConnection_
|
currentFocusWindowScreenConnection_
|
||||||
= connect(currentFocusWindow_, &QWindow::screenChanged, [this] {
|
= connect(currentFocusWindow_, &QWindow::screenChanged, [this] {
|
||||||
currentFocusWindowScreen_ = currentFocusWindow_->screen();
|
currentFocusWindowScreen_ = currentFocusWindow_->screen();
|
||||||
setDevicePixelRatio(currentFocusWindowScreen_->devicePixelRatio());
|
set_devicePixelRatio(currentFocusWindowScreen_->devicePixelRatio());
|
||||||
|
|
||||||
devicePixelRatioConnection_ = connect(
|
devicePixelRatioConnection_ = connect(
|
||||||
currentFocusWindowScreen_, &QScreen::physicalDotsPerInchChanged, [this] {
|
currentFocusWindowScreen_, &QScreen::physicalDotsPerInchChanged, [this] {
|
||||||
setDevicePixelRatio(currentFocusWindowScreen_->devicePixelRatio());
|
set_devicePixelRatio(currentFocusWindowScreen_->devicePixelRatio());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -270,12 +270,14 @@ MainApplication::loadTranslations()
|
||||||
QTranslator* qtTranslator_name = new QTranslator(this);
|
QTranslator* qtTranslator_name = new QTranslator(this);
|
||||||
if (locale_name != locale_lang) {
|
if (locale_name != locale_lang) {
|
||||||
if (qtTranslator_lang->load("qt_" + locale_lang,
|
if (qtTranslator_lang->load("qt_" + locale_lang,
|
||||||
QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
|
QLibraryInfo::path(QLibraryInfo::TranslationsPath)))
|
||||||
installTranslator(qtTranslator_lang);
|
installTranslator(qtTranslator_lang);
|
||||||
}
|
}
|
||||||
qtTranslator_name->load("qt_" + locale_name,
|
|
||||||
QLibraryInfo::location(QLibraryInfo::TranslationsPath));
|
if (qtTranslator_name->load("qt_" + locale_name,
|
||||||
installTranslator(qtTranslator_name);
|
QLibraryInfo::path(QLibraryInfo::TranslationsPath))) {
|
||||||
|
installTranslator(qtTranslator_name);
|
||||||
|
}
|
||||||
|
|
||||||
QTranslator* lrcTranslator_lang = new QTranslator(this);
|
QTranslator* lrcTranslator_lang = new QTranslator(this);
|
||||||
QTranslator* lrcTranslator_name = new QTranslator(this);
|
QTranslator* lrcTranslator_name = new QTranslator(this);
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "lrcinstance.h"
|
#include "lrcinstance.h"
|
||||||
|
#include "qtutils.h"
|
||||||
|
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
@ -41,24 +42,11 @@ class PreviewEngine;
|
||||||
class ScreenInfo : public QObject
|
class ScreenInfo : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(double devicePixelRatio MEMBER devicePixelRatio_ NOTIFY devicePixelRatioChanged)
|
QML_PROPERTY(double, devicePixelRatio)
|
||||||
public:
|
public:
|
||||||
void setCurrentFocusWindow(QWindow* window);
|
void setCurrentFocusWindow(QWindow* window);
|
||||||
void setDevicePixelRatio(double ratio)
|
|
||||||
{
|
|
||||||
if (ratio != devicePixelRatio_) {
|
|
||||||
devicePixelRatio_ = ratio;
|
|
||||||
|
|
||||||
Q_EMIT devicePixelRatioChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Q_SIGNALS:
|
|
||||||
void devicePixelRatioChanged();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
double devicePixelRatio_ {0.0};
|
|
||||||
|
|
||||||
QMetaObject::Connection currentFocusWindowScreenConnection_;
|
QMetaObject::Connection currentFocusWindowScreenConnection_;
|
||||||
QMetaObject::Connection devicePixelRatioConnection_;
|
QMetaObject::Connection devicePixelRatioConnection_;
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
|
@ -340,7 +340,7 @@ Rectangle {
|
||||||
width: mainViewSidePanelRect.width
|
width: mainViewSidePanelRect.width
|
||||||
height: mainViewSidePanelRect.height
|
height: mainViewSidePanelRect.height
|
||||||
|
|
||||||
onItemSelected: {
|
onItemSelected: function (index) {
|
||||||
settingsView.setSelected(index)
|
settingsView.setSelected(index)
|
||||||
if (sidePanelOnly)
|
if (sidePanelOnly)
|
||||||
sidePanelViewStack.push(settingsView, StackView.Immediate)
|
sidePanelViewStack.push(settingsView, StackView.Immediate)
|
||||||
|
@ -454,8 +454,12 @@ Rectangle {
|
||||||
AboutPopUp {
|
AboutPopUp {
|
||||||
id: aboutPopUpDialog
|
id: aboutPopUpDialog
|
||||||
|
|
||||||
height: Math.min(preferredHeight,
|
onVisibleChanged: {
|
||||||
mainView.height - JamiTheme.preferredMarginSize * 2)
|
height = Qt.binding(function () {
|
||||||
|
return Math.min(preferredHeight,
|
||||||
|
mainView.height - JamiTheme.preferredMarginSize * 2)
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
WelcomePageQrDialog {
|
WelcomePageQrDialog {
|
||||||
|
@ -510,14 +514,6 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Shortcut {
|
|
||||||
sequence: "F10"
|
|
||||||
context: Qt.ApplicationShortcut
|
|
||||||
onActivated: {
|
|
||||||
shortcutsTable.open()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Shortcut {
|
Shortcut {
|
||||||
sequence: "F11"
|
sequence: "F11"
|
||||||
context: Qt.ApplicationShortcut
|
context: Qt.ApplicationShortcut
|
||||||
|
@ -565,8 +561,4 @@ Rectangle {
|
||||||
context: Qt.ApplicationShortcut
|
context: Qt.ApplicationShortcut
|
||||||
onActivated: Qt.quit()
|
onActivated: Qt.quit()
|
||||||
}
|
}
|
||||||
|
|
||||||
KeyBoardShortcutTable {
|
|
||||||
id: shortcutsTable
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
|
@ -37,217 +37,208 @@ ModalPopup {
|
||||||
implicitWidth: 400
|
implicitWidth: 400
|
||||||
color: JamiTheme.backgroundColor
|
color: JamiTheme.backgroundColor
|
||||||
|
|
||||||
ScrollView {
|
JamiFlickable {
|
||||||
id: aboutPopUpScrollView
|
id: aboutPopUpScrollView
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
contentHeight: aboutPopUpContentRectColumnLayout.implicitHeight
|
||||||
ScrollBar.vertical.policy: ScrollBar.AsNeeded
|
|
||||||
|
|
||||||
clip: true
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
id: aboutPopUpContentRectColumnLayout
|
||||||
|
|
||||||
width: Math.max(root.width, implicitWidth)
|
width: Math.max(root.width, implicitWidth)
|
||||||
height: Math.max(aboutPopUpScrollView.height, implicitHeight)
|
height: Math.max(aboutPopUpScrollView.height, implicitHeight)
|
||||||
|
|
||||||
spacing: 0
|
ResponsiveImage {
|
||||||
|
id: aboutPopUPJamiLogoImage
|
||||||
|
|
||||||
ColumnLayout {
|
Layout.alignment: Qt.AlignCenter
|
||||||
id: aboutPopUpContentRectColumnLayout
|
Layout.topMargin: JamiTheme.preferredMarginSize
|
||||||
|
Layout.preferredWidth: 250
|
||||||
|
Layout.preferredHeight: 88
|
||||||
|
|
||||||
|
source: JamiTheme.darkTheme ?
|
||||||
|
JamiResources.logo_jami_standard_coul_white_svg :
|
||||||
|
JamiResources.logo_jami_standard_coul_svg
|
||||||
|
}
|
||||||
|
|
||||||
|
MaterialLineEdit {
|
||||||
|
id: jamiVersionText
|
||||||
|
|
||||||
|
Layout.alignment: Qt.AlignCenter
|
||||||
|
Layout.preferredWidth: contentRect.width
|
||||||
|
|
||||||
|
font.pointSize: JamiTheme.textFontSize
|
||||||
|
|
||||||
|
padding: 0
|
||||||
|
readOnly: true
|
||||||
|
selectByMouse: true
|
||||||
|
|
||||||
|
text: JamiStrings.version + ": " + UtilsAdapter.getVersionStr()
|
||||||
|
color: JamiTheme.textColor
|
||||||
|
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
id: jamiSlogansText
|
||||||
|
|
||||||
|
Layout.alignment: Qt.AlignCenter
|
||||||
|
Layout.preferredWidth: contentRect.width
|
||||||
|
Layout.preferredHeight: textMetricsjamiSlogansText.boundingRect.height
|
||||||
|
Layout.topMargin: 5
|
||||||
|
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
font.pointSize: JamiTheme.textFontSize
|
||||||
|
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
||||||
|
text: textMetricsjamiSlogansText.text
|
||||||
|
color: JamiTheme.textColor
|
||||||
|
|
||||||
|
TextMetrics {
|
||||||
|
id: textMetricsjamiSlogansText
|
||||||
|
font: jamiSlogansText.font
|
||||||
|
text: JamiStrings.slogan
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
id: jamiDeclarationText
|
||||||
|
|
||||||
|
Layout.alignment: Qt.AlignCenter
|
||||||
|
Layout.preferredWidth: contentRect.width
|
||||||
|
Layout.preferredHeight: 40
|
||||||
|
Layout.topMargin: 5
|
||||||
|
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
font.pointSize: JamiTheme.textFontSize
|
||||||
|
color: JamiTheme.textColor
|
||||||
|
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
||||||
|
// TextMetrics does not work for multi-line.
|
||||||
|
text: JamiStrings.declaration
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
id: jamiDeclarationHyperText
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
|
|
||||||
ResponsiveImage {
|
// Strangely, hoveredLink works badly when width grows too large
|
||||||
id: aboutPopUPJamiLogoImage
|
Layout.preferredWidth: 50
|
||||||
|
Layout.preferredHeight: textMetricsjamiDeclarationHyperText.boundingRect.height
|
||||||
|
Layout.topMargin: 5
|
||||||
|
Layout.bottomMargin: 5
|
||||||
|
color: JamiTheme.textColor
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignCenter
|
font.pointSize: JamiTheme.textFontSize
|
||||||
Layout.topMargin: JamiTheme.preferredMarginSize
|
horizontalAlignment: Text.AlignHCenter
|
||||||
Layout.preferredWidth: 250
|
verticalAlignment: Text.AlignVCenter
|
||||||
Layout.preferredHeight: 88
|
|
||||||
|
|
||||||
source: JamiTheme.darkTheme ?
|
text: textMetricsjamiDeclarationHyperText.text
|
||||||
JamiResources.logo_jami_standard_coul_white_svg :
|
onLinkActivated: Qt.openUrlExternally(link)
|
||||||
JamiResources.logo_jami_standard_coul_svg
|
|
||||||
|
TextMetrics {
|
||||||
|
id: textMetricsjamiDeclarationHyperText
|
||||||
|
font: jamiDeclarationHyperText.font
|
||||||
|
text: '<html><style type="text/css"></style><a href="https://jami.net">jami.net</a></html>'
|
||||||
}
|
}
|
||||||
|
|
||||||
MaterialLineEdit {
|
MouseArea {
|
||||||
id: jamiVersionText
|
anchors.fill: parent
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignCenter
|
// We don't want to eat clicks on the Text.
|
||||||
Layout.preferredWidth: contentRect.width
|
acceptedButtons: Qt.NoButton
|
||||||
|
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
font.pointSize: JamiTheme.textFontSize
|
Label {
|
||||||
|
id: jamiDeclarationYearText
|
||||||
|
|
||||||
padding: 0
|
Layout.alignment: Qt.AlignCenter
|
||||||
readOnly: true
|
Layout.preferredWidth: contentRect.width
|
||||||
selectByMouse: true
|
Layout.preferredHeight: textMetricsjamiDeclarationYearText.boundingRect.height
|
||||||
|
Layout.bottomMargin: 5
|
||||||
|
|
||||||
text: JamiStrings.version + ": " + UtilsAdapter.getVersionStr()
|
font.pointSize: JamiTheme.textFontSize
|
||||||
color: JamiTheme.textColor
|
color: JamiTheme.textColor
|
||||||
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
||||||
|
text: textMetricsjamiDeclarationYearText.text
|
||||||
|
|
||||||
|
TextMetrics {
|
||||||
|
id: textMetricsjamiDeclarationYearText
|
||||||
|
font: jamiDeclarationYearText.font
|
||||||
|
text: JamiStrings.companyDeclarationYear
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
id: jamiNoneWarrantyHyperText
|
||||||
|
|
||||||
|
Layout.alignment: Qt.AlignCenter
|
||||||
|
Layout.preferredWidth: 300
|
||||||
|
Layout.preferredHeight: textMetricsjamiNoneWarrantyHyperText.boundingRect.height * 2
|
||||||
|
Layout.bottomMargin: 10
|
||||||
|
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
font.pointSize: JamiTheme.tinyFontSize
|
||||||
|
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
color: JamiTheme.textColor
|
||||||
|
|
||||||
|
text: textMetricsjamiNoneWarrantyHyperText.text
|
||||||
|
onLinkActivated: Qt.openUrlExternally(link)
|
||||||
|
|
||||||
|
TextMetrics {
|
||||||
|
id: textMetricsjamiNoneWarrantyHyperText
|
||||||
|
font: jamiDeclarationHyperText.font
|
||||||
|
text: '<html><style type="text/css"></style>This program comes with absolutely no warranty.<br\>See the <a href="http://www.gnu.org/licenses/gpl-3.0.html">GNU General Public License, version 3 or later</a> for details.</html>'
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
MouseArea {
|
||||||
id: jamiSlogansText
|
anchors.fill: parent
|
||||||
|
acceptedButtons: Qt.NoButton
|
||||||
Layout.alignment: Qt.AlignCenter
|
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||||
Layout.preferredWidth: contentRect.width
|
|
||||||
Layout.preferredHeight: textMetricsjamiSlogansText.boundingRect.height
|
|
||||||
Layout.topMargin: 5
|
|
||||||
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
font.pointSize: JamiTheme.textFontSize
|
|
||||||
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
|
|
||||||
text: textMetricsjamiSlogansText.text
|
|
||||||
color: JamiTheme.textColor
|
|
||||||
|
|
||||||
TextMetrics {
|
|
||||||
id: textMetricsjamiSlogansText
|
|
||||||
font: jamiSlogansText.font
|
|
||||||
text: JamiStrings.slogan
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Label {
|
ProjectCreditsScrollView {
|
||||||
id: jamiDeclarationText
|
id: projectCreditsScrollView
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
Layout.preferredWidth: contentRect.width
|
Layout.preferredWidth: contentRect.width - JamiTheme.preferredMarginSize * 2
|
||||||
Layout.preferredHeight: 40
|
Layout.preferredHeight: 128
|
||||||
Layout.topMargin: 5
|
Layout.margins: JamiTheme.preferredMarginSize
|
||||||
|
}
|
||||||
|
|
||||||
wrapMode: Text.WordWrap
|
MaterialButton {
|
||||||
font.pointSize: JamiTheme.textFontSize
|
id: btnClose
|
||||||
color: JamiTheme.textColor
|
|
||||||
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
Layout.bottomMargin: JamiTheme.preferredMarginSize
|
||||||
|
|
||||||
// TextMetrics does not work for multi-line.
|
preferredWidth: JamiTheme.preferredFieldWidth / 2
|
||||||
text: JamiStrings.declaration
|
preferredHeight: JamiTheme.preferredFieldHeight
|
||||||
}
|
|
||||||
|
|
||||||
Label {
|
text: qsTr("Close")
|
||||||
id: jamiDeclarationHyperText
|
color: enabled ? JamiTheme.buttonTintedBlack : JamiTheme.buttonTintedGrey
|
||||||
|
hoveredColor: JamiTheme.buttonTintedBlackHovered
|
||||||
|
pressedColor: JamiTheme.buttonTintedBlackPressed
|
||||||
|
outlined: true
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignCenter
|
onClicked: {
|
||||||
|
close()
|
||||||
// Strangely, hoveredLink works badly when width grows too large
|
|
||||||
Layout.preferredWidth: 50
|
|
||||||
Layout.preferredHeight: textMetricsjamiDeclarationHyperText.boundingRect.height
|
|
||||||
Layout.topMargin: 5
|
|
||||||
Layout.bottomMargin: 5
|
|
||||||
color: JamiTheme.textColor
|
|
||||||
|
|
||||||
font.pointSize: JamiTheme.textFontSize
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
|
|
||||||
text: textMetricsjamiDeclarationHyperText.text
|
|
||||||
onLinkActivated: Qt.openUrlExternally(link)
|
|
||||||
|
|
||||||
TextMetrics {
|
|
||||||
id: textMetricsjamiDeclarationHyperText
|
|
||||||
font: jamiDeclarationHyperText.font
|
|
||||||
text: '<html><style type="text/css"></style><a href="https://jami.net">jami.net</a></html>'
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
|
|
||||||
// We don't want to eat clicks on the Text.
|
|
||||||
acceptedButtons: Qt.NoButton
|
|
||||||
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Label {
|
|
||||||
id: jamiDeclarationYearText
|
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignCenter
|
|
||||||
Layout.preferredWidth: contentRect.width
|
|
||||||
Layout.preferredHeight: textMetricsjamiDeclarationYearText.boundingRect.height
|
|
||||||
Layout.bottomMargin: 5
|
|
||||||
|
|
||||||
font.pointSize: JamiTheme.textFontSize
|
|
||||||
color: JamiTheme.textColor
|
|
||||||
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
|
|
||||||
text: textMetricsjamiDeclarationYearText.text
|
|
||||||
|
|
||||||
TextMetrics {
|
|
||||||
id: textMetricsjamiDeclarationYearText
|
|
||||||
font: jamiDeclarationYearText.font
|
|
||||||
text: JamiStrings.companyDeclarationYear
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Label {
|
|
||||||
id: jamiNoneWarrantyHyperText
|
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignCenter
|
|
||||||
Layout.preferredWidth: 300
|
|
||||||
Layout.preferredHeight: textMetricsjamiNoneWarrantyHyperText.boundingRect.height * 2
|
|
||||||
Layout.bottomMargin: 10
|
|
||||||
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
font.pointSize: JamiTheme.tinyFontSize
|
|
||||||
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
color: JamiTheme.textColor
|
|
||||||
|
|
||||||
text: textMetricsjamiNoneWarrantyHyperText.text
|
|
||||||
onLinkActivated: Qt.openUrlExternally(link)
|
|
||||||
|
|
||||||
TextMetrics {
|
|
||||||
id: textMetricsjamiNoneWarrantyHyperText
|
|
||||||
font: jamiDeclarationHyperText.font
|
|
||||||
text: '<html><style type="text/css"></style>This program comes with absolutely no warranty.<br\>See the <a href="http://www.gnu.org/licenses/gpl-3.0.html">GNU General Public License, version 3 or later</a> for details.</html>'
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
acceptedButtons: Qt.NoButton
|
|
||||||
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ProjectCreditsScrollView {
|
|
||||||
id: projectCreditsScrollView
|
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignCenter
|
|
||||||
Layout.preferredWidth: contentRect.width - JamiTheme.preferredMarginSize * 2
|
|
||||||
Layout.preferredHeight: 128
|
|
||||||
Layout.margins: JamiTheme.preferredMarginSize
|
|
||||||
}
|
|
||||||
|
|
||||||
MaterialButton {
|
|
||||||
id: btnClose
|
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
Layout.bottomMargin: JamiTheme.preferredMarginSize
|
|
||||||
|
|
||||||
preferredWidth: JamiTheme.preferredFieldWidth / 2
|
|
||||||
preferredHeight: JamiTheme.preferredFieldHeight
|
|
||||||
|
|
||||||
text: qsTr("Close")
|
|
||||||
color: enabled? JamiTheme.buttonTintedBlack : JamiTheme.buttonTintedGrey
|
|
||||||
hoveredColor: JamiTheme.buttonTintedBlackHovered
|
|
||||||
pressedColor: JamiTheme.buttonTintedBlackPressed
|
|
||||||
outlined: true
|
|
||||||
|
|
||||||
onClicked: {
|
|
||||||
close()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,9 +17,9 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
|
|
|
@ -16,10 +16,10 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
import QtGraphicalEffects 1.15
|
import Qt5Compat.GraphicalEffects
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
|
@ -42,19 +42,18 @@ Popup {
|
||||||
padding: 0
|
padding: 0
|
||||||
modal: true
|
modal: true
|
||||||
Overlay.modal: Rectangle {
|
Overlay.modal: Rectangle {
|
||||||
color: "transparent"
|
color: JamiTheme.transparentColor
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: ColumnLayout {
|
contentItem: ColumnLayout {
|
||||||
spacing: 0
|
spacing: 0
|
||||||
ListView {
|
|
||||||
|
JamiListView {
|
||||||
id: listView
|
id: listView
|
||||||
|
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.preferredWidth: parent.width
|
Layout.preferredWidth: parent.width
|
||||||
|
|
||||||
clip: true
|
|
||||||
|
|
||||||
model: CurrentAccountFilterModel
|
model: CurrentAccountFilterModel
|
||||||
delegate: AccountItemDelegate {
|
delegate: AccountItemDelegate {
|
||||||
height: JamiTheme.accountListItemHeight
|
height: JamiTheme.accountListItemHeight
|
||||||
|
@ -64,8 +63,6 @@ Popup {
|
||||||
LRCInstance.currentAccountId = ID
|
LRCInstance.currentAccountId = ID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollBar.vertical: ScrollBar { }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// fake footer item as workaround for Qt 5.15 bug
|
// fake footer item as workaround for Qt 5.15 bug
|
||||||
|
@ -114,8 +111,8 @@ Popup {
|
||||||
horizontalOffset: 3.0
|
horizontalOffset: 3.0
|
||||||
verticalOffset: 3.0
|
verticalOffset: 3.0
|
||||||
radius: 16.0
|
radius: 16.0
|
||||||
samples: 16
|
|
||||||
color: JamiTheme.shadowColor
|
color: JamiTheme.shadowColor
|
||||||
|
transparentBorder: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,9 +17,9 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
|
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
|
@ -463,7 +463,7 @@ Control {
|
||||||
anchors.bottom: parent.top
|
anchors.bottom: parent.top
|
||||||
anchors.bottomMargin: itemSpacing
|
anchors.bottomMargin: itemSpacing
|
||||||
visible: !overflowButton.popup.visible
|
visible: !overflowButton.popup.visible
|
||||||
ListView {
|
JamiListView {
|
||||||
id: urgentOverflowListView
|
id: urgentOverflowListView
|
||||||
|
|
||||||
spacing: itemSpacing
|
spacing: itemSpacing
|
||||||
|
@ -473,7 +473,6 @@ Control {
|
||||||
null
|
null
|
||||||
|
|
||||||
delegate: buttonDelegate
|
delegate: buttonDelegate
|
||||||
ScrollBar.vertical: ScrollBar { }
|
|
||||||
|
|
||||||
add: Transition {
|
add: Transition {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
|
@ -494,7 +493,7 @@ Control {
|
||||||
implicitHeight: contentItem.implicitHeight
|
implicitHeight: contentItem.implicitHeight
|
||||||
padding: 0
|
padding: 0
|
||||||
|
|
||||||
contentItem: ListView {
|
contentItem: JamiListView {
|
||||||
id: overflowHiddenListView
|
id: overflowHiddenListView
|
||||||
spacing: itemSpacing
|
spacing: itemSpacing
|
||||||
implicitHeight: contentHeight
|
implicitHeight: contentHeight
|
||||||
|
@ -502,8 +501,6 @@ Control {
|
||||||
model: overflowButton.popup.visible ?
|
model: overflowButton.popup.visible ?
|
||||||
overflowButton.delegateModel :
|
overflowButton.delegateModel :
|
||||||
null
|
null
|
||||||
|
|
||||||
ScrollBar.vertical: ScrollBar { }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
|
|
|
@ -16,10 +16,10 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
import QtGraphicalEffects 1.15
|
import Qt5Compat.GraphicalEffects
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
@ -244,7 +244,7 @@ ItemDelegate {
|
||||||
|
|
||||||
onOpened: menuAction.triggered()
|
onOpened: menuAction.triggered()
|
||||||
|
|
||||||
contentItem: ListView {
|
contentItem: JamiListView {
|
||||||
id: itemListView
|
id: itemListView
|
||||||
|
|
||||||
property real menuItemWidth: 0
|
property real menuItemWidth: 0
|
||||||
|
@ -255,10 +255,6 @@ ItemDelegate {
|
||||||
implicitWidth: menuItemWidth
|
implicitWidth: menuItemWidth
|
||||||
implicitHeight: Math.min(contentHeight, menuItemHeight * 6) + 24
|
implicitHeight: Math.min(contentHeight, menuItemHeight * 6) + 24
|
||||||
|
|
||||||
ScrollBar.vertical: ScrollBar { }
|
|
||||||
|
|
||||||
clip: true
|
|
||||||
|
|
||||||
model: menu.delegateModel
|
model: menu.delegateModel
|
||||||
|
|
||||||
TextMetrics {
|
TextMetrics {
|
||||||
|
@ -300,8 +296,8 @@ ItemDelegate {
|
||||||
horizontalOffset: 0
|
horizontalOffset: 0
|
||||||
verticalOffset: 0
|
verticalOffset: 0
|
||||||
radius: 8.0
|
radius: 8.0
|
||||||
samples: 16
|
|
||||||
color: "#80000000"
|
color: "#80000000"
|
||||||
|
transparentBorder: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
|
|
|
@ -18,9 +18,9 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
|
@ -105,7 +105,7 @@ Popup {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ListViewJami {
|
JamiListView {
|
||||||
id: contactPickerListView
|
id: contactPickerListView
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
|
@ -114,8 +114,6 @@ Popup {
|
||||||
|
|
||||||
model: ContactAdapter.getContactSelectableModel(type)
|
model: ContactAdapter.getContactSelectableModel(type)
|
||||||
|
|
||||||
clip: true
|
|
||||||
|
|
||||||
delegate: ContactPickerItemDelegate {
|
delegate: ContactPickerItemDelegate {
|
||||||
id: contactPickerItemDelegate
|
id: contactPickerItemDelegate
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
|
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
@ -94,8 +94,8 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
onTextChanged: root.contactSearchBarTextChanged(contactSearchBar.text)
|
onTextChanged: root.contactSearchBarTextChanged(contactSearchBar.text)
|
||||||
onReleased: {
|
onReleased: function (event) {
|
||||||
if (event.button == Qt.RightButton)
|
if (event.button === Qt.RightButton)
|
||||||
lineEditContextMenu.openMenuAt(event)
|
lineEditContextMenu.openMenuAt(event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
|
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
|
|
||||||
|
|
|
@ -17,14 +17,16 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
||||||
ListView {
|
import "../../commoncomponents"
|
||||||
|
|
||||||
|
JamiListView {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
// the following should be marked required (Qtver >= 5.15)
|
// the following should be marked required (Qtver >= 5.15)
|
||||||
|
@ -35,10 +37,6 @@ ListView {
|
||||||
delegate: SmartListItemDelegate {}
|
delegate: SmartListItemDelegate {}
|
||||||
currentIndex: model.currentFilteredRow
|
currentIndex: model.currentFilteredRow
|
||||||
|
|
||||||
clip: true
|
|
||||||
maximumFlickVelocity: 1024
|
|
||||||
ScrollBar.vertical: ScrollBar { }
|
|
||||||
|
|
||||||
// highlight selection
|
// highlight selection
|
||||||
// down and hover states are done within the delegate
|
// down and hover states are done within the delegate
|
||||||
highlight: Rectangle {
|
highlight: Rectangle {
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
|
|
|
@ -16,12 +16,14 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
||||||
|
import "../../commoncomponents"
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
@ -30,7 +32,7 @@ Rectangle {
|
||||||
|
|
||||||
color: JamiTheme.messageOutBgColor
|
color: JamiTheme.messageOutBgColor
|
||||||
|
|
||||||
ScrollView {
|
JamiFlickable {
|
||||||
id: filesToSendContainerScrollView
|
id: filesToSendContainerScrollView
|
||||||
|
|
||||||
anchors.fill: root
|
anchors.fill: root
|
||||||
|
@ -38,16 +40,9 @@ Rectangle {
|
||||||
contentHeight: root.height
|
contentHeight: root.height
|
||||||
contentWidth: filesToSendContainerRow.width
|
contentWidth: filesToSendContainerRow.width
|
||||||
|
|
||||||
ScrollBar.horizontal.visible: {
|
horizontalHandleColor:
|
||||||
var ratio = filesToSendContainerRow.width / root.width
|
filesToSendContainerScrollView.ScrollBar.horizontal.pressed ?
|
||||||
return ratio > 1
|
JamiTheme.darkGreyColor : JamiTheme.whiteColor
|
||||||
}
|
|
||||||
ScrollBar.horizontal.contentItem: Rectangle {
|
|
||||||
implicitHeight: 5
|
|
||||||
radius: width / 2
|
|
||||||
color: filesToSendContainerScrollView.ScrollBar.horizontal.pressed ?
|
|
||||||
JamiTheme.darkGreyColor : JamiTheme.whiteColor
|
|
||||||
}
|
|
||||||
ScrollBar.vertical.policy: ScrollBar.AlwaysOff
|
ScrollBar.vertical.policy: ScrollBar.AlwaysOff
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
import QtGraphicalEffects 1.15
|
import Qt5Compat.GraphicalEffects
|
||||||
|
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
|
|
|
@ -17,9 +17,9 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
||||||
|
|
|
@ -17,9 +17,9 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
|
@ -82,7 +82,9 @@ Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
propagateComposedEvents: false
|
propagateComposedEvents: false
|
||||||
acceptedButtons: Qt.AllButtons
|
acceptedButtons: Qt.AllButtons
|
||||||
onDoubleClicked: mouse.accepted = true
|
onDoubleClicked: function (mouse) {
|
||||||
|
mouse.accepted = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
|
|
|
@ -16,15 +16,15 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
|
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
||||||
import "../../commoncomponents"
|
import "../../commoncomponents"
|
||||||
|
|
||||||
Flickable {
|
JamiFlickable {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property alias text: textArea.text
|
property alias text: textArea.text
|
||||||
|
@ -57,15 +57,11 @@ Flickable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollBar.vertical: ScrollBar {
|
|
||||||
policy: contentHeight > height ? ScrollBar.AlwaysOn : ScrollBar.AsNeeded
|
|
||||||
}
|
|
||||||
|
|
||||||
contentWidth: width
|
contentWidth: width
|
||||||
contentHeight: textArea.implicitHeight
|
contentHeight: textArea.implicitHeight
|
||||||
|
|
||||||
interactive: true
|
interactive: true
|
||||||
clip: true
|
attachedFlickableMoving: contentHeight > height || root.moving
|
||||||
|
|
||||||
function ensureVisible(r) {
|
function ensureVisible(r) {
|
||||||
if (contentY >= r.y)
|
if (contentY >= r.y)
|
||||||
|
@ -118,7 +114,7 @@ Flickable {
|
||||||
color: JamiTheme.transparentColor
|
color: JamiTheme.transparentColor
|
||||||
}
|
}
|
||||||
|
|
||||||
onReleased: {
|
onReleased: function (event) {
|
||||||
if (event.button == Qt.RightButton)
|
if (event.button == Qt.RightButton)
|
||||||
textAreaContextMenu.openMenuAt(event)
|
textAreaContextMenu.openMenuAt(event)
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,10 +17,10 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
import Qt.labs.qmlmodels 1.0
|
import Qt.labs.qmlmodels
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
|
|
|
@ -18,10 +18,10 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
import QtGraphicalEffects 1.15
|
import Qt5Compat.GraphicalEffects
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
|
@ -151,12 +151,12 @@ Rectangle {
|
||||||
|
|
||||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||||
|
|
||||||
onDoubleClicked: {
|
onDoubleClicked: function (mouse) {
|
||||||
if (mouse.button === Qt.LeftButton)
|
if (mouse.button === Qt.LeftButton)
|
||||||
callStackView.toggleFullScreen()
|
callStackView.toggleFullScreen()
|
||||||
}
|
}
|
||||||
|
|
||||||
onClicked: {
|
onClicked: function (mouse) {
|
||||||
if (mouse.button === Qt.RightButton)
|
if (mouse.button === Qt.RightButton)
|
||||||
callOverlay.openCallViewContextMenuInPos(mouse.x, mouse.y)
|
callOverlay.openCallViewContextMenuInPos(mouse.x, mouse.y)
|
||||||
}
|
}
|
||||||
|
@ -223,7 +223,7 @@ Rectangle {
|
||||||
|
|
||||||
anchors.fill: previewRenderer
|
anchors.fill: previewRenderer
|
||||||
|
|
||||||
onPressed: {
|
onPressed: function (mouse) {
|
||||||
clickPos = Qt.point(mouse.x, mouse.y)
|
clickPos = Qt.point(mouse.x, mouse.y)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@ Rectangle {
|
||||||
previewMagneticSnap()
|
previewMagneticSnap()
|
||||||
}
|
}
|
||||||
|
|
||||||
onPositionChanged: {
|
onPositionChanged: function (mouse) {
|
||||||
// Calculate mouse position relative change.
|
// Calculate mouse position relative change.
|
||||||
var delta = Qt.point(mouse.x - clickPos.x,
|
var delta = Qt.point(mouse.x - clickPos.x,
|
||||||
mouse.y - clickPos.y)
|
mouse.y - clickPos.y)
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
|
|
|
@ -16,14 +16,16 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
||||||
ListView {
|
import "../../commoncomponents"
|
||||||
|
|
||||||
|
JamiListView {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
width: currentItem ? currentItem.width + currentItem.spinningAnimationWidth
|
width: currentItem ? currentItem.width + currentItem.spinningAnimationWidth
|
||||||
|
@ -52,8 +54,4 @@ ListView {
|
||||||
: preferredHeight
|
: preferredHeight
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
clip: true
|
|
||||||
maximumFlickVelocity: 1024
|
|
||||||
ScrollBar.vertical: ScrollBar { }
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
|
@ -17,9 +17,9 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
import QtQuick.Shapes 1.15
|
import QtQuick.Shapes
|
||||||
|
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
|
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import net.jami.Adapters 1.1
|
import net.jami.Adapters 1.1
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue