Calendar QML imports cleanup
This commit is contained in:
parent
a4b08b0db3
commit
2bd7101314
@ -117,17 +117,15 @@ Item {
|
||||
//z: label.z + 1
|
||||
hoverEnabled: true
|
||||
onClicked: {
|
||||
print("date change:" + dayNumber + monthNumber)
|
||||
var rowNumber = Math.floor ( index / 7) ;
|
||||
var rowNumber = Math.floor(index / 7);
|
||||
week = 1+monthCalendar.weeksModel[rowNumber];
|
||||
root.date = model
|
||||
calendarDays.selectedItem = dayStyle
|
||||
root.date = model;
|
||||
calendarDays.selectedItem = dayStyle;
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
var t = isToday(new Date(yearNumber, monthNumber - 1, dayNumber))
|
||||
if (t) {
|
||||
if (today) {
|
||||
root.date = model;
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ Item {
|
||||
property real borderOpacity: 1.0
|
||||
|
||||
property int leftMargin: frameTop.x
|
||||
property int topMargin: rameTop.y
|
||||
property int topMargin: frameTop.y
|
||||
property int rightMargin: width - frameTop.width
|
||||
property int bottomMargin: height - frameLeft.height
|
||||
|
||||
@ -36,12 +36,10 @@ Item {
|
||||
width: root.columns * root.cellWidth
|
||||
color: theme.textColor
|
||||
opacity: borderOpacity
|
||||
// visible: showtop
|
||||
|
||||
anchors {
|
||||
top: parent.top
|
||||
left: calendarDays.left
|
||||
//right: calendarDays.right
|
||||
}
|
||||
}
|
||||
|
||||
@ -51,12 +49,10 @@ Item {
|
||||
height: root.cellHeight * root.columns
|
||||
color: theme.textColor
|
||||
opacity: borderOpacity
|
||||
// visible: showtop
|
||||
|
||||
anchors {
|
||||
right: calendarDays.left
|
||||
top: calendarDays.top
|
||||
//bottom: calendarDays.bottom
|
||||
}
|
||||
}
|
||||
|
||||
@ -66,12 +62,10 @@ Item {
|
||||
height: root.cellHeight
|
||||
color: theme.textColor
|
||||
opacity: borderOpacity
|
||||
// visible: showtop
|
||||
|
||||
anchors {
|
||||
right: frameTop.right
|
||||
top: calendarDays.top
|
||||
//bottom: calendarDays.bottom
|
||||
}
|
||||
}
|
||||
|
||||
@ -80,10 +74,8 @@ Item {
|
||||
height: borderWidth
|
||||
color: theme.textColor
|
||||
opacity: borderOpacity
|
||||
// // visible: /*showtop*/
|
||||
y: cellHeight - borderWidth
|
||||
anchors {
|
||||
//top: parent.top
|
||||
left: calendarDays.left
|
||||
right: frameTop.right
|
||||
}
|
||||
@ -104,8 +96,8 @@ Item {
|
||||
id: days
|
||||
model: monthCalendar.days
|
||||
Item {
|
||||
width: cellWidth
|
||||
height: cellHeight
|
||||
width: root.cellWidth
|
||||
height: root.cellHeight
|
||||
Components.Label {
|
||||
text: Qt.locale().dayName(monthCalendar.firstDayOfWeek + index, Locale.ShortFormat)
|
||||
font.pixelSize: Math.max(theme.smallestFont.pixelSize, root.cellHeight / 6)
|
||||
|
@ -49,11 +49,6 @@ Item {
|
||||
property int cellWidth: prefCellWidth()
|
||||
property int cellHeight: prefCellHeight()
|
||||
|
||||
// property int miniumWidth: implicitWidth
|
||||
// property int miniumHeight: implicitHeight
|
||||
// property int implicitWidth: theme.mSize(theme.defaultFont).width * 6 * 8
|
||||
// property int implicitHeight: theme.mSize(theme.defaultFont).height * 2 * 9
|
||||
|
||||
property Item selectedItem
|
||||
property int week;
|
||||
property int firstDay: new Date(showDate.getFullYear(), showDate.getMonth(), 1).getDay()
|
||||
@ -106,10 +101,6 @@ Item {
|
||||
startDate: today();
|
||||
}
|
||||
|
||||
// CalendarToolbar {
|
||||
//
|
||||
// }
|
||||
|
||||
DaysCalendar {
|
||||
id: calendarGrid
|
||||
|
||||
@ -122,7 +113,6 @@ Item {
|
||||
|
||||
PlasmaComponents.Label {
|
||||
text: "◀"
|
||||
//x: units.largeSpacing / 2
|
||||
opacity: leftmouse.containsMouse ? 1 : 0.4
|
||||
Behavior on opacity { NumberAnimation {} }
|
||||
anchors {
|
||||
|
Loading…
x
Reference in New Issue
Block a user