[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [plasma-framework] src/declarativeimports/calendar/qml: [Calendar] Wrap day name index around
From:       Kai Uwe Broulik <null () kde ! org>
Date:       2018-09-06 10:42:15
Message-ID: E1fxrjr-0004xx-Mr () code ! kde ! org
[Download RAW message or body]

Git commit 020d3e3ebea595fc04642b5ec8f073f5a9478475 by Kai Uwe Broulik.
Committed on 06/09/2018 at 10:41.
Pushed by broulik into branch 'master'.

[Calendar] Wrap day name index around

Otherwise when the week starts on a day other than Sunday or Monday we acce=
ss invalid day names.

CHANGELOG: Fixed week names not showing properly in calendar when week star=
ts with a day other than Monday or Sunday

BUG: 390330

Differential Revision: https://phabricator.kde.org/D15309

M  +1    -1    src/declarativeimports/calendar/qml/DaysCalendar.qml

https://commits.kde.org/plasma-framework/020d3e3ebea595fc04642b5ec8f073f5a9=
478475

diff --git a/src/declarativeimports/calendar/qml/DaysCalendar.qml b/src/dec=
larativeimports/calendar/qml/DaysCalendar.qml
index 0cae8a845..760420c2d 100644
--- a/src/declarativeimports/calendar/qml/DaysCalendar.qml
+++ b/src/declarativeimports/calendar/qml/DaysCalendar.qml
@@ -312,7 +312,7 @@ Item {
             Components.Label {
                 width: daysCalendar.cellWidth
                 height: daysCalendar.cellHeight
-                text: Qt.locale(Qt.locale().uiLanguages[0]).dayName(calend=
arBackend.firstDayOfWeek + index, Locale.ShortFormat)
+                text: Qt.locale(Qt.locale().uiLanguages[0]).dayName(((cale=
ndarBackend.firstDayOfWeek + index) % days.count), Locale.ShortFormat)
                 font.pixelSize: Math.max(theme.smallestFont.pixelSize, day=
sCalendar.cellHeight / 3)
                 opacity: 0.4
                 horizontalAlignment: Text.AlignHCenter
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic