Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-client-qt
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
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
savoirfairelinux
jami-client-qt
Commits
7139eecc
Commit
7139eecc
authored
3 years ago
by
Sébastien Blin
Browse files
Options
Downloads
Patches
Plain Diff
mainview: make sidepanel fully resizable
GitLab:
#306
Change-Id: I13b58a5069968782e30005fe9418f99ac3c15c97
parent
4f56561f
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
src/mainview/MainView.qml
+7
-13
7 additions, 13 deletions
src/mainview/MainView.qml
with
7 additions
and
13 deletions
src/mainview/MainView.qml
+
7
−
13
View file @
7139eecc
...
...
@@ -38,7 +38,7 @@ Rectangle {
objectName
:
"
mainView
"
property
int
sidePanelViewStack
Minimum
Width
:
300
property
int
sidePanelViewStack
Current
Width
:
300
property
int
mainViewStackPreferredWidth
:
425
property
int
settingsViewPreferredWidth
:
460
property
int
onWidthChangedTriggerDistance
:
5
...
...
@@ -154,7 +154,7 @@ Rectangle {
sidePanelViewStack
.
push
(
settingsMenu
,
StackView
.
Immediate
)
var
windowCurrentMinimizedSize
=
settingsViewPreferredWidth
+
sidePanelViewStack
Minimum
Width
+
onWidthChangedTriggerDistance
+
sidePanelViewStack
Current
Width
+
onWidthChangedTriggerDistance
if
(
appWindow
.
width
<
windowCurrentMinimizedSize
)
appWindow
.
width
=
windowCurrentMinimizedSize
}
...
...
@@ -262,10 +262,8 @@ Rectangle {
Rectangle
{
id
:
mainViewSidePanelRect
SplitView.minimumWidth
:
sidePanelViewStackMinimumWidth
SplitView.maximumWidth
:
(
sidePanelOnly
?
splitView
.
width
:
splitView
.
width
-
sidePanelViewStackMinimumWidth
)
SplitView.maximumWidth
:
splitView
.
width
SplitView.preferredWidth
:
sidePanelViewStackCurrentWidth
SplitView.fillHeight
:
true
color
:
JamiTheme
.
backgroundColor
...
...
@@ -308,11 +306,8 @@ Rectangle {
initialItem
:
welcomePage
SplitView.maximumWidth
:
sidePanelOnly
?
splitView
.
width
:
splitView
.
width
-
sidePanelViewStackMinimumWidth
SplitView.maximumWidth
:
splitView
.
width
SplitView.preferredWidth
:
mainViewStackPreferredWidth
SplitView.minimumWidth
:
sidePanelViewStackMinimumWidth
SplitView.fillHeight
:
true
clip
:
true
...
...
@@ -402,9 +397,8 @@ Rectangle {
onWidthChanged
:
{
// Hide unnecessary stackview when width is changed.
var
widthToCompare
=
previousWidth
<
mainView
.
width
?
sidePanelViewStackMinimumWidth
:
(
sidePanelViewStackMinimumWidth
+
(
inSettingsView
?
settingsViewPreferredWidth
:
mainViewStackPreferredWidth
))
0
:
(
inSettingsView
?
settingsViewPreferredWidth
:
mainViewStackPreferredWidth
)
if
(
mainView
.
width
<
widthToCompare
-
onWidthChangedTriggerDistance
&&
mainViewStack
.
visible
)
{
...
...
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