1.0.2 Bumped version to 1.0.2-4
authorCuong Le <cuonglb@ideapad.(none)>
Thu, 15 Sep 2011 16:13:49 +0000 (23:13 +0700)
committerCuong Le <cuonglb@ideapad.(none)>
Thu, 15 Sep 2011 16:13:49 +0000 (23:13 +0700)
qml/DatePicker/component/Button.qml
qml/DatePicker/component/DateReel.qml
qml/DatePicker/component/Reel.qml
qml/LichViet/main.qml

index cad0b36..febd872 100644 (file)
@@ -1,8 +1,6 @@
 import QtQuick 1.1\r
 \r
 Item {\r
 import QtQuick 1.1\r
 \r
 Item {\r
-    id: container\r
-\r
     property string buttonName: "NOT SET"\r
     property string target: "NOT SET"\r
     property string text: "NOT SET"\r
     property string buttonName: "NOT SET"\r
     property string target: "NOT SET"\r
     property string text: "NOT SET"\r
@@ -13,49 +11,19 @@ Item {
 \r
     property bool active: false\r
 \r
 \r
     property bool active: false\r
 \r
-    property string bgImage: theme_manager.theme.datepicker.button\r
-    property string bgImagePressed: theme_manager.theme.datepicker.button_pressed\r
-    property string bgImageActive: theme_manager.theme.datepicker.button_active\r
-\r
-    // These Component properties can be used to modify the Button's LaF\r
-    // from the calling component. They have to define a BorderImage component.\r
-    property Component bg: defaultBackground\r
-    property Component bgPressed: defaultPressedBackground\r
-    property Component bgActive: defaultActiveBackground\r
-\r
     signal clicked(string target, string button)\r
 \r
     width: 140\r
     height: 60\r
     signal clicked(string target, string button)\r
 \r
     width: 140\r
     height: 60\r
-    opacity: enabled ? 1.0 : 0.5    \r
+    opacity: enabled ? 1.0 : 0.5\r
 \r
 \r
-    Loader {\r
-        id: background\r
-        sourceComponent: container.bg\r
+    Rectangle{\r
         anchors.fill: parent\r
         anchors.fill: parent\r
-    }\r
-\r
-    Component {\r
-        id: defaultBackground\r
-        BorderImage {\r
-            border { top: 8; bottom: 8; left: 8; right: 8 }\r
-            source: bgImage\r
-        }\r
-    }\r
-    Component {\r
-        id: defaultPressedBackground\r
-        BorderImage {\r
-            border { top: 8; bottom: 8; left: 8; right: 8 }\r
-            source: bgImagePressed\r
-        }\r
-    }\r
-\r
-    Component {\r
-        id: defaultActiveBackground\r
-        BorderImage {\r
-            border { top: 8; bottom: 8; left: 8; right: 8 }\r
-            source: bgImageActive\r
-        }\r
+        width: container.width\r
+        height: container.height\r
+        color:"white"\r
+        border.color: "black"\r
+        radius: 8\r
     }\r
 \r
     Text {\r
     }\r
 \r
     Text {\r
@@ -73,22 +41,4 @@ Item {
         }\r
         color: container.fontColor\r
     }\r
         }\r
         color: container.fontColor\r
     }\r
-\r
-    MouseArea {\r
-        id: mouseArea\r
-        anchors.fill: parent\r
-\r
-    }\r
-\r
-    states: [\r
-        State {\r
-            name: 'pressed'; when: mouseArea.pressed\r
-            PropertyChanges { target: background; sourceComponent: container.bgPressed }\r
-        },\r
-        State {\r
-            name: 'active'; when: container.active\r
-            PropertyChanges { target: background; sourceComponent: container.defaultActiveBackground; }\r
-        }\r
-    ]\r
-\r
 }\r
 }\r
index 5564eb2..bc4d49b 100644 (file)
@@ -21,18 +21,6 @@ Item {
     // Spacing between items
     property int spacing: 8
 
     // Spacing between items
     property int spacing: 8
 
-    property Component itemBackground: Component {
-        BorderImage {
-            border { top: 8; bottom: 8; left: 8; right: 8 }
-            source:  theme_manager.theme.datepicker.button
-        }
-    }
-    property Component itemBackgroundPressed: Component {
-        BorderImage {
-            border { top: 8; bottom: 8; left: 8; right: 8 }
-            source: theme_manager.theme.datepicker.button_pressed
-        }
-    }
 
     width: 240
     height:  90
 
     width: 240
     height:  90
@@ -49,8 +37,6 @@ Item {
             fontColor: container.fontColor
             fontName: container.fontName
             fontSize: container.fontSize
             fontColor: container.fontColor
             fontName: container.fontName
             fontSize: container.fontSize
-            bg: itemBackground
-            bgPressed: itemBackgroundPressed
              opacity: (index+1 < days.start || index+1 > days.end) ? 0.5 : 1.0
         }
     }
              opacity: (index+1 < days.start || index+1 > days.end) ? 0.5 : 1.0
         }
     }
@@ -64,8 +50,6 @@ Item {
             fontColor: container.fontColor
             fontName: container.fontName
             fontSize: container.fontSize
             fontColor: container.fontColor
             fontName: container.fontName
             fontSize: container.fontSize
-            bg: itemBackground
-            bgPressed: itemBackgroundPressed
 
         }
     }
 
         }
     }
@@ -79,8 +63,6 @@ Item {
             fontColor: container.fontColor
             fontName: container.fontName
             fontSize: container.fontSize
             fontColor: container.fontColor
             fontName: container.fontName
             fontSize: container.fontSize
-            bg: itemBackground
-            bgPressed: itemBackgroundPressed
         }
     }
 
         }
     }
 
index 21b9971..eb1ab26 100644 (file)
@@ -15,7 +15,7 @@ Rectangle {
 
     function open() { focus = true; clip = false }
     function close() { clip = true }
 
     function open() { focus = true; clip = false }
     function close() { clip = true }
-    function toggle() { clip ? open() : close() }
+
     function shiftZ(obj, delta) {
         if (typeof obj.z != 'undefined') obj.z += delta
         if (obj.parent) shiftZ(obj.parent, delta) // Set z recursively to parent
     function shiftZ(obj, delta) {
         if (typeof obj.z != 'undefined') obj.z += delta
         if (obj.parent) shiftZ(obj.parent, delta) // Set z recursively to parent
@@ -28,7 +28,7 @@ Rectangle {
     // Close reel when the focus is lost
     onFocusChanged: if (!focus) close()
     // Bring to front if not clipped
     // Close reel when the focus is lost
     onFocusChanged: if (!focus) close()
     // Bring to front if not clipped
-    onClipChanged:  { clip ? shiftZ(reel, -500) : shiftZ(reel, 500) }
+
 
     onIndexChanged: path.currentIndex = reel.index
 
 
     onIndexChanged: path.currentIndex = reel.index
 
index c1afc70..2ada692 100644 (file)
@@ -230,18 +230,16 @@ Item {
 
          Text {
              id: txtDMY
 
          Text {
              id: txtDMY
-                      x: 140
+                      x: 151
                       y: 77
                       y: 77
-                      width: 80
                       height: 20
                       color: "#29d999"
                       height: 20
                       color: "#29d999"
-                      textFormat: Text.RichText
                       text: "Tháng <b>"+screen.curMonth+"</b> Năm <b>"+screen.curYear+"</b>"
                       text: "Tháng <b>"+screen.curMonth+"</b> Năm <b>"+screen.curYear+"</b>"
+                      horizontalAlignment: Text.AlignHCenter
                       anchors.horizontalCenter: parent.horizontalCenter
                       font.bold: false
                       font.family: "Tahoma"
                       smooth: true
                       anchors.horizontalCenter: parent.horizontalCenter
                       font.bold: false
                       font.family: "Tahoma"
                       smooth: true
-                      horizontalAlignment: Text.AlignHCenter
                       font.pixelSize: 28
               }
 
                       font.pixelSize: 28
               }
 
@@ -249,7 +247,6 @@ Item {
              id: txtTHU
              x: 151
              y: 210
              id: txtTHU
              x: 151
              y: 210
-             width: 80
              height: 20
              color: "#f0f0f5"
              text: Script.__txtTHU_format()
              height: 20
              color: "#f0f0f5"
              text: Script.__txtTHU_format()
@@ -264,7 +261,6 @@ Item {
              id: txtInfo
              x: 151
              y: (screen.is_holiday ? 270 : 250)
              id: txtInfo
              x: 151
              y: (screen.is_holiday ? 270 : 250)
-             width: 80
              height: 20
              color: (Script.is_holiday ? theme_manager.theme.markdate.holidays : theme_manager.theme.markdate.not_holidays)
              text: Script.__txtInfo_format()
              height: 20
              color: (Script.is_holiday ? theme_manager.theme.markdate.holidays : theme_manager.theme.markdate.not_holidays)
              text: Script.__txtInfo_format()
@@ -280,7 +276,6 @@ Item {
              id: txtDAYAmLich
              x: 151
              y: 330
              id: txtDAYAmLich
              x: 151
              y: 330
-             width: 80
              height: 20
              color: "#f0f0f5"
              text: Script.__txtDAYAmLich_format()
              height: 20
              color: "#f0f0f5"
              text: Script.__txtDAYAmLich_format()