Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • nheko-reborn/nheko
1 result
Show changes
Commits on Source (45)
Showing
with 418 additions and 562 deletions
......@@ -4,7 +4,7 @@ Standard: c++17
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
AllowShortFunctionsOnASingleLine: true
AllowShortFunctionsOnASingleLine: InlineOnly
BasedOnStyle: Mozilla
ColumnLimit: 100
IndentCaseLabels: false
......@@ -12,3 +12,4 @@ IndentWidth: 4
KeepEmptyLinesAtTheStartOfBlocks: false
PointerAlignment: Right
Cpp11BracedListStyle: true
PenaltyReturnTypeOnItsOwnLine: 0
......@@ -30,6 +30,7 @@ build-gcc9:
-DCMAKE_INSTALL_PREFIX=.deps/usr
-DHUNTER_ROOT="../.hunter"
-DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF -DUSE_BUNDLED_OPENSSL=ON -DUSE_BUNDLED_LMDB=OFF
-DVOIP=OFF
-DCMAKE_BUILD_TYPE=Release -DHUNTER_CONFIGURATION_TYPES=Release
-DCI_BUILD=ON -DFETCHCONTENT_QUIET=OFF
- cmake --build build
......
# Changelog
## [0.9.0] -- Unreleased
## [0.9.0] -- 2021-11-19
### Highlights
......@@ -63,7 +63,7 @@
### Improvements
- Tranlation updates:
- Translation updates:
- French by MayeulC, ISSOtm, Glandos, Carl Schwan
- Dutch by Thulinma, Bas van Rossem, Glael, Thijs
- Esperanto by Tirifto, Colin
......@@ -98,7 +98,7 @@
- Alerts now work, if the homeserver does not implement the notifications
endpoint. (Thulinma)
- Right click menu now works on replies.
- Decrypt encrypted media only in memory.
- Decrypt encrypted media only in memory. (On macOS it still uses a tempfile because of <https://bugreports.qt.io/browse/QTBUG-69101>)
- Don't use CC-BY in the appstream license to not confuse Gnome Software.
- Document how to sync the repo on Gentoo. (alfasi)
- Support online key backup.
......@@ -141,6 +141,7 @@
- Show borders around tables.
- Improve wording of a few menu entries. (absorber)
- Highlight navigated to message.
- Switched to the fluent icon set. (LorenDB)
### Bugfixes
......@@ -181,6 +182,7 @@
- Removed the AppImage
- Removed dependency on boost
- Now depends on [coeurl](https://nheko.im/nheko-reborn/coeurl), which depends on libevent and libcurl.
- VOIP support now needs to be explicitly controlled using the VOIP and SCREENSHARE_X11 cmake options.
## [0.8.2] -- 2021-04-23
......
......@@ -55,6 +55,14 @@ option(USE_BUNDLED_COEURL "Use a bundled version of the Curl wrapper"
option(USE_BUNDLED_LIBEVENT "Use the bundled version of spdlog." ${HUNTER_ENABLED})
option(USE_BUNDLED_LIBCURL "Use the bundled version of spdlog." ${HUNTER_ENABLED})
include(CMakeDependentOption)
set(VOIP_DEFAULT ON)
if (APPLE OR WIN32)
set(VOIP_DEFAULT OFF)
endif()
option(VOIP "Whether to enable voip support. Disable this, if you don't have gstreamer." ${VOIP_DEFAULT})
cmake_dependent_option(SCREENSHARE_X11 "Whether to enable screenshare support on X11." ON "VOIP" OFF)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
if(${CMAKE_VERSION} VERSION_LESS "3.14.0")
......@@ -91,8 +99,8 @@ project(nheko LANGUAGES CXX C)
include(GNUInstallDirs)
set(CPACK_PACKAGE_VERSION_MAJOR "0")
set(CPACK_PACKAGE_VERSION_MINOR "8")
set(CPACK_PACKAGE_VERSION_PATCH "2")
set(CPACK_PACKAGE_VERSION_MINOR "9")
set(CPACK_PACKAGE_VERSION_PATCH "0")
set(PROJECT_VERSION_MAJOR ${CPACK_PACKAGE_VERSION_MAJOR})
set(PROJECT_VERSION_MINOR ${CPACK_PACKAGE_VERSION_MINOR})
set(PROJECT_VERSION_PATCH ${CPACK_PACKAGE_VERSION_PATCH})
......@@ -103,7 +111,7 @@ fix_project_version()
# Set additional project information
set(COMPANY "Nheko")
set(COPYRIGHT "Copyright (c) 2020 Nheko Contributors")
set(COPYRIGHT "Copyright (c) 2021 Nheko Contributors")
set(IDENTIFIER "io.github.nheko-reborn.nheko")
add_project_meta(META_FILES_TO_INCLUDE)
......@@ -141,12 +149,6 @@ if (USE_BUNDLED_LIBEVENT)
find_package(Libevent CONFIG REQUIRED)
else()
find_package(PkgConfig REQUIRED)
if (HUNTER_ENABLED)
message("pkg_conf_path: '$ENV{PKG_CONFIG_PATH}', pkg_conf_libdir: '$ENV{PKG_CONFIG_LIBDIR}'")
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_LIBDIR}")
set(ENV{PKG_CONFIG_LIBDIR} "${pkg_temp_backup}")
message("pkg_conf_path: '$ENV{PKG_CONFIG_PATH}', pkg_conf_libdir: '$ENV{PKG_CONFIG_LIBDIR}'")
endif()
pkg_check_modules(libevent_core REQUIRED IMPORTED_TARGET libevent_core)
if (WIN32)
pkg_check_modules(libevent_windows REQUIRED IMPORTED_TARGET libevent_windows)
......@@ -162,12 +164,6 @@ if (USE_BUNDLED_LIBCURL)
find_package(CURL CONFIG REQUIRED)
else()
find_package(PkgConfig REQUIRED)
if (HUNTER_ENABLED)
message("pkg_conf_path: '$ENV{PKG_CONFIG_PATH}', pkg_conf_libdir: '$ENV{PKG_CONFIG_LIBDIR}'")
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_LIBDIR}")
set(ENV{PKG_CONFIG_LIBDIR} "${pkg_temp_backup}")
message("pkg_conf_path: '$ENV{PKG_CONFIG_PATH}', pkg_conf_libdir: '$ENV{PKG_CONFIG_LIBDIR}'")
endif()
pkg_check_modules(libcurl REQUIRED IMPORTED_TARGET libcurl)
endif()
......@@ -199,12 +195,6 @@ find_package(Qt5QuickCompiler)
find_package(Qt5DBus)
if (USE_BUNDLED_QTKEYCHAIN)
if (HUNTER_ENABLED)
message("pkg_conf_path: '$ENV{PKG_CONFIG_PATH}', pkg_conf_libdir: '$ENV{PKG_CONFIG_LIBDIR}'")
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_LIBDIR}")
set(ENV{PKG_CONFIG_LIBDIR} "${pkg_temp_backup}")
message("pkg_conf_path: '$ENV{PKG_CONFIG_PATH}', pkg_conf_libdir: '$ENV{PKG_CONFIG_LIBDIR}'")
endif()
include(FetchContent)
FetchContent_Declare(
qt5keychain
......@@ -227,9 +217,9 @@ if (APPLE)
endif(APPLE)
if (Qt5Widgets_FOUND)
if (Qt5Widgets_VERSION VERSION_LESS 5.10.0)
if (Qt5Widgets_VERSION VERSION_LESS 5.15.0)
message(STATUS "Qt version ${Qt5Widgets_VERSION}")
message(WARNING "Minimum supported Qt5 version is 5.10!")
message(WARNING "Minimum supported Qt5 version is 5.15!")
endif()
endif(Qt5Widgets_FOUND)
......@@ -423,13 +413,13 @@ if(USE_BUNDLED_MTXCLIENT)
FetchContent_Declare(
MatrixClient
GIT_REPOSITORY https://github.com/Nheko-Reborn/mtxclient.git
GIT_TAG v0.6.0
GIT_TAG ffc1d3e13a507fa501966b2d7e9d4eda881f6bf4
)
set(BUILD_LIB_EXAMPLES OFF CACHE INTERNAL "")
set(BUILD_LIB_TESTS OFF CACHE INTERNAL "")
FetchContent_MakeAvailable(MatrixClient)
else()
find_package(MatrixClient 0.5.1 REQUIRED)
find_package(MatrixClient 0.6.0 REQUIRED)
endif()
if(USE_BUNDLED_OLM)
include(FetchContent)
......@@ -509,25 +499,12 @@ else()
add_library(lmdbxx::lmdbxx ALIAS lmdbxx)
endif()
if (HUNTER_ENABLED)
message("pkg_conf_path: '$ENV{PKG_CONFIG_PATH}', pkg_conf_libdir: '$ENV{PKG_CONFIG_LIBDIR}'")
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_LIBDIR}")
set(ENV{PKG_CONFIG_LIBDIR} "${pkg_temp_backup}")
unset(ENV{PKG_CONFIG_LIBDIR})
message("pkg_conf_path: '$ENV{PKG_CONFIG_PATH}', pkg_conf_libdir: '$ENV{PKG_CONFIG_LIBDIR}'")
endif()
include(FindPkgConfig)
pkg_check_modules(GSTREAMER NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH IMPORTED_TARGET gstreamer-sdp-1.0>=1.18 gstreamer-webrtc-1.0>=1.18)
if (TARGET PkgConfig::GSTREAMER)
add_feature_info(voip ON "GStreamer found. Call support is enabled automatically.")
pkg_check_modules(XCB IMPORTED_TARGET xcb xcb-ewmh)
if (TARGET PkgConfig::XCB)
add_feature_info("Window selection when screen sharing (X11)" ON "XCB-EWMH found. Window selection is enabled when screen sharing (X11).")
else()
add_feature_info("Window selection when screen sharing (X11)" OFF "XCB-EWMH could not be found on your system. Screen sharing (X11) is limited to the entire screen only. To enable window selection, make sure xcb and xcb-ewmh can be found via pkgconfig.")
if (VOIP)
include(FindPkgConfig)
pkg_check_modules(GSTREAMER REQUIRED IMPORTED_TARGET gstreamer-sdp-1.0>=1.18 gstreamer-webrtc-1.0>=1.18)
if (SCREENSHARE_X11)
pkg_check_modules(XCB REQUIRED IMPORTED_TARGET xcb xcb-ewmh)
endif()
else()
add_feature_info(voip OFF "GStreamer could not be found on your system. As a consequence call support has been disabled. If you don't want that, make sure gstreamer-sdp-1.0>=1.18 gstreamer-webrtc-1.0>=1.18 can be found via pkgconfig.")
endif()
# single instance functionality
......@@ -667,7 +644,7 @@ endif()
if(WIN32)
add_executable (nheko WIN32 ${OS_BUNDLE} ${NHEKO_DEPS})
target_compile_definitions(nheko PRIVATE _WIN32_WINNT=0x0601)
target_compile_definitions(nheko PRIVATE _WIN32_WINNT=0x0601 NOMINMAX WIN32_LEAN_AND_MEAN STRICT)
else()
add_executable (nheko ${OS_BUNDLE} ${NHEKO_DEPS})
......@@ -733,7 +710,7 @@ if(USE_BUNDLED_COEURL)
FetchContent_Declare(
coeurl
GIT_REPOSITORY https://nheko.im/Nheko-Reborn/coeurl.git
GIT_TAG v0.1.0
GIT_TAG abafd60d7e9f5cce76c9abad3b2b3dc1382e5349
)
FetchContent_MakeAvailable(coeurl)
target_link_libraries(nheko PUBLIC coeurl::coeurl)
......@@ -742,12 +719,6 @@ elseif(coeurl_DIR)
target_link_libraries(nheko PUBLIC coeurl::coeurl)
else()
find_package(PkgConfig REQUIRED)
if (HUNTER_ENABLED)
message("pkg_conf_path: '$ENV{PKG_CONFIG_PATH}', pkg_conf_libdir: '$ENV{PKG_CONFIG_LIBDIR}'")
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_LIBDIR}")
set(ENV{PKG_CONFIG_LIBDIR} "${pkg_temp_backup}")
message("pkg_conf_path: '$ENV{PKG_CONFIG_PATH}', pkg_conf_libdir: '$ENV{PKG_CONFIG_LIBDIR}'")
endif()
pkg_check_modules(coeurl REQUIRED IMPORTED_TARGET coeurl)
target_link_libraries(nheko PUBLIC PkgConfig::coeurl)
endif()
......
......@@ -19,10 +19,8 @@ Help us with translations so as many people as possible will be able to use nhek
### Note regarding End-to-End encryption
The current implementation works in most cases, but you may need to bootstrap
your cross-signing keys in a different client. The implementation may also still
have bugs, so don't rely on it for security. Online keybackup isn't supported,
but you can use offline keybackup. Most other cases should be fine though.
The current implementation is mostly stable, but it was never audited. If you
rely on it for security, we can't make any guarantees.
## Features
......@@ -164,14 +162,15 @@ choco install nheko-reborn
- [cmark](https://github.com/commonmark/cmark) 0.29 or greater.
- [libolm](https://gitlab.matrix.org/matrix-org/olm)
- [spdlog](https://github.com/gabime/spdlog)
- [GStreamer](https://gitlab.freedesktop.org/gstreamer) 1.18.0 or greater (optional, needed for VoIP support).
- [GStreamer](https://gitlab.freedesktop.org/gstreamer) 1.18.0 or greater (optional, needed for VoIP support. Pass `-DVOIP=OFF` to disable.).
- Installing the gstreamer core library plus gst-plugins-base, gst-plugins-good & gst-plugins-bad
is often sufficient. The qmlgl plugin though is often packaged separately. The actual plugin requirements
are as follows:
- Voice call support: dtls, opus, rtpmanager, srtp, webrtc
- Video call support (optional): compositor, opengl, qmlgl, rtp, vpx
- [libnice](https://gitlab.freedesktop.org/libnice/libnice)
- [qtkeychain](https://github.com/frankosterfeld/qtkeychain) (You need at least version 0.12 for proper Gnome Keychain support)
- XCB, XCB-EWMH: For screensharing support on X11. VOIP needs to be enabled. Can be disabled with `-DSCREENSHARE_X11=OFF`.
- [qtkeychain](https://github.com/frankosterfeld/qtkeychain) (You need at least version 0.12 for proper Gnome Keychain support. The bundled version requires libsecret, unless you pass `-DLIBSECRET_SUPPORT=OFF`.)
- A compiler that supports C++ 17:
- Clang 6 (tested on Travis CI)
- GCC 7 (tested on Travis CI)
......
---
version: 0.8.0-{build}
version: 0.9.0-{build}
configuration: Release
image: Visual Studio 2019
......@@ -31,8 +31,8 @@ build_script:
# VERSION format: branch-master/branch-1.2
# INSTVERSION format: x.y.z
# WINVERSION format: 9999.0.0.123/1.2.0.234
- if "%APPVEYOR_REPO_TAG%"=="false" set INSTVERSION=0.8.2
- if "%APPVEYOR_REPO_TAG%"=="false" set VERSION=0.8.2
- if "%APPVEYOR_REPO_TAG%"=="false" set INSTVERSION=0.9.0
- if "%APPVEYOR_REPO_TAG%"=="false" set VERSION=0.9.0
- if "%APPVEYOR_REPO_TAG%"=="false" if "%APPVEYOR_REPO_BRANCH%"=="master" set INSTVERSION=9999.0
- if "%APPVEYOR_REPO_TAG%"=="false" set WINVERSION=%INSTVERSION%.0.%APPVEYOR_BUILD_NUMBER%
# VERSION format: v1.2.3/v1.3.4
......@@ -66,7 +66,7 @@ after_build:
- echo %BUILD%
- mkdir NhekoRelease
- copy build\Release\nheko.exe NhekoRelease\nheko.exe
- copy qt-jdenticon\release\qtjdenticon0.dll NhekoRelease\qtjdenticon0.dll
- copy qt-jdenticon\release\qtjdenticon0.dll NhekoRelease\qtjdenticon.dll
- copy build\_deps\cmark-build\src\Release\cmark.dll NhekoRelease\cmark.dll
- windeployqt --qmldir resources\qml\ NhekoRelease\nheko.exe
......@@ -94,8 +94,8 @@ after_build:
- copy %BUILD%\deploy\installer\gui\package.xml installer\packages\io.github.nhekoreborn.nheko\meta
- copy %BUILD%\deploy\installer\gui\installscript.qs installer\packages\io.github.nhekoreborn.nheko\meta
# Amend version and date
- sed -i "s/__VERSION__/0.8.2/" installer\config\config.xml
- sed -i "s/__VERSION__/0.8.2/" installer\packages\io.github.nhekoreborn.nheko\meta\package.xml
- sed -i "s/__VERSION__/0.9.0/" installer\config\config.xml
- sed -i "s/__VERSION__/0.9.0/" installer\packages\io.github.nhekoreborn.nheko\meta\package.xml
- sed -i "s/__DATE__/%DATE%/" installer\packages\io.github.nhekoreborn.nheko\meta\package.xml
# Copy nheko data
- xcopy NhekoData\*.* installer\packages\io.github.nhekoreborn.nheko\data\*.* /s /e /c /y
......
......@@ -32,5 +32,7 @@
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSHighResolutionCapable</key>
<true/>
</dict>
</plist>
......@@ -10,7 +10,7 @@ public:
virtual QString generate(const QString &message, uint16_t size) = 0;
};
#define JdenticonInterface_iid "redsky17.Qt.JdenticonInterface"
#define JdenticonInterface_iid "im.nheko.JdenticonInterface"
Q_DECLARE_INTERFACE(JdenticonInterface, JdenticonInterface_iid)
......
......@@ -166,8 +166,8 @@ modules:
- mkdir -p /app/bin/
- cp libqtjdenticon.so /app/bin/
sources:
- commit: e58c14369dfbf008c63f43a4556b2e52232e0265
tag: v0.1.0
- commit: 07604d2e83e9c97969db93af04d3ea548c6f2e89
tag: v0.2.1
type: git
url: https://github.com/Nheko-Reborn/qt-jdenticon.git
- buildsystem: meson
......@@ -175,8 +175,7 @@ modules:
- -Ddefault_library=static
name: coeurl
sources:
- commit: a08f619adaa1ccd34eb6315d6578eddae0d1cc9b
tag: v0.1.0
- commit: abafd60d7e9f5cce76c9abad3b2b3dc1382e5349
type: git
url: https://nheko.im/nheko-reborn/coeurl.git
- config-opts:
......@@ -187,8 +186,7 @@ modules:
buildsystem: cmake-ninja
name: mtxclient
sources:
- commit: eecc4e93f2137c658014f17cefd62ad569063769
tag: v0.6.0
- commit: ffc1d3e13a507fa501966b2d7e9d4eda881f6bf4
type: git
url: https://github.com/Nheko-Reborn/mtxclient.git
- config-opts:
......
<svg width="32" height="32" fill="none" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4 13.999 13 14a2 2 0 0 1 1.995 1.85L15 16v1.5C14.999 21 11.284 22 8.5 22c-2.722 0-6.335-.956-6.495-4.27L2 17.5v-1.501c0-1.054.816-1.918 1.85-1.995L4 14ZM15.22 14H20c1.054 0 1.918.816 1.994 1.85L22 16v1c-.001 3.062-2.858 4-5 4a7.16 7.16 0 0 1-2.14-.322c.336-.386.607-.827.802-1.327A6.19 6.19 0 0 0 17 19.5l.267-.006c.985-.043 3.086-.363 3.226-2.289L20.5 17v-1a.501.501 0 0 0-.41-.492L20 15.5h-4.051a2.957 2.957 0 0 0-.595-1.34L15.22 14H20h-4.78ZM4 15.499l-.1.01a.51.51 0 0 0-.254.136.506.506 0 0 0-.136.253l-.01.101V17.5c0 1.009.45 1.722 1.417 2.242.826.445 2.003.714 3.266.753l.317.005.317-.005c1.263-.039 2.439-.308 3.266-.753.906-.488 1.359-1.145 1.412-2.057l.005-.186V16a.501.501 0 0 0-.41-.492L13 15.5l-9-.001ZM8.5 3a4.5 4.5 0 1 1 0 9 4.5 4.5 0 0 1 0-9Zm9 2a3.5 3.5 0 1 1 0 7 3.5 3.5 0 0 1 0-7Zm-9-.5c-1.654 0-3 1.346-3 3s1.346 3 3 3 3-1.346 3-3-1.346-3-3-3Zm9 2c-1.103 0-2 .897-2 2s.897 2 2 2 2-.897 2-2-.897-2-2-2Z" fill="#212121"/></svg>
This diff is collapsed.
......@@ -53,6 +53,7 @@
<url type="homepage">https://github.com/Nheko-Reborn/nheko</url>
<update_contact>https://github.com/Nheko-Reborn</update_contact>
<releases>
<release date="2021-11-19" version="0.9.0"/>
<release date="2021-04-23" version="0.8.2"/>
<release date="2021-01-27" version="0.8.1"/>
<release date="2021-01-21" version="0.8.0"/>
......
This diff is collapsed.
......@@ -288,7 +288,7 @@ ScrollView {
id: userName_
text: TimelineManager.escapeEmoji(userName)
color: TimelineManager.userColor(userId, Nheko.colors.window)
color: TimelineManager.userColor(userId, Nheko.colors.base)
textFormat: Text.RichText
ToolTip.visible: displayNameHover.hovered
ToolTip.text: userId
......
......@@ -543,8 +543,7 @@ Page {
id: closeUnverifiedBubble
Layout.rightMargin: Nheko.paddingMedium
Layout.topMargin: Nheko.paddingMedium
Layout.alignment: Qt.AlignRight | Qt.AlignCenter
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
hoverEnabled: true
width: fontMetrics.font.pixelSize
height: fontMetrics.font.pixelSize
......
......@@ -49,6 +49,11 @@ Rectangle {
//cursorShape: Qt.PointingHandCursor
}
CursorShape {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
}
GridLayout {
id: topLayout
......
......@@ -82,7 +82,7 @@ Item {
NoticeMessage {
formatted: TimelineManager.escapeEmoji(d.userName) + " " + d.formattedBody
color: TimelineManager.userColor(d.userId, Nheko.colors.window)
color: TimelineManager.userColor(d.userId, Nheko.colors.base)
body: d.body
isOnlyEmoji: d.isOnlyEmoji
isReply: d.isReply
......
......@@ -21,6 +21,11 @@ ApplicationWindow {
width: 350
height: fontMetrics.lineSpacing * 7
Shortcut {
sequence: StandardKey.Cancel
onActivated: dbb.rejected()
}
ColumnLayout {
spacing: Nheko.paddingMedium
anchors.margins: Nheko.paddingMedium
......@@ -36,11 +41,15 @@ ApplicationWindow {
id: statusInput
Layout.fillWidth: true
onAccepted: dbb.accepted()
focus: true
}
}
footer: DialogButtonBox {
id: dbb
standardButtons: DialogButtonBox.Ok | DialogButtonBox.Cancel
onAccepted: {
if (inputDialog.onAccepted)
......
......@@ -99,38 +99,64 @@ ApplicationWindow {
Layout.fillHeight: true
model: invitees
delegate: RowLayout {
spacing: Nheko.paddingMedium
Avatar {
width: Nheko.avatarSize
height: Nheko.avatarSize
userid: model.mxid
url: model.avatarUrl.replace("mxc://", "image://MxcImage/")
displayName: model.displayName
onClicked: TimelineManager.openGlobalUserProfile(model.mxid)
delegate: ItemDelegate {
id: del
hoverEnabled: true
width: ListView.view.width
height: layout.implicitHeight + Nheko.paddingSmall * 2
onClicked: TimelineManager.openGlobalUserProfile(model.mxid)
background: Rectangle {
color: del.hovered ? Nheko.colors.dark : inviteDialogRoot.color
}
ColumnLayout {
spacing: Nheko.paddingSmall
RowLayout {
id: layout
Label {
text: model.displayName
color: TimelineManager.userColor(model ? model.mxid : "", Nheko.colors.window)
font.pointSize: fontMetrics.font.pointSize
spacing: Nheko.paddingMedium
anchors.centerIn: parent
width: del.width - Nheko.paddingSmall * 2
Avatar {
width: Nheko.avatarSize
height: Nheko.avatarSize
userid: model.mxid
url: model.avatarUrl.replace("mxc://", "image://MxcImage/")
displayName: model.displayName
enabled: false
}
Label {
text: model.mxid
color: Nheko.colors.buttonText
font.pointSize: fontMetrics.font.pointSize * 0.9
ColumnLayout {
spacing: Nheko.paddingSmall
Label {
text: model.displayName
color: TimelineManager.userColor(model ? model.mxid : "", del.background.color)
font.pointSize: fontMetrics.font.pointSize
}
Label {
text: model.mxid
color: del.hovered ? Nheko.colors.brightText : Nheko.colors.buttonText
font.pointSize: fontMetrics.font.pointSize * 0.9
}
}
Item {
Layout.fillHeight: true
Layout.fillWidth: true
}
ImageButton {
image: ":/icons/icons/ui/dismiss.svg"
onClicked: invitees.removeUser(model.mxid)
}
}
CursorShape {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
}
}
......
......@@ -54,23 +54,29 @@ ApplicationWindow {
id: readReceiptsList
clip: true
spacing: Nheko.paddingMedium
boundsBehavior: Flickable.StopAtBounds
model: readReceipts
delegate: ItemDelegate {
id: del
onClicked: room.openUserProfile(model.mxid)
padding: Nheko.paddingMedium
width: receiptLayout.implicitWidth
height: receiptLayout.implicitHeight
width: ListView.view.width
height: receiptLayout.implicitHeight + Nheko.paddingSmall * 2
hoverEnabled: true
ToolTip.visible: hovered
ToolTip.text: model.mxid
background: Rectangle {
color: del.hovered ? Nheko.colors.dark : readReceiptsRoot.color
}
RowLayout {
id: receiptLayout
spacing: Nheko.paddingMedium
anchors.fill: parent
anchors.margins: Nheko.paddingSmall
Avatar {
width: Nheko.avatarSize
......@@ -96,11 +102,10 @@ ApplicationWindow {
font.pointSize: fontMetrics.font.pointSize * 0.9
}
Item {
Layout.fillHeight: true
Layout.fillWidth: true
}
}
Item {
Layout.fillWidth: true
}
}
......@@ -110,10 +115,6 @@ ApplicationWindow {
cursorShape: Qt.PointingHandCursor
}
background: Rectangle {
color: readReceiptsRoot.color
}
}
}
......