Skip to content
This repository was archived by the owner on Sep 26, 2022. It is now read-only.

Commit d327c51

Browse files
alexandraB990x-r4bbit
authored andcommitted
fix(StatusAppThreePanelLayout): limit right panel width to 300px
Also added handle in DemoApp as well as hiding text when in minimum width for right and left panels
1 parent e71bd45 commit d327c51

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

sandbox/DemoApp.qml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,12 @@ Rectangle {
408408

409409
StatusAppThreePanelLayout {
410410
id: root
411+
412+
handle: Rectangle {
413+
implicitWidth: 5
414+
color: SplitHandle.pressed ? Theme.palette.baseColor2
415+
: (SplitHandle.hovered ? Qt.darker(Theme.palette.baseColor5, 1.1) : "transparent")
416+
}
411417
leftPanel: Item {
412418
id: leftPanel
413419

@@ -567,12 +573,15 @@ Rectangle {
567573
}
568574

569575
rightPanel: Item {
576+
id: rightPanel
570577
StatusBaseText {
571578
id: titleText
572579
anchors.top: parent.top
573580
anchors.topMargin:16
574581
anchors.left: parent.left
575582
anchors.leftMargin: 16
583+
opacity: (rightPanel.width > 50) ? 1.0 : 0.0
584+
visible: (opacity > 0.1)
576585
font.pixelSize: 15
577586
text: qsTr("Members")
578587
}
@@ -601,6 +610,8 @@ Rectangle {
601610
StatusBaseText {
602611
height: parent.height
603612
horizontalAlignment: Text.AlignHCenter
613+
opacity: (rightPanel.width > 50) ? 1.0 : 0.0
614+
visible: (opacity > 0.1)
604615
font.pixelSize: 15
605616
color: Theme.palette.directColor1
606617
text: modelData

src/StatusQ/Layout/StatusAppThreePanelLayout.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ SplitView {
1616
property bool showRightPanel
1717

1818
Control {
19+
SplitView.minimumWidth: 300
1920
SplitView.preferredWidth: 300
2021
SplitView.fillHeight: true
2122
contentItem: (!!leftPanel) ? leftPanel : null

0 commit comments

Comments
 (0)