~ahayzen/music-app/remix-perf-001

« back to all changes in this revision

Viewing changes to music-app.qml

  • Committer: Andrew Hayzen
  • Date: 2014-10-22 14:27:26 UTC
  • mfrom: (687.1.1 remix)
  • Revision ID: ahayzen@gmail.com-20141022142726-wjil5s3anpytunm0
* Merge of lp:music-app/remix

Show diffs side-by-side

added added

removed removed

Lines of Context:
1059
1059
    Page {
1060
1060
        id: emptyPage
1061
1061
        title: i18n.tr("Music")
1062
 
        visible: noMusic
 
1062
        visible: noMusic || noPlaylists || noRecent
1063
1063
 
1064
1064
        property bool noMusic: allSongsModel.rowCount === 0 && allSongsModel.status === SongsModel.Ready && loadedUI
1065
 
 
 
1065
        property bool noPlaylists: playlistModel.model.count === 0 && playlistModel.workerComplete
 
1066
        property bool noRecent: recentModel.model.count === 0 && recentModel.workerComplete
1066
1067
        tools: ToolbarItems {
1067
1068
            back: null
1068
1069
            locked: true
1076
1077
                fill: parent
1077
1078
                topMargin: -emptyPage.header.height
1078
1079
            }
1079
 
            color: styleMusic.libraryEmpty.backgroundColor
 
1080
            color: mainView.backgroundColor
 
1081
            visible: emptyPage.noMusic
1080
1082
 
1081
1083
            Column {
1082
1084
                anchors.centerIn: parent
1097
1099
                }
1098
1100
            }
1099
1101
        }
 
1102
 
 
1103
        // Overlay to show when no playlists are on the device
 
1104
        Rectangle {
 
1105
            id: playlistsEmpty
 
1106
            anchors {
 
1107
                fill: parent
 
1108
                topMargin: -emptyPage.header.height
 
1109
            }
 
1110
            color: mainView.backgroundColor
 
1111
            visible: emptyPage.noPlaylists && !emptyPage.noMusic && tabs.selectedTab.index === 4
 
1112
 
 
1113
            Column {
 
1114
                anchors.centerIn: parent
 
1115
 
 
1116
                Label {
 
1117
                    anchors.horizontalCenter: parent.horizontalCenter
 
1118
                    color: styleMusic.libraryEmpty.labelColor
 
1119
                    fontSize: "large"
 
1120
                    font.bold: true
 
1121
                    text: i18n.tr("No playlists found")
 
1122
                }
 
1123
 
 
1124
                Label {
 
1125
                    anchors.horizontalCenter: parent.horizontalCenter
 
1126
                    color: styleMusic.libraryEmpty.labelColor
 
1127
                    fontSize: "medium"
 
1128
                    text: i18n.tr("Click the + to create a playlist")
 
1129
                }
 
1130
            }
 
1131
        }
 
1132
 
 
1133
        // Overlay to show when no recent items are on the device
 
1134
        Rectangle {
 
1135
            id: recentEmpty
 
1136
            anchors {
 
1137
                fill: parent
 
1138
                topMargin: -emptyPage.header.height
 
1139
            }
 
1140
            color: mainView.backgroundColor
 
1141
            visible: emptyPage.noRecent && !emptyPage.noMusic && tabs.selectedTab.index === 0
 
1142
 
 
1143
            Column {
 
1144
                anchors.centerIn: parent
 
1145
 
 
1146
                Label {
 
1147
                    anchors.horizontalCenter: parent.horizontalCenter
 
1148
                    color: styleMusic.libraryEmpty.labelColor
 
1149
                    fontSize: "large"
 
1150
                    font.bold: true
 
1151
                    text: i18n.tr("No recent albums or playlists found")
 
1152
                }
 
1153
 
 
1154
                Label {
 
1155
                    anchors.horizontalCenter: parent.horizontalCenter
 
1156
                    color: styleMusic.libraryEmpty.labelColor
 
1157
                    fontSize: "medium"
 
1158
                    text: i18n.tr("Play some music to see your favorites")
 
1159
                }
 
1160
            }
 
1161
        }
 
1162
 
1100
1163
    }
1101
1164
 
1102
1165
    LoadingSpinnerComponent {