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
8f3a6abf
Verified
Commit
8f3a6abf
authored
3 years ago
by
Nicolas Werner
Browse files
Options
Downloads
Patches
Plain Diff
Improve the layout and behaviour of topbar slightly
parent
f9362c75
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#2022
passed
3 years ago
Stage: build
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
resources/qml/RoomList.qml
+2
-0
2 additions, 0 deletions
resources/qml/RoomList.qml
resources/qml/TopBar.qml
+32
-11
32 additions, 11 deletions
resources/qml/TopBar.qml
resources/qml/dialogs/RoomSettings.qml
+5
-5
5 additions, 5 deletions
resources/qml/dialogs/RoomSettings.qml
with
39 additions
and
16 deletions
resources/qml/RoomList.qml
+
2
−
0
View file @
8f3a6abf
...
...
@@ -480,6 +480,8 @@ Page {
visible
:
!
collapsed
Layout.alignment
:
Qt
.
AlignVCenter
Layout.preferredWidth
:
fontMetrics
.
lineSpacing
*
2
Layout.preferredHeight
:
fontMetrics
.
lineSpacing
*
2
image
:
"
:/icons/icons/ui/power-button-off.png
"
ToolTip.visible
:
hovered
ToolTip.text
:
qsTr
(
"
Logout
"
)
...
...
This diff is collapsed.
Click to expand it.
resources/qml/TopBar.qml
+
32
−
11
View file @
8f3a6abf
...
...
@@ -3,8 +3,8 @@
// SPDX-License-Identifier: GPL-3.0-or-later
import
Qt
.
labs
.
platform
1.1
as
Platform
import
QtQuick
2.1
2
import
QtQuick
.
Controls
2.1
2
import
QtQuick
2.1
5
import
QtQuick
.
Controls
2.1
5
import
QtQuick
.
Layouts
1.2
import
im
.
nheko
1.0
...
...
@@ -28,14 +28,27 @@ Rectangle {
TapHandler
{
onSingleTapped
:
{
if
(
room
)
TimelineManager
.
openRoomSettings
(
room
.
roomId
);
if
(
room
)
{
let
p
=
topBar
.
mapToItem
(
roomTopicC
,
eventPoint
.
position
.
x
,
eventPoint
.
position
.
y
);
let
link
=
roomTopicC
.
linkAt
(
p
.
x
,
p
.
y
);
if
(
link
)
{
Nheko
.
openLink
(
link
);
}
else
{
TimelineManager
.
openRoomSettings
(
room
.
roomId
);
}
}
eventPoint
.
accepted
=
true
;
}
gesturePolicy
:
TapHandler
.
ReleaseWithinBounds
}
HoverHandler
{
grabPermissions
:
PointerHandler
.
TakeOverForbidden
|
PointerHandler
.
CanTakeOverFromAnything
//cursorShape: Qt.PointingHandCursor
}
GridLayout
{
id
:
topLayout
...
...
@@ -51,8 +64,8 @@ Rectangle {
Layout.row
:
0
Layout.rowSpan
:
2
Layout.alignment
:
Qt
.
AlignVCenter
width
:
Nheko
.
avatarSize
height
:
Nheko
.
avatarSize
Layout.preferredHeight
:
Nheko
.
avatarSize
-
Nheko
.
paddingMedium
Layout.preferredWidth
:
Nheko
.
avatarSize
-
Nheko
.
paddingMedium
visible
:
showBackButton
image
:
"
:/icons/icons/ui/angle-pointing-to-left.png
"
ToolTip.visible
:
hovered
...
...
@@ -71,11 +84,7 @@ Rectangle {
roomid
:
roomId
userid
:
isDirect
?
directChatOtherUserId
:
""
displayName
:
roomName
onClicked
:
{
if
(
room
)
TimelineManager
.
openRoomSettings
(
roomId
);
}
enabled
:
false
}
Label
{
...
...
@@ -91,10 +100,13 @@ Rectangle {
}
MatrixText
{
id
:
roomTopicC
Layout.fillWidth
:
true
Layout.column
:
2
Layout.row
:
1
Layout.maximumHeight
:
fontMetrics
.
lineSpacing
*
2
// show 2 lines
selectByMouse
:
false
enabled
:
false
clip
:
true
text
:
roomTopic
}
...
...
@@ -103,6 +115,8 @@ Rectangle {
Layout.column
:
3
Layout.row
:
0
Layout.rowSpan
:
2
Layout.preferredHeight
:
Nheko
.
avatarSize
-
Nheko
.
paddingMedium
Layout.preferredWidth
:
Nheko
.
avatarSize
-
Nheko
.
paddingMedium
visible
:
isEncrypted
encrypted
:
isEncrypted
trust
:
trustlevel
...
...
@@ -129,6 +143,8 @@ Rectangle {
Layout.row
:
0
Layout.rowSpan
:
2
Layout.alignment
:
Qt
.
AlignVCenter
Layout.preferredHeight
:
Nheko
.
avatarSize
-
Nheko
.
paddingMedium
Layout.preferredWidth
:
Nheko
.
avatarSize
-
Nheko
.
paddingMedium
image
:
"
:/icons/icons/ui/vertical-ellipsis.png
"
ToolTip.visible
:
hovered
ToolTip.text
:
qsTr
(
"
Room options
"
)
...
...
@@ -164,4 +180,9 @@ Rectangle {
}
CursorShape
{
anchors.fill
:
parent
cursorShape
:
Qt
.
PointingHandCursor
}
}
This diff is collapsed.
Click to expand it.
resources/qml/dialogs/RoomSettings.qml
+
5
−
5
View file @
8f3a6abf
...
...
@@ -34,8 +34,8 @@ ApplicationWindow {
id
:
contentLayout1
anchors.fill
:
parent
anchors.margins
:
10
spacing
:
10
anchors.margins
:
Nheko
.
paddingMedium
spacing
:
Nheko
.
paddingMedium
Avatar
{
url
:
roomSettings
.
roomAvatarUrl
.
replace
(
"
mxc://
"
,
"
image://MxcImage/
"
)
...
...
@@ -156,7 +156,7 @@ ApplicationWindow {
GridLayout
{
columns
:
2
rowSpacing
:
Nheko
.
padding
Large
rowSpacing
:
Nheko
.
padding
Medium
MatrixText
{
text
:
qsTr
(
"
SETTINGS
"
)
...
...
@@ -278,7 +278,7 @@ ApplicationWindow {
MatrixText
{
text
:
roomSettings
.
roomId
font.pixelSize
:
fontMetrics
.
font
.
pixelSize
*
1.2
font.pixelSize
:
Math
.
floor
(
fontMetrics
.
font
.
pixelSize
*
0.8
)
Layout.alignment
:
Qt
.
AlignRight
}
...
...
@@ -288,7 +288,7 @@ ApplicationWindow {
MatrixText
{
text
:
roomSettings
.
roomVersion
font.pixelSize
:
fontMetrics
.
font
.
pixelSize
*
1.2
font.pixelSize
:
fontMetrics
.
font
.
pixelSize
Layout.alignment
:
Qt
.
AlignRight
}
...
...
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