fix meeting list height + position view at current date
This commit is contained in:
parent
1e34f38782
commit
6cfb26ba1b
2 changed files with 34 additions and 52 deletions
|
|
@ -8,7 +8,6 @@ import UtilsCpp 1.0
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
id: mainItem
|
id: mainItem
|
||||||
height: contentHeight
|
|
||||||
visible: count > 0
|
visible: count > 0
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
|
|
@ -80,6 +79,7 @@ ListView {
|
||||||
radius: 50 * DefaultStyle.dp
|
radius: 50 * DefaultStyle.dp
|
||||||
property var isCurrentDay: UtilsCpp.isCurrentDay(dateTime)
|
property var isCurrentDay: UtilsCpp.isCurrentDay(dateTime)
|
||||||
color: isCurrentDay ? DefaultStyle.main1_500_main : "transparent"
|
color: isCurrentDay ? DefaultStyle.main1_500_main : "transparent"
|
||||||
|
Component.onCompleted: if(isCurrentDay) mainItem.currentIndex = index
|
||||||
Text {
|
Text {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
text: UtilsCpp.toDateDayString(dateTime)
|
text: UtilsCpp.toDateDayString(dateTime)
|
||||||
|
|
@ -95,7 +95,7 @@ ListView {
|
||||||
id: conferenceInfoDelegate
|
id: conferenceInfoDelegate
|
||||||
anchors.left: dateDay.visible ? dateDay.right : parent.left
|
anchors.left: dateDay.visible ? dateDay.right : parent.left
|
||||||
anchors.leftMargin: 10 * DefaultStyle.dp + mainItem.delegateLeftMargin
|
anchors.leftMargin: 10 * DefaultStyle.dp + mainItem.delegateLeftMargin
|
||||||
anchors.rightMargin: 10 * DefaultStyle.dp + mainItem.delegateLeftMargin
|
anchors.rightMargin: 25 * DefaultStyle.dp + mainItem.delegateLeftMargin
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
radius: 10 * DefaultStyle.dp
|
radius: 10 * DefaultStyle.dp
|
||||||
|
|
|
||||||
|
|
@ -49,21 +49,10 @@ AbstractMainPage {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Layout.topMargin: 30 * DefaultStyle.dp
|
Layout.topMargin: 30 * DefaultStyle.dp
|
||||||
Layout.leftMargin: leftPanel.sideMargin
|
Layout.leftMargin: leftPanel.sideMargin
|
||||||
Layout.rightMargin: leftPanel.sideMargin
|
|
||||||
enabled: mainItem.leftPanelEnabled
|
enabled: mainItem.leftPanelEnabled
|
||||||
Item {
|
Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
|
||||||
Control.ScrollBar {
|
|
||||||
id: meetingsScrollbar
|
|
||||||
active: true
|
|
||||||
interactive: true
|
|
||||||
policy: Control.ScrollBar.AsNeeded
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
anchors.right: parent.right
|
|
||||||
}
|
|
||||||
Control.StackView {
|
Control.StackView {
|
||||||
id: leftPanelStackView
|
id: leftPanelStackView
|
||||||
initialItem: listLayout
|
initialItem: listLayout
|
||||||
|
|
@ -106,47 +95,40 @@ AbstractMainPage {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
placeholderText: qsTr("Rechercher une réunion")
|
placeholderText: qsTr("Rechercher une réunion")
|
||||||
}
|
}
|
||||||
Control.ScrollView {
|
|
||||||
|
Text {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
text: mainItem.emptyListText
|
||||||
|
font {
|
||||||
|
pixelSize: 16 * DefaultStyle.dp
|
||||||
|
weight: 800 * DefaultStyle.dp
|
||||||
|
}
|
||||||
|
visible: mainItem.showDefaultItem
|
||||||
|
}
|
||||||
|
|
||||||
|
MeetingList {
|
||||||
|
id: conferenceList
|
||||||
|
visible: count != 0
|
||||||
|
hoverEnabled: mainItem.leftPanelEnabled
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
rightPadding: leftPanel.sideMargin
|
Layout.topMargin: 20 * DefaultStyle.dp
|
||||||
contentWidth: width - leftPanel.sideMargin
|
searchBarText: searchBar.text
|
||||||
contentHeight: content.height
|
onSelectedConferenceChanged: {
|
||||||
clip: true
|
mainItem.selectedConference = selectedConference
|
||||||
Control.ScrollBar.vertical: meetingsScrollbar
|
}
|
||||||
ColumnLayout {
|
onCountChanged: {
|
||||||
id: content
|
mainItem.meetingListCount = count
|
||||||
width: parent.width
|
}
|
||||||
anchors.topMargin: 5 * DefaultStyle.dp
|
Control.ScrollBar.vertical: Control.ScrollBar {
|
||||||
anchors.fill: parent
|
id: meetingsScrollbar
|
||||||
spacing: 15 * DefaultStyle.dp
|
active: true
|
||||||
Text {
|
interactive: true
|
||||||
Layout.fillHeight: true
|
policy: Control.ScrollBar.AsNeeded
|
||||||
Layout.alignment: Qt.AlignHCenter
|
anchors.top: parent.top
|
||||||
text: mainItem.emptyListText
|
anchors.bottom: parent.bottom
|
||||||
font {
|
anchors.right: parent.right
|
||||||
pixelSize: 16 * DefaultStyle.dp
|
|
||||||
weight: 800 * DefaultStyle.dp
|
|
||||||
}
|
|
||||||
visible: mainItem.showDefaultItem
|
|
||||||
}
|
|
||||||
|
|
||||||
MeetingList {
|
|
||||||
id: conferenceList
|
|
||||||
visible: count != 0
|
|
||||||
hoverEnabled: mainItem.leftPanelEnabled
|
|
||||||
Layout.preferredWidth: parent.width
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.fillHeight: true
|
|
||||||
Layout.topMargin: 20 * DefaultStyle.dp
|
|
||||||
searchBarText: searchBar.text
|
|
||||||
onSelectedConferenceChanged: {
|
|
||||||
mainItem.selectedConference = selectedConference
|
|
||||||
}
|
|
||||||
onCountChanged: {
|
|
||||||
mainItem.meetingListCount = count
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue