~ubuntu-calendar-dev/ubuntu-calendar-app/ViewRedisign

« back to all changes in this revision

Viewing changes to TimeLineBackground.qml

  • Committer: Nekhelesh Ramananthan
  • Date: 2014-09-16 11:16:32 UTC
  • Revision ID: krnekhelesh@gmail.com-20140916111632-0it7x9xx73a33nq9
Tweaked time label

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 * You should have received a copy of the GNU General Public License
16
16
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
17
 */
18
 
import QtQuick 2.0
 
18
 
 
19
import QtQuick 2.3
19
20
import Ubuntu.Components 1.1
20
21
 
21
22
Column {
34
35
 
35
36
                text: {
36
37
                    var locale = Qt.locale();
37
 
                    var date = new Date(0, 0, 0, index).toLocaleTimeString
38
 
                            (locale, locale.timeFormat(Locale.NarrowFormat)).split(" ")
39
 
                    return date[0] + "\n" + date[1] !== undefidend && date[1] !== null ? date[1] : ""
40
 
 
 
38
                    return new Date(0, 0, 0, index).toLocaleTimeString
 
39
                            (locale, locale.timeFormat(Locale.NarrowFormat))
41
40
                }
42
41
                color: UbuntuColors.lightGrey
43
 
                anchors.left:parent.left
44
 
                anchors.margins:  units.gu(2)
 
42
                anchors.left: parent.left
 
43
                anchors.leftMargin: units.gu(2)
45
44
                anchors.verticalCenter: parent.verticalCenter
46
 
                fontSize: "Medium"
 
45
                fontSize: "small"
47
46
            }
48
47
        }
49
48
    }