From 085995baddc29fe90b9cd3240c74be64a853ba65 Mon Sep 17 00:00:00 2001 From: ryoh Date: Fri, 29 Jan 2016 03:56:28 -0800 Subject: Create "artwork" panel. I would like to implement new audio player ui ver 1.1 by small steps. First, we create "artwork" panel. This panel shows artwork image, title and artist. TEST=manually BUG=578022 Review URL: https://codereview.chromium.org/1603803002 Cr-Commit-Position: refs/heads/master@{#372331} --- .../audio_player/assets/100/player_cover_close.png | Bin 0 -> 414 bytes .../audio_player/assets/100/player_cover_open.png | Bin 0 -> 416 bytes .../audio_player/assets/200/player_cover_close.png | Bin 0 -> 726 bytes .../audio_player/assets/200/player_cover_open.png | Bin 0 -> 688 bytes ui/file_manager/audio_player/css/audio_player.css | 1 + .../audio_player/elements/audio_player.css | 27 +++-- .../audio_player/elements/audio_player.html | 7 +- .../audio_player/elements/audio_player.js | 26 ++++- .../audio_player/elements/control_panel.html | 2 +- .../audio_player/elements/control_panel.js | 4 +- .../audio_player/elements/track_info_panel.css | 110 +++++++++++++++++++++ .../audio_player/elements/track_info_panel.html | 32 ++++++ .../audio_player/elements/track_info_panel.js | 24 +++++ .../audio_player/elements/track_list.css | 4 - .../audio_player/elements/track_list.js | 46 ++++----- ui/file_manager/audio_player/js/audio_player.js | 65 ++++++------ .../audio_player/js/compiled_resources.gyp | 2 +- ui/file_manager/file_manager_resources.grd | 3 + 18 files changed, 282 insertions(+), 71 deletions(-) create mode 100644 ui/file_manager/audio_player/assets/100/player_cover_close.png create mode 100644 ui/file_manager/audio_player/assets/100/player_cover_open.png create mode 100644 ui/file_manager/audio_player/assets/200/player_cover_close.png create mode 100644 ui/file_manager/audio_player/assets/200/player_cover_open.png create mode 100644 ui/file_manager/audio_player/elements/track_info_panel.css create mode 100644 ui/file_manager/audio_player/elements/track_info_panel.html create mode 100644 ui/file_manager/audio_player/elements/track_info_panel.js (limited to 'ui') diff --git a/ui/file_manager/audio_player/assets/100/player_cover_close.png b/ui/file_manager/audio_player/assets/100/player_cover_close.png new file mode 100644 index 0000000..57af8d0 Binary files /dev/null and b/ui/file_manager/audio_player/assets/100/player_cover_close.png differ diff --git a/ui/file_manager/audio_player/assets/100/player_cover_open.png b/ui/file_manager/audio_player/assets/100/player_cover_open.png new file mode 100644 index 0000000..b8b7960 Binary files /dev/null and b/ui/file_manager/audio_player/assets/100/player_cover_open.png differ diff --git a/ui/file_manager/audio_player/assets/200/player_cover_close.png b/ui/file_manager/audio_player/assets/200/player_cover_close.png new file mode 100644 index 0000000..1a5d138 Binary files /dev/null and b/ui/file_manager/audio_player/assets/200/player_cover_close.png differ diff --git a/ui/file_manager/audio_player/assets/200/player_cover_open.png b/ui/file_manager/audio_player/assets/200/player_cover_open.png new file mode 100644 index 0000000..a2034f4 Binary files /dev/null and b/ui/file_manager/audio_player/assets/200/player_cover_open.png differ diff --git a/ui/file_manager/audio_player/css/audio_player.css b/ui/file_manager/audio_player/css/audio_player.css index 2ba0d15..faa4a02 100644 --- a/ui/file_manager/audio_player/css/audio_player.css +++ b/ui/file_manager/audio_player/css/audio_player.css @@ -28,6 +28,7 @@ div.audio-player { cursor: default; flex: 1 1 auto; font-size: 10pt; + height: 100%; position: relative; } diff --git a/ui/file_manager/audio_player/elements/audio_player.css b/ui/file_manager/audio_player/elements/audio_player.css index 614c701..921f9cc 100644 --- a/ui/file_manager/audio_player/elements/audio_player.css +++ b/ui/file_manager/audio_player/elements/audio_player.css @@ -2,17 +2,26 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ +:host { + display: flex; + flex-direction: column; + height: 100%; + justify-content: space-between; +} + +track-info-panel { + flex-grow: 0; + flex-shrink: 0; +} + track-list { - bottom: 96px; /* Room for the control bar. */ - left: 0; - position: absolute; - right: 0; - top: 0; + flex-grow: 1; + flex-shrink: 1; + overflow-x: hidden; + overflow-y: scroll; } control-panel { - bottom: 0; - left: 0; - position: fixed; - right: 0; + height: 96px; + flex-shrink: 0; } diff --git a/ui/file_manager/audio_player/elements/audio_player.html b/ui/file_manager/audio_player/elements/audio_player.html index 60598da..da58040 100644 --- a/ui/file_manager/audio_player/elements/audio_player.html +++ b/ui/file_manager/audio_player/elements/audio_player.html @@ -5,14 +5,17 @@ --> +