From: Cuong Le Date: Thu, 15 Sep 2011 16:13:49 +0000 (+0700) Subject: 1.0.2 Bumped version to 1.0.2-4 X-Git-Tag: v1.0.2-4^2~3 X-Git-Url: http://git.maemo.org/git/?p=lichviet;a=commitdiff_plain;h=1dad491bc9e86781cc3cb99b7c156a267a019787;hp=c37371da2f046d1a0ada7a7ab8e3f72ba0c2341f 1.0.2 Bumped version to 1.0.2-4 --- diff --git a/qml/DatePicker/component/Button.qml b/qml/DatePicker/component/Button.qml index cad0b36..febd872 100644 --- a/qml/DatePicker/component/Button.qml +++ b/qml/DatePicker/component/Button.qml @@ -1,8 +1,6 @@ import QtQuick 1.1 Item { - id: container - property string buttonName: "NOT SET" property string target: "NOT SET" property string text: "NOT SET" @@ -13,49 +11,19 @@ Item { property bool active: false - property string bgImage: theme_manager.theme.datepicker.button - property string bgImagePressed: theme_manager.theme.datepicker.button_pressed - property string bgImageActive: theme_manager.theme.datepicker.button_active - - // These Component properties can be used to modify the Button's LaF - // from the calling component. They have to define a BorderImage component. - property Component bg: defaultBackground - property Component bgPressed: defaultPressedBackground - property Component bgActive: defaultActiveBackground - signal clicked(string target, string button) width: 140 height: 60 - opacity: enabled ? 1.0 : 0.5 + opacity: enabled ? 1.0 : 0.5 - Loader { - id: background - sourceComponent: container.bg + Rectangle{ anchors.fill: parent - } - - Component { - id: defaultBackground - BorderImage { - border { top: 8; bottom: 8; left: 8; right: 8 } - source: bgImage - } - } - Component { - id: defaultPressedBackground - BorderImage { - border { top: 8; bottom: 8; left: 8; right: 8 } - source: bgImagePressed - } - } - - Component { - id: defaultActiveBackground - BorderImage { - border { top: 8; bottom: 8; left: 8; right: 8 } - source: bgImageActive - } + width: container.width + height: container.height + color:"white" + border.color: "black" + radius: 8 } Text { @@ -73,22 +41,4 @@ Item { } color: container.fontColor } - - MouseArea { - id: mouseArea - anchors.fill: parent - - } - - states: [ - State { - name: 'pressed'; when: mouseArea.pressed - PropertyChanges { target: background; sourceComponent: container.bgPressed } - }, - State { - name: 'active'; when: container.active - PropertyChanges { target: background; sourceComponent: container.defaultActiveBackground; } - } - ] - } diff --git a/qml/DatePicker/component/DateReel.qml b/qml/DatePicker/component/DateReel.qml index 5564eb2..bc4d49b 100644 --- a/qml/DatePicker/component/DateReel.qml +++ b/qml/DatePicker/component/DateReel.qml @@ -21,18 +21,6 @@ Item { // 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 @@ -49,8 +37,6 @@ Item { 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 } } @@ -64,8 +50,6 @@ Item { 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 - bg: itemBackground - bgPressed: itemBackgroundPressed } } diff --git a/qml/DatePicker/component/Reel.qml b/qml/DatePicker/component/Reel.qml index 21b9971..eb1ab26 100644 --- a/qml/DatePicker/component/Reel.qml +++ b/qml/DatePicker/component/Reel.qml @@ -15,7 +15,7 @@ Rectangle { 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 @@ -28,7 +28,7 @@ Rectangle { // 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 diff --git a/qml/LichViet/main.qml b/qml/LichViet/main.qml index c1afc70..2ada692 100644 --- a/qml/LichViet/main.qml +++ b/qml/LichViet/main.qml @@ -230,18 +230,16 @@ Item { Text { id: txtDMY - x: 140 + x: 151 y: 77 - width: 80 height: 20 color: "#29d999" - textFormat: Text.RichText text: "Tháng "+screen.curMonth+" Năm "+screen.curYear+"" + horizontalAlignment: Text.AlignHCenter anchors.horizontalCenter: parent.horizontalCenter font.bold: false font.family: "Tahoma" smooth: true - horizontalAlignment: Text.AlignHCenter font.pixelSize: 28 } @@ -249,7 +247,6 @@ Item { id: txtTHU x: 151 y: 210 - width: 80 height: 20 color: "#f0f0f5" text: Script.__txtTHU_format() @@ -264,7 +261,6 @@ Item { 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() @@ -280,7 +276,6 @@ Item { id: txtDAYAmLich x: 151 y: 330 - width: 80 height: 20 color: "#f0f0f5" text: Script.__txtDAYAmLich_format()