~ci-train-bot/ubuntu-settings-components/ubuntu-settings-components-ubuntu-yakkety-landing-092

« back to all changes in this revision

Viewing changes to Ubuntu/Settings/Menus/MediaPlayerMenu.qml

  • Committer: Nick Dedekind
  • Date: 2014-07-29 15:05:53 UTC
  • mto: This revision was merged to the branch mainline in revision 78.
  • Revision ID: nicholas.dedekind@gmail.com-20140729150553-tqmvzd5u4kyw7yg4
more visual tweaks

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
import QtQuick 2.0
20
20
import Ubuntu.Components 0.1
21
21
import Ubuntu.Components.ListItems 0.1 as ListItem
 
22
import QtQuick.Layouts 1.1
22
23
 
23
24
ListItem.Empty {
24
25
    id: menu
35
36
    implicitHeight: column.height + units.gu(2)
36
37
    Behavior on implicitHeight { UbuntuNumberAnimation {} }
37
38
 
38
 
    Column {
 
39
    ColumnLayout {
39
40
        id: column
40
41
        anchors {
41
42
            left: parent.left
47
48
        }
48
49
        height: running ? trackRow.height : playerRow.height
49
50
 
50
 
        Row {
 
51
        RowLayout {
51
52
            objectName: "player"
52
53
            id: playerRow
53
54
            spacing: menu.__contentsMargins
54
55
            visible: !running
55
56
 
56
 
            Behavior on opacity { UbuntuNumberAnimation {} }
57
 
 
58
57
            UbuntuShape {
59
 
                width: units.gu(5)
60
 
                height: width
 
58
                Layout.preferredHeight: units.gu(5)
 
59
                Layout.preferredWidth: units.gu(5)
61
60
 
62
61
                image: Image {
63
62
                    id: playerIcon
70
69
            }
71
70
        }
72
71
 
73
 
        Row {
 
72
        RowLayout {
74
73
            objectName: "albumArt"
75
74
            id: trackRow
76
75
            width: menu.width
77
76
            spacing: units.gu(2)
78
77
            visible: running
79
78
 
80
 
            Behavior on opacity { UbuntuNumberAnimation {} }
81
 
 
82
79
            UbuntuShape {
83
 
                width: units.gu(10)
84
 
                height: width
 
80
                Layout.preferredHeight: units.gu(10)
 
81
                Layout.preferredWidth: units.gu(10)
85
82
 
86
83
                image: Image {
87
84
                    id: albumArtImage
88
85
                }
89
86
            }
90
87
 
91
 
            Column {
92
 
                spacing: units.gu(1)
 
88
            ColumnLayout {
93
89
                anchors.verticalCenter: parent.verticalCenter
94
90
 
95
91
                Label {
96
92
                    id: songLabel
 
93
                    elide: Text.ElideRight
 
94
                    maximumLineCount: 1
97
95
                }
98
96
 
99
97
                Label {
100
98
                    id: artistLabel
 
99
                    elide: Text.ElideRight
 
100
                    maximumLineCount: 1
101
101
                }
102
102
 
103
103
                Label {
104
104
                    id: albumLabel
 
105
                    elide: Text.ElideRight
 
106
                    maximumLineCount: 1
 
107
                    fontSize: "small"
105
108
                }
106
109
            }
107
110
        }