Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nheko
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nheko Reborn
nheko
Commits
8ca1b93a
Commit
8ca1b93a
authored
3 years ago
by
Loren Burkholder
Browse files
Options
Downloads
Patches
Plain Diff
Switch member dialog to using ItemDelegate
parent
cf43b7b9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
resources/qml/dialogs/RoomMembers.qml
+63
-46
63 additions, 46 deletions
resources/qml/dialogs/RoomMembers.qml
with
63 additions
and
46 deletions
resources/qml/dialogs/RoomMembers.qml
+
63
−
46
View file @
8ca1b93a
...
@@ -85,67 +85,84 @@ ApplicationWindow {
...
@@ -85,67 +85,84 @@ ApplicationWindow {
enabled
:
!
Settings
.
mobileMode
enabled
:
!
Settings
.
mobileMode
}
}
delegate
:
RowLayout
{
delegate
:
ItemDelegate
{
id
:
del
id
:
del
onClicked
:
Rooms
.
currentRoom
.
openUserProfile
(
model
.
mxid
)
padding
:
Nheko
.
paddingMedium
width
:
ListView
.
view
.
width
width
:
ListView
.
view
.
width
spacing
:
Nheko
.
paddingMedium
height
:
memberLayout
.
implicitHeight
background
:
Rectangle
{
color
:
roomMembersRoot
.
color
}
Avatar
{
RowLayout
{
id
:
avatar
id
:
memberLayout
width
:
Nheko
.
avatarSize
spacing
:
Nheko
.
paddingMedium
height
:
Nheko
.
avatarSize
userid
:
model
.
mxid
url
:
model
.
avatarUrl
.
replace
(
"
mxc://
"
,
"
image://MxcImage/
"
)
displayName
:
model
.
displayName
onClicked
:
Rooms
.
currentRoom
.
openUserProfile
(
model
.
mxid
)
}
ColumnLayout
{
Avatar
{
spacing
:
Nheko
.
paddingSmall
id
:
avatar
ElidedLabel
{
width
:
Nheko
.
avatarSize
fullText
:
model
.
displayName
height
:
Nheko
.
avatarSize
color
:
TimelineManager
.
userColor
(
model
?
model
.
mxid
:
""
,
Nheko
.
colors
.
window
)
userid
:
model
.
mxid
font.pixelSize
:
fontMetrics
.
font
.
pixelSize
url
:
model
.
avatarUrl
.
replace
(
"
mxc://
"
,
"
image://MxcImage/
"
)
elideWidth
:
del
.
width
-
Nheko
.
paddingMedium
*
2
-
avatar
.
width
-
encryptInd
.
width
displayName
:
model
.
displayName
enabled
:
false
}
}
ElidedLabel
{
ColumnLayout
{
fullText
:
model
.
mxid
spacing
:
Nheko
.
paddingSmall
color
:
Nheko
.
colors
.
buttonText
font.pixelSize
:
Math
.
ceil
(
fontMetrics
.
font
.
pixelSize
*
0.9
)
ElidedLabel
{
elideWidth
:
del
.
width
-
Nheko
.
paddingMedium
*
2
-
avatar
.
width
-
encryptInd
.
width
fullText
:
model
.
displayName
color
:
TimelineManager
.
userColor
(
model
?
model
.
mxid
:
""
,
Nheko
.
colors
.
window
)
font.pixelSize
:
fontMetrics
.
font
.
pixelSize
elideWidth
:
del
.
width
-
Nheko
.
paddingMedium
*
2
-
avatar
.
width
-
encryptInd
.
width
}
ElidedLabel
{
fullText
:
model
.
mxid
color
:
Nheko
.
colors
.
buttonText
font.pixelSize
:
Math
.
ceil
(
fontMetrics
.
font
.
pixelSize
*
0.9
)
elideWidth
:
del
.
width
-
Nheko
.
paddingMedium
*
2
-
avatar
.
width
-
encryptInd
.
width
}
Item
{
Layout.fillHeight
:
true
Layout.fillWidth
:
true
}
}
}
Item
{
EncryptionIndicator
{
Layout.fillHeight
:
true
id
:
encryptInd
Layout.fillWidth
:
true
Layout.alignment
:
Qt
.
AlignRight
visible
:
room
.
isEncrypted
encrypted
:
room
.
isEncrypted
trust
:
encrypted
?
model
.
trustlevel
:
Crypto
.
Unverified
ToolTip.text
:
{
if
(
!
encrypted
)
return
qsTr
(
"
This room is not encrypted!
"
);
switch
(
trust
)
{
case
Crypto
.
Verified
:
return
qsTr
(
"
This user is verified.
"
);
case
Crypto
.
TOFU
:
return
qsTr
(
"
This user isn't verified, but is still using the same master key from the first time you met.
"
);
default
:
return
qsTr
(
"
This user has unverified devices!
"
);
}
}
}
}
}
}
EncryptionIndicator
{
CursorShape
{
id
:
encryptInd
anchors.fill
:
parent
cursorShape
:
Qt
.
PointingHandCursor
Layout.alignment
:
Qt
.
AlignRight
visible
:
room
.
isEncrypted
encrypted
:
room
.
isEncrypted
trust
:
encrypted
?
model
.
trustlevel
:
Crypto
.
Unverified
ToolTip.text
:
{
if
(
!
encrypted
)
return
qsTr
(
"
This room is not encrypted!
"
);
switch
(
trust
)
{
case
Crypto
.
Verified
:
return
qsTr
(
"
This user is verified.
"
);
case
Crypto
.
TOFU
:
return
qsTr
(
"
This user isn't verified, but is still using the same master key from the first time you met.
"
);
default
:
return
qsTr
(
"
This user has unverified devices!
"
);
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment