Compare commits
2 Commits
1e3f7a988d
...
adc6dd35dd
| Author | SHA1 | Date | |
|---|---|---|---|
| adc6dd35dd | |||
| d1a8dc3ff8 |
@@ -37,6 +37,11 @@ Rectangle
|
||||
UserConfiguration
|
||||
{
|
||||
id: userConfiguration
|
||||
configActivePalette: headerPalette
|
||||
configDisabledTextColor: headerDisabledPalette.text
|
||||
}
|
||||
|
||||
required property SystemPalette headerPalette;
|
||||
required property SystemPalette headerDisabledPalette;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,49 +7,48 @@ Flickable {
|
||||
id: flickable
|
||||
width: 200
|
||||
height: 200
|
||||
onDragStarted: console.info("Drag has started")
|
||||
onDragEnded: console.info("Drag has ended")
|
||||
|
||||
GridLayout {
|
||||
columns: 1
|
||||
|
||||
DayOfWeekRow {
|
||||
locale: grid.locale
|
||||
|
||||
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
// WeekNumberColumn {
|
||||
// month: grid.month
|
||||
// year: grid.year
|
||||
// locale: grid.locale
|
||||
// Layout.fillHeight: true
|
||||
// delegate: Text {
|
||||
// text: weekNumber
|
||||
// horizontalAlignment: Text.AlignHCenter
|
||||
// verticalAlignment: Text.AlignVCenter
|
||||
// color: myPalette.text
|
||||
// required property int weekNumber
|
||||
// }
|
||||
// }
|
||||
|
||||
MonthGrid {
|
||||
|
||||
id: grid
|
||||
month: Calendar.November
|
||||
month: Calendar.January
|
||||
year: currentDate.getFullYear()
|
||||
locale: Qt.locale("en_US")
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
delegate: Text {
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: model.day
|
||||
color: model.month === currentDate.getMonth() ? myPalette.text : disabledPalette.text
|
||||
delegate: Rectangle {
|
||||
color: model.today ? activePalette.dark: activePalette.light
|
||||
border.color: model.date === currentDate ? "green": "transparent"
|
||||
border.width: 3
|
||||
width: 30
|
||||
height: 20
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
font.pixelSize: 12
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: model.day
|
||||
color: model.month === currentDate.getMonth() ? activePalette.text : disabledTextColor
|
||||
}
|
||||
|
||||
required property var model
|
||||
}
|
||||
|
||||
property date currentlySelectedDate: currentDate;
|
||||
}
|
||||
}
|
||||
|
||||
required property date currentDate
|
||||
required property SystemPalette activePalette;
|
||||
required property color disabledTextColor;
|
||||
}
|
||||
|
||||
@@ -27,6 +27,8 @@ Window {
|
||||
Appheader
|
||||
{
|
||||
id: myHeader
|
||||
headerPalette: myPalette
|
||||
headerDisabledPalette: disabledPalette
|
||||
}
|
||||
|
||||
GridLayout {
|
||||
|
||||
@@ -19,7 +19,7 @@ Dialog {
|
||||
|
||||
TextField {
|
||||
id: nameField
|
||||
color: myPalette.text
|
||||
color: configActivePalette.text
|
||||
width: 400
|
||||
placeholderText: "Enter the new user's username"
|
||||
}
|
||||
@@ -38,11 +38,16 @@ Dialog {
|
||||
CalendarGrid {
|
||||
id: dateOfBirthGrid
|
||||
currentDate: dateOfBirth
|
||||
activePalette: configActivePalette;
|
||||
disabledTextColor: configDisabledTextColor;
|
||||
}
|
||||
}
|
||||
|
||||
property date dateOfBirth: new Date()
|
||||
property date dateOfDeath: new Date()
|
||||
|
||||
required property SystemPalette configActivePalette;
|
||||
required property color configDisabledTextColor;
|
||||
|
||||
standardButtons: Dialog.Ok | Dialog.Cancel
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user