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,43 +195,40 @@ 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
}
Control.ScrollBar.vertical: ScrollBar {
id: meetingsScrollbar
anchors.right: parent.right
anchors.rightMargin: 8 * DefaultStyle.dp
active: true
interactive: true
policy: Control.ScrollBar.AsNeeded
} }
} }
onSelectedConferenceChanged: {
mainItem.selectedConference = selectedConference
}
Control.ScrollBar.vertical: ScrollBar {
id: meetingsScrollbar
anchors.right: parent.right
anchors.rightMargin: 8 * DefaultStyle.dp
active: true
interactive: true
policy: Control.ScrollBar.AsNeeded
}
} }
} }
} }
@ -245,7 +242,7 @@ AbstractMainPage {
property bool isCreation property bool isCreation
ColumnLayout { ColumnLayout {
spacing: 33 * DefaultStyle.dp spacing: 33 * DefaultStyle.dp
RowLayout { RowLayout {
width: 320 * DefaultStyle.dp width: 320 * DefaultStyle.dp
Layout.rightMargin: 35 * DefaultStyle.dp Layout.rightMargin: 35 * DefaultStyle.dp