Commit 9a5b33d4 authored by Claudio Cambra's avatar Claudio Cambra
Browse files

Fix incidence delegate text color in hourly views



Signed-off-by: Claudio Cambra's avatarClaudio Cambra <claudio.cambra@gmail.com>
parent f04ea460
Pipeline #228151 passed with stage
in 2 minutes and 15 seconds
......@@ -1009,7 +1009,9 @@ Kirigami.Page {
ColumnLayout {
id: incidenceContents
readonly property color textColor: LabelUtils.getIncidenceLabelColor(modelData.color, root.isDark)
readonly property color textColor: isOpenOccurrence ?
(LabelUtils.isDarkColor(modelData.color) ? "white" : "black") :
LabelUtils.getIncidenceLabelColor(modelData.color, root.isDark)
readonly property bool isTinyHeight: parent.height <= Kirigami.Units.gridUnit
clip: true
......@@ -1048,8 +1050,7 @@ Kirigami.Page {
implicitHeight: Kirigami.Units.iconSizes.smallMedium
source: modelData.incidenceTypeIcon
isMask: true
color: isOpenOccurrence ? (LabelUtils.isDarkColor(modelData.color) ? "white" : "black") :
incidenceContents.textColor
color: incidenceContents.textColor
Behavior on color { ColorAnimation { duration: Kirigami.Units.shortDuration; easing.type: Easing.OutCubic } }
visible: parent.width > Kirigami.Units.gridUnit * 4
}
......@@ -1060,8 +1061,7 @@ Kirigami.Page {
text: modelData.startTime.toLocaleTimeString(Qt.locale(), Locale.NarrowFormat) + "" + modelData.endTime.toLocaleTimeString(Qt.locale(), Locale.NarrowFormat)
wrapMode: Text.Wrap
renderType: Text.QtRendering
color: isOpenOccurrence ? (LabelUtils.isDarkColor(modelData.color) ? "white" : "black") :
incidenceContents.textColor
color: incidenceContents.textColor
Behavior on color { ColorAnimation { duration: Kirigami.Units.shortDuration; easing.type: Easing.OutCubic } }
visible: parent.width > Kirigami.Units.gridUnit * 3
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment