* Theme now is simple and very fast
[lichviet] / qml / LichViet / AmDateTimeDialog.qml
index 83f05cd..2cafdd2 100644 (file)
@@ -35,6 +35,7 @@ Item{
     }
 
     signal toolbar
+    signal updatedate(int day, int month, int year)
 
     Rectangle {
         id: rectangle1
@@ -51,8 +52,9 @@ Item{
 
         Button {
             id: button2
-            x: 313
-            anchors.right: parent.right; anchors.rightMargin: 8; y: 185; width: 140; height: 40
+            anchors.right: parent.right; anchors.rightMargin: 145; y: 185; width: 100; height: 40
+            anchors.horizontalCenter: parent.horizontalCenter
+
             text: "OK"
             onClicked: {
                  var lday = lunarday_pathview.currentIndex+1;
@@ -76,15 +78,11 @@ Item{
                  if (thangnhuan!=-1 && lunarmonth_pathview.currentIndex> thangnhuan)
                      lmonth-=1;
 
-                var finalSolarDay = Script.convertLunar2Solar(lday,lmonth,lyear,lnhuan,7)
-
-                 LC.reset(finalSolarDay[0],finalSolarDay[1],finalSolarDay[2])
-                 Script.calculateLunar( finalSolarDay[0], finalSolarDay[1], finalSolarDay[2])
-                 Script.state="mainscreen"
-                 Script.refresh()
+                var finalSolarDay = Script.convertLunar2Solar(lday,lmonth,lyear,lnhuan,7);
 
-                 maindatemodel.reset()
-                 txtDATEpv.currentIndex =  finalSolarDay[0]-1;
+                 amdatetime.state="close";
+                 amdatetime.toolbar();
+                 amdatetime.updatedate(finalSolarDay[0], finalSolarDay[1], finalSolarDay[2])
 
             }
         }