make all heights in the calendar header to be even
the layout engine has a bug https://bugreports.qt.io/browse/QTBUG-58307 that if some items have an odd height, some an even height, the smallest items are resized by half pixel to try to really center it, breaking rendering BUG:375318 Reviewed-by:David Edmundson
This commit is contained in:
parent
1d12abf334
commit
b629bdcf08
@ -103,6 +103,9 @@ Item {
|
|||||||
level: 1
|
level: 1
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
font.capitalization: Font.Capitalize
|
font.capitalization: Font.Capitalize
|
||||||
|
//SEE QTBUG-58307
|
||||||
|
//try to make all heights an even number, otherwise the layout engine gets confused
|
||||||
|
Layout.preferredHeight: implicitHeight + implicitHeight%2
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: monthMouse
|
id: monthMouse
|
||||||
@ -145,6 +148,8 @@ Item {
|
|||||||
iconName: Qt.application.layoutDirection === Qt.RightToLeft ? "go-next" : "go-previous"
|
iconName: Qt.application.layoutDirection === Qt.RightToLeft ? "go-next" : "go-previous"
|
||||||
onClicked: daysCalendar.previous()
|
onClicked: daysCalendar.previous()
|
||||||
Accessible.name: tooltip
|
Accessible.name: tooltip
|
||||||
|
//SEE QTBUG-58307
|
||||||
|
Layout.preferredHeight: implicitHeight + implicitHeight%2
|
||||||
}
|
}
|
||||||
|
|
||||||
Components.ToolButton {
|
Components.ToolButton {
|
||||||
@ -153,6 +158,8 @@ Item {
|
|||||||
tooltip: i18ndc("libplasma5", "Reset calendar to today", "Today")
|
tooltip: i18ndc("libplasma5", "Reset calendar to today", "Today")
|
||||||
Accessible.name: tooltip
|
Accessible.name: tooltip
|
||||||
Accessible.description: i18nd("libplasma5", "Reset calendar to today")
|
Accessible.description: i18nd("libplasma5", "Reset calendar to today")
|
||||||
|
//SEE QTBUG-58307
|
||||||
|
Layout.preferredHeight: implicitHeight + implicitHeight%2
|
||||||
}
|
}
|
||||||
|
|
||||||
Components.ToolButton {
|
Components.ToolButton {
|
||||||
@ -160,6 +167,8 @@ Item {
|
|||||||
iconName: Qt.application.layoutDirection === Qt.RightToLeft ? "go-previous" : "go-next"
|
iconName: Qt.application.layoutDirection === Qt.RightToLeft ? "go-previous" : "go-next"
|
||||||
onClicked: daysCalendar.next()
|
onClicked: daysCalendar.next()
|
||||||
Accessible.name: tooltip
|
Accessible.name: tooltip
|
||||||
|
//SEE QTBUG-58307
|
||||||
|
Layout.preferredHeight: implicitHeight + implicitHeight%2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user