Made the current day of the month be colored in the accent color
This commit is contained in:
@@ -7,19 +7,16 @@ Flickable {
|
|||||||
id: flickable
|
id: flickable
|
||||||
width: 200
|
width: 200
|
||||||
height: 200
|
height: 200
|
||||||
onDragStarted: console.info("Drag has started")
|
|
||||||
onDragEnded: console.info("Drag has ended")
|
|
||||||
|
|
||||||
GridLayout {
|
GridLayout {
|
||||||
columns: 1
|
columns: 1
|
||||||
|
|
||||||
DayOfWeekRow {
|
DayOfWeekRow {
|
||||||
locale: grid.locale
|
locale: grid.locale
|
||||||
|
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We don't need a week column for the moment
|
||||||
// WeekNumberColumn {
|
// WeekNumberColumn {
|
||||||
// month: grid.month
|
// month: grid.month
|
||||||
// year: grid.year
|
// year: grid.year
|
||||||
@@ -35,6 +32,7 @@ Flickable {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
MonthGrid {
|
MonthGrid {
|
||||||
|
|
||||||
id: grid
|
id: grid
|
||||||
month: Calendar.November
|
month: Calendar.November
|
||||||
year: currentDate.getFullYear()
|
year: currentDate.getFullYear()
|
||||||
@@ -42,14 +40,24 @@ Flickable {
|
|||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
delegate: Text {
|
delegate: Rectangle {
|
||||||
horizontalAlignment: Text.AlignHCenter
|
color: model.today ? "transparent": myPalette.accent
|
||||||
verticalAlignment: Text.AlignVCenter
|
width: 30
|
||||||
text: model.day
|
height: 20
|
||||||
color: model.month === currentDate.getMonth() ? myPalette.text : disabledPalette.text
|
|
||||||
|
Text {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
font.pixelSize: 12
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
text: model.day
|
||||||
|
color: model.month === currentDate.getMonth() ? myPalette.text : disabledPalette.text
|
||||||
|
}
|
||||||
|
|
||||||
required property var model
|
required property var model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
required property date currentDate
|
required property date currentDate
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user