~popey/ubuntu-clock-app/fix-1288885

« back to all changes in this revision

Viewing changes to common/VerticalDivider.qml

  • Committer: Tarmac
  • Author(s): Nekhelesh Ramananthan
  • Date: 2014-02-19 22:26:29 UTC
  • mfrom: (341.1.28 converge-clock-tab)
  • Revision ID: tarmac-20140219222629-survzj72fczfibov
Implement tablet designs of the clock tab. Fixes: https://bugs.launchpad.net/bugs/1174575.

Approved by Ubuntu Phone Apps Jenkins Bot, David Planella.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2013 Michael Spencer <sonrisesoftware@gmail.com>
 
3
 *
 
4
 * This program is free software: you can redistribute it and/or modify
 
5
 * it under the terms of the GNU General Public License version 3 as
 
6
 * published by the Free Software Foundation.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful,
 
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
 * GNU General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU General Public License
 
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 *
 
16
 * Authored by: Michael Spencer <sonrisesoftware@gmail.com>
 
17
 */
 
18
 
 
19
import QtQuick 2.0
 
20
import Ubuntu.Components 0.1
 
21
import Ubuntu.Components.ListItems 0.1
 
22
 
 
23
Item {
 
24
    property string mode: "left" // or right
 
25
 
 
26
    ThinDivider {
 
27
        id: divider
 
28
        rotation: mode === "left" ? 90 : -90
 
29
 
 
30
        width: parent.height
 
31
 
 
32
        anchors {
 
33
            left: undefined
 
34
            right: undefined
 
35
            centerIn: parent
 
36
        }
 
37
    }
 
38
    width: divider.height
 
39
 
 
40
    anchors {
 
41
        top: parent ? parent.top : undefined
 
42
        bottom: parent ? parent.bottom : undefined
 
43
    }
 
44
}