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
02da8e44
Commit
02da8e44
authored
3 years ago
by
Malte E
Browse files
Options
Downloads
Patches
Plain Diff
make long topic collapsible
parent
22235def
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#2736
passed
3 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
resources/qml/dialogs/RoomSettings.qml
+34
-5
34 additions, 5 deletions
resources/qml/dialogs/RoomSettings.qml
with
34 additions
and
5 deletions
resources/qml/dialogs/RoomSettings.qml
+
34
−
5
View file @
02da8e44
...
...
@@ -18,7 +18,7 @@ ApplicationWindow {
property
var
roomSettings
minimumWidth
:
340
minimumHeight
:
3
40
minimumHeight
:
4
5
0
width
:
450
height
:
680
palette
:
Nheko
.
colors
...
...
@@ -41,11 +41,11 @@ ApplicationWindow {
anchors.fill
:
parent
clip
:
true
flickableDirection
:
Flickable
.
VerticalFlick
contentWidth
:
contentLayout1
.
width
contentWidth
:
roomSettingsDialog
.
width
contentHeight
:
contentLayout1
.
height
ColumnLayout
{
id
:
contentLayout1
width
:
flickable
.
width
width
:
parent
.
width
spacing
:
Nheko
.
paddingMedium
Avatar
{
...
...
@@ -78,6 +78,7 @@ ApplicationWindow {
opacity
:
0
Layout.alignment
:
Qt
.
AlignHCenter
wrapMode
:
Text
.
Wrap
// somehow still doesn't wrap
Layout.fillWidth
:
true
}
SequentialAnimation
{
...
...
@@ -137,7 +138,12 @@ ApplicationWindow {
}
TextArea
{
Layout.fillHeight
:
true
id
:
roomTopic
property
bool
cut
:
implicitHeight
>
100
property
bool
showMore
clip
:
true
height
:
cut
&&
!
showMore
?
100
:
implicitHeight
Layout.preferredHeight
:
height
Layout.alignment
:
Qt
.
AlignHCenter
Layout.fillWidth
:
true
Layout.leftMargin
:
Nheko
.
paddingLarge
...
...
@@ -148,7 +154,7 @@ ApplicationWindow {
textFormat
:
TextEdit
.
RichText
readOnly
:
true
background
:
null
selectByMouse
:
tru
e
selectByMouse
:
!
Settings
.
mobileMod
e
color
:
Nheko
.
colors
.
text
horizontalAlignment
:
TextEdit
.
AlignHCenter
onLinkActivated
:
Nheko
.
openLink
(
link
)
...
...
@@ -159,11 +165,20 @@ ApplicationWindow {
}
}
Item
{
Layout.alignment
:
Qt
.
AlignHCenter
id
:
showMorePlaceholder
Layout.preferredHeight
:
showMoreButton
.
height
Layout.preferredWidth
:
showMoreButton
.
width
visible
:
roomTopic
.
cut
}
property
point
showMorePos
:
mapToGlobal
(
showMorePlaceholder
.
x
,
showMorePlaceholder
.
y
)
GridLayout
{
columns
:
2
rowSpacing
:
Nheko
.
paddingMedium
Layout.margins
:
Nheko
.
paddingMedium
Layout.fillWidth
:
true
Label
{
text
:
qsTr
(
"
SETTINGS
"
)
...
...
@@ -186,6 +201,7 @@ ApplicationWindow {
roomSettings
.
changeNotifications
(
index
);
}
Layout.fillWidth
:
true
WheelHandler
{}
// suppress scrolling changing values
}
Label
{
...
...
@@ -210,6 +226,7 @@ ApplicationWindow {
roomSettings
.
changeAccessRules
(
index
);
}
Layout.fillWidth
:
true
WheelHandler
{}
// suppress scrolling changing values
}
Label
{
...
...
@@ -303,7 +320,9 @@ ApplicationWindow {
Label
{
text
:
roomSettings
.
roomId
font.pixelSize
:
Math
.
floor
(
fontMetrics
.
font
.
pixelSize
*
0.8
)
wrapMode
:
Text
.
WrapAnywhere
Layout.alignment
:
Qt
.
AlignRight
Layout.fillWidth
:
true
}
Label
{
...
...
@@ -319,6 +338,16 @@ ApplicationWindow {
}
}
}
Button
{
id
:
showMoreButton
x
:
contentLayout1
.
showMorePos
.
x
y
:
Math
.
min
(
contentLayout1
.
showMorePos
.
y
-
flickable
.
contentY
,
parent
.
height
-
height
)
visible
:
roomTopic
.
cut
text
:
roomTopic
.
showMore
?
"
show less
"
:
"
show more
"
onClicked
:
{
roomTopic
.
showMore
=
!
roomTopic
.
showMore
console
.
log
(
flickable
.
visibleArea
)
}
}
footer
:
DialogButtonBox
{
standardButtons
:
DialogButtonBox
.
Ok
onAccepted
:
close
()
...
...
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