import "Settings.js" as Settings
import "Themes.js" as Themes
+import "CacNgayLeTrongNam.js" as CNLTN
Item {
id: screen
- width: 800
- height: 480
+ width: 480
+ height: 800
property int curDay: LC.curDay()
property int curMonth: LC.curMonth()
property string lunarDayCanChi : AmLich.getCanChi(AmLich.getLunarDate(curDay,curMonth,curYear))[0]
property string lunarMonthCanChi : AmLich.getCanChi(AmLich.getLunarDate(curDay,curMonth,curYear))[1]
- //property string lunarCanHour : AmLich.getCanHour0(LC.curHour())
+ property string day_info : CNLTN.get(screen)
+ property bool is_holiday : CNLTN.is_holiday(screen.curDay,screen.curMonth, screen.curYear, screen.lunarDay, screen.lunarMonth)
state:"mainscreen"
state:"jumptodate"
Image {
- source: theme_manager.theme.background_image; fillMode: Image.Tile; anchors.fill: parent; opacity: 0.3
+ source: theme_manager.theme.background_image; fillMode: Image.Stretch; anchors.fill: parent; opacity: 0.3
}
Rectangle {
id:reelx
- width: 300
- height: 100
- y: 126
- anchors.horizontalCenter: parent.horizontalCenter
- property int index: 0
- onIndexChanged: txtDATEpv.currentIndex = reelx.index
- color: "transparent"
+ width: 300
+ height: 100
+ y: 116
+ anchors.horizontalCenter: parent.horizontalCenter
+ property int index: 0
+ onIndexChanged: txtDATEpv.currentIndex = reelx.index
+ color: "transparent"
Component {
id: delegate
Column {
text: name
font.bold: true
font.pixelSize: wrapper.PathView.isCurrentItem ? 80 : 40
- color: wrapper.PathView.isCurrentItem ? "#FFFFFF" : "grey"
+ color: {
+ if (wrapper.PathView.isCurrentItem){
+ var stemp = AmLich98.convertSolar2Lunar(txtDATEpv.currentIndex+1,curMonth,curYear,7);
+ if (CNLTN.is_holiday(txtDATEpv.currentIndex+1,curMonth, stemp[0], stemp[1])){
+ return theme_manager.theme.markdate.holidays;
+ }else{
+ var mark_day = (AmLich.getLunarDate(txtDATEpv.currentIndex+1,curMonth,curYear).jd+1)%7;
+ if (mark_day === 0) //sunday
+ return theme_manager.theme.markdate.sunday;
+ if (mark_day == 6) //saturday
+ return theme_manager.theme.markdate.saturday;
+ else
+ return theme_manager.theme.markdate.otherday_selected;
+ }
+ }
+ else
+ return theme_manager.theme.markdate.otherday;
+ }
}
}
}
Text {
id: txtTHU
x: 151
- y: 240
+ y: 210
width: 80
height: 20
color: "#f0f0f5"
}
Text {
+ id: txtInfo
+ x: 151
+ y: (screen.is_holiday ? 270 : 250)
+ width: 80
+ height: 20
+ color: (screen.is_holiday ? theme_manager.theme.markdate.holidays : theme_manager.theme.markdate.not_holidays)
+ text: screen.day_info
+ horizontalAlignment: Text.AlignHCenter
+ anchors.horizontalCenter: parent.horizontalCenter
+ opacity: 0.6
+ font.bold: (screen.is_holiday ? true : false)
+ font.pixelSize: (screen.is_holiday ? 25 : 20)
+ }
+
+ Text {
id: txtDAYAmLich
x: 151
- y: 300
+ y: 330
width: 80
height: 20
color: "#f0f0f5"
anchors.horizontalCenter: parent.horizontalCenter
opacity: 0.6
font.bold: true
- font.pixelSize: 28
+ font.pixelSize: 25
}
x: -(screen.width * 1.5)
}
+ ChangeTheme{
+ id: changeTheme
+ state:"changetheme"
+ anchors.verticalCenter: parent.verticalCenter
+ width: parent.width; height: parent.height-60;
+ x: -(screen.width * 1.5)
+ }
+
XemNgayTotXauHoangDao{
id: xntxhdScreen
state:"xemngaytotxauhoangdao"
},
State {
+ name: "changetheme";
+ PropertyChanges { target: changeTheme; x: 0; focus:true}
+ PropertyChanges { target: toolBar; y: screen.height }
+ PropertyChanges { target: toolBar }
+ PropertyChanges { target: mouseareaMM;enabled:false }
+
+ },
+ State {
name: "xemngaytotxauhoangdao";
PropertyChanges { target: xntxhdScreen; x: 0; focus:true}
PropertyChanges { target: toolBar; y: screen.height }