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
This commit is contained in:
parent
e71bd45c55
commit
d327c51521
|
@ -408,6 +408,12 @@ Rectangle {
|
||||||
|
|
||||||
StatusAppThreePanelLayout {
|
StatusAppThreePanelLayout {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
handle: Rectangle {
|
||||||
|
implicitWidth: 5
|
||||||
|
color: SplitHandle.pressed ? Theme.palette.baseColor2
|
||||||
|
: (SplitHandle.hovered ? Qt.darker(Theme.palette.baseColor5, 1.1) : "transparent")
|
||||||
|
}
|
||||||
leftPanel: Item {
|
leftPanel: Item {
|
||||||
id: leftPanel
|
id: leftPanel
|
||||||
|
|
||||||
|
@ -567,12 +573,15 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
rightPanel: Item {
|
rightPanel: Item {
|
||||||
|
id: rightPanel
|
||||||
StatusBaseText {
|
StatusBaseText {
|
||||||
id: titleText
|
id: titleText
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin:16
|
anchors.topMargin:16
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: 16
|
anchors.leftMargin: 16
|
||||||
|
opacity: (rightPanel.width > 50) ? 1.0 : 0.0
|
||||||
|
visible: (opacity > 0.1)
|
||||||
font.pixelSize: 15
|
font.pixelSize: 15
|
||||||
text: qsTr("Members")
|
text: qsTr("Members")
|
||||||
}
|
}
|
||||||
|
@ -601,6 +610,8 @@ Rectangle {
|
||||||
StatusBaseText {
|
StatusBaseText {
|
||||||
height: parent.height
|
height: parent.height
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
opacity: (rightPanel.width > 50) ? 1.0 : 0.0
|
||||||
|
visible: (opacity > 0.1)
|
||||||
font.pixelSize: 15
|
font.pixelSize: 15
|
||||||
color: Theme.palette.directColor1
|
color: Theme.palette.directColor1
|
||||||
text: modelData
|
text: modelData
|
||||||
|
|
|
@ -16,6 +16,7 @@ SplitView {
|
||||||
property bool showRightPanel
|
property bool showRightPanel
|
||||||
|
|
||||||
Control {
|
Control {
|
||||||
|
SplitView.minimumWidth: 300
|
||||||
SplitView.preferredWidth: 300
|
SplitView.preferredWidth: 300
|
||||||
SplitView.fillHeight: true
|
SplitView.fillHeight: true
|
||||||
contentItem: (!!leftPanel) ? leftPanel : null
|
contentItem: (!!leftPanel) ? leftPanel : null
|
||||||
|
|
Loading…
Reference in New Issue