fix layout polish loop (this one may be the right one)
This commit is contained in:
parent
f847054385
commit
b5c3751c72
3 changed files with 11 additions and 8 deletions
|
|
@ -66,7 +66,7 @@ void ConferenceInfoList::setSelf(QSharedPointer<ConferenceInfoList> me) {
|
||||||
// Cancelled conference organized ourself me must be hidden
|
// Cancelled conference organized ourself me must be hidden
|
||||||
if (conferenceInfo->getState() == linphone::ConferenceInfo::State::Cancelled) {
|
if (conferenceInfo->getState() == linphone::ConferenceInfo::State::Cancelled) {
|
||||||
auto myAddress = defaultAccount->getContactAddress();
|
auto myAddress = defaultAccount->getContactAddress();
|
||||||
if (myAddress && myAddress->weakEqual(conferenceInfo->getOrganizer())) continue;
|
if (!myAddress || myAddress->weakEqual(conferenceInfo->getOrganizer())) continue;
|
||||||
}
|
}
|
||||||
if (confInfoCore) {
|
if (confInfoCore) {
|
||||||
qDebug() << log().arg("Add conf") << confInfoCore->getSubject() << "with state"
|
qDebug() << log().arg("Add conf") << confInfoCore->getSubject() << "with state"
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ ListView {
|
||||||
|
|
||||||
delegate: FocusScope {
|
delegate: FocusScope {
|
||||||
id: itemDelegate
|
id: itemDelegate
|
||||||
height: 63 * DefaultStyle.dp + topOffset
|
height: 63 * DefaultStyle.dp
|
||||||
width: mainItem.width
|
width: mainItem.width
|
||||||
enabled: !isCanceled && haveModel
|
enabled: !isCanceled && haveModel
|
||||||
property var previousItem : mainItem.model.count > 0 && index > 0 ? mainItem.model.getAt(index-1) : null
|
property var previousItem : mainItem.model.count > 0 && index > 0 ? mainItem.model.getAt(index-1) : null
|
||||||
|
|
@ -79,14 +79,16 @@ ListView {
|
||||||
property bool isFirst : ListView.previousSection !== ListView.section
|
property bool isFirst : ListView.previousSection !== ListView.section
|
||||||
property int topOffset: (dateDay.visible && !isFirst? 8 * DefaultStyle.dp : 0)
|
property int topOffset: (dateDay.visible && !isFirst? 8 * DefaultStyle.dp : 0)
|
||||||
property var endDateTime: $modelData ? $modelData.core.endDateTime : UtilsCpp.getCurrentDateTime()
|
property var endDateTime: $modelData ? $modelData.core.endDateTime : UtilsCpp.getCurrentDateTime()
|
||||||
|
|
||||||
property var haveModel: !!$modelData && $modelData != undefined && $modelData.core.haveModel || false
|
property var haveModel: !!$modelData && $modelData != undefined && $modelData.core.haveModel || false
|
||||||
property bool isCanceled: $modelData.core.state === LinphoneEnums.ConferenceInfoState.Cancelled
|
property bool isCanceled: $modelData.core.state === LinphoneEnums.ConferenceInfoState.Cancelled
|
||||||
|
Component.onCompleted: if (!isFirst && dateDay.visible) {
|
||||||
|
height = (63+topOffset)*DefaultStyle.dp
|
||||||
|
delegateIn.anchors.topMargin = topOffset
|
||||||
|
}
|
||||||
|
|
||||||
RowLayout{
|
RowLayout{
|
||||||
|
id: delegateIn
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.topMargin:parent.topOffset
|
|
||||||
spacing: 0
|
spacing: 0
|
||||||
Item{
|
Item{
|
||||||
Layout.preferredWidth: 32 * DefaultStyle.dp
|
Layout.preferredWidth: 32 * DefaultStyle.dp
|
||||||
|
|
|
||||||
|
|
@ -98,10 +98,11 @@ AbstractMainPage {
|
||||||
|
|
||||||
leftPanelContent: Control.StackView {
|
leftPanelContent: Control.StackView {
|
||||||
id: leftPanelStackView
|
id: leftPanelStackView
|
||||||
Layout.fillHeight: true
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
Layout.leftMargin: 45 * DefaultStyle.dp
|
Layout.leftMargin: 45 * DefaultStyle.dp
|
||||||
initialItem: listLayout
|
initialItem: listLayout
|
||||||
|
clip: true
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue