From b629bdcf08c20dd8801a66354a22e5727441fdb9 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Fri, 20 Jan 2017 14:30:16 +0100 Subject: [PATCH] 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 --- src/declarativeimports/calendar/qml/DaysCalendar.qml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/declarativeimports/calendar/qml/DaysCalendar.qml b/src/declarativeimports/calendar/qml/DaysCalendar.qml index 2d4a13930..3d47df930 100644 --- a/src/declarativeimports/calendar/qml/DaysCalendar.qml +++ b/src/declarativeimports/calendar/qml/DaysCalendar.qml @@ -103,6 +103,9 @@ Item { level: 1 elide: Text.ElideRight 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 { id: monthMouse @@ -145,6 +148,8 @@ Item { iconName: Qt.application.layoutDirection === Qt.RightToLeft ? "go-next" : "go-previous" onClicked: daysCalendar.previous() Accessible.name: tooltip + //SEE QTBUG-58307 + Layout.preferredHeight: implicitHeight + implicitHeight%2 } Components.ToolButton { @@ -153,6 +158,8 @@ Item { tooltip: i18ndc("libplasma5", "Reset calendar to today", "Today") Accessible.name: tooltip Accessible.description: i18nd("libplasma5", "Reset calendar to today") + //SEE QTBUG-58307 + Layout.preferredHeight: implicitHeight + implicitHeight%2 } Components.ToolButton { @@ -160,6 +167,8 @@ Item { iconName: Qt.application.layoutDirection === Qt.RightToLeft ? "go-previous" : "go-next" onClicked: daysCalendar.next() Accessible.name: tooltip + //SEE QTBUG-58307 + Layout.preferredHeight: implicitHeight + implicitHeight%2 } }