Fix weather view crashing with Qt 5.15
This commit is contained in:
parent
e3968062b4
commit
451b9f8ff8
@ -66,10 +66,13 @@ CustomViewBase {
|
|||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: mainImageSize
|
||||||
|
|
||||||
|
property int mainImageSize: app.iconSize * 2
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredWidth: (parent.width - mainImage.width) / 2
|
Layout.preferredWidth: (parent.width - parent.mainImageSize) / 2
|
||||||
|
|
||||||
GridLayout {
|
GridLayout {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
@ -98,20 +101,19 @@ CustomViewBase {
|
|||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ColorIcon {
|
ColorIcon {
|
||||||
id: mainImage
|
id: mainImage
|
||||||
Layout.preferredWidth: app.largeFont * 4
|
Layout.preferredWidth: parent.mainImageSize
|
||||||
Layout.preferredHeight: app.largeFont * 4
|
Layout.preferredHeight: width
|
||||||
name: weatherConditionState ? "../images/weathericons/weather-" + weatherConditionState.value + ".svg" : ""
|
name: weatherConditionState ? "../images/weathericons/weather-" + weatherConditionState.value + ".svg" : ""
|
||||||
color: "white"
|
color: app.foregroundColor
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredWidth: (parent.width - mainImage.width) / 2
|
Layout.preferredWidth: (parent.width - parent.mainImageSize) / 2
|
||||||
GridLayout {
|
GridLayout {
|
||||||
columns: 2
|
columns: 2
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
|||||||
Reference in New Issue
Block a user