fix layout polish loop

This commit is contained in:
Gaelle Braud 2024-08-12 11:30:23 +02:00
parent 7b06527ddc
commit c843829920

View file

@ -195,42 +195,39 @@ AbstractMainPage {
restoreMode: Binding.RestoreBindingOrValue restoreMode: Binding.RestoreBindingOrValue
} }
} }
RowLayout { MeetingList {
// Remove 24 from first section padding because we cannot know that it is the first section. 24 is the margins between sections. id: conferenceList
// Remove 24 from first section padding because we cannot know that it is the first section. 24 is the margins between sections.
Layout.topMargin: 38 * DefaultStyle.dp - 24 * DefaultStyle.dp Layout.topMargin: 38 * DefaultStyle.dp - 24 * DefaultStyle.dp
spacing: 0 Layout.fillWidth: true
MeetingList { Layout.fillHeight: true
id: conferenceList visible: count != 0
Layout.fillWidth: true hoverEnabled: mainItem.leftPanelEnabled
Layout.fillHeight: true highlightFollowsCurrentItem: true
visible: count != 0 preferredHighlightBegin: height/2 - 10
hoverEnabled: mainItem.leftPanelEnabled preferredHighlightEnd: height/2 + 10
highlightFollowsCurrentItem: true highlightRangeMode: ListView.ApplyRange
preferredHighlightBegin: height/2 - 10 searchBarText: searchBar.text
preferredHighlightEnd: height/2 + 10 Keys.onPressed: (event) => {
highlightRangeMode: ListView.ApplyRange if(event.key == Qt.Key_Escape){
searchBarText: searchBar.text searchBar.forceActiveFocus()
Keys.onPressed: (event) => { event.accepted = true
if(event.key == Qt.Key_Escape){ }else if(event.key == Qt.Key_Right){
searchBar.forceActiveFocus() overridenRightPanelStackView.currentItem.forceActiveFocus()
event.accepted = true event.accepted = true
}else if(event.key == Qt.Key_Right){
overridenRightPanelStackView.currentItem.forceActiveFocus()
event.accepted = true
}
} }
onSelectedConferenceChanged: { }
mainItem.selectedConference = selectedConference onSelectedConferenceChanged: {
} mainItem.selectedConference = selectedConference
Control.ScrollBar.vertical: ScrollBar { }
id: meetingsScrollbar Control.ScrollBar.vertical: ScrollBar {
anchors.right: parent.right id: meetingsScrollbar
anchors.rightMargin: 8 * DefaultStyle.dp anchors.right: parent.right
active: true anchors.rightMargin: 8 * DefaultStyle.dp
interactive: true active: true
policy: Control.ScrollBar.AsNeeded interactive: true
policy: Control.ScrollBar.AsNeeded
}
} }
} }
} }