Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: ui/file_manager/audio_player/elements/control_panel.css

Issue 1403303011: AudioPlayer: Update control panel with playback progress bar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* Copyright 2014 The Chromium Authors. All rights reserved. 1 /* Copyright 2014 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. */ 3 * found in the LICENSE file. */
4 4
5 /* Controls bar. */ 5 /* Controls bar. */
6 .controls { 6 .controls {
7 align-items: center; 7 align-items: center;
8 background-color: white; 8 background-color: white;
9 display: flex; 9 display: flex;
10 flex-direction: column; 10 flex-direction: column;
11 height: 64px; 11 height: 96px;
12 justify-content: center; 12 justify-content: center;
13 padding: 0; 13 padding: 0;
14 } 14 }
15 15
16 .controls .upper-controls { 16 .controls .upper-controls,
17 height: 32px;
18 width: 100%
19 }
20
21 .controls .lower-controls { 17 .controls .lower-controls {
22 height: 32px; 18 box-sizing: border-box;
23 width: 100% 19 height: 48px;
20 padding: 8px;
21 width: 100%;
24 } 22 }
25 23
26 .audio-controls { 24 .audio-controls {
27 align-items: center; 25 align-items: center;
28 display: flex; 26 display: flex;
29 flex-direction: row; 27 flex-direction: row;
30 justify-content: center; 28 justify-content: center;
31 padding: 0; 29 padding: 0;
32 } 30 }
33 31
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 /* Time controls: a slider and a text time display. */ 73 /* Time controls: a slider and a text time display. */
76 74
77 .time-controls { 75 .time-controls {
78 align-items: center; 76 align-items: center;
79 display: flex; 77 display: flex;
80 flex-direction: row; 78 flex-direction: row;
81 height: 100%; 79 height: 100%;
82 justify-content: center; 80 justify-content: center;
83 } 81 }
84 82
85 .custom-slider.progress { 83 .time-controls > .time {
86 display: flex; 84 color: rgb(51, 51, 51);
87 flex: 1 1 auto; 85 cursor: default;
88 height: 100%; 86 flex: none;
87 font-size: 12px;
89 position: relative; 88 position: relative;
90 z-index: 0; /* Make a layer which includes the thumb on slider. */ 89 padding: 8px;
yawano 2015/10/30 01:59:53 nit: padding should be before position.
fukino 2015/10/30 04:25:53 Done.
91 }
92
93 .custom-slider.progress > input[type='range']::-webkit-slider-thumb {
94 background-image: -webkit-image-set(
95 url(../assets/100/player_timeline_handler.png) 1x,
96 url(../assets/200/player_timeline_handler.png) 2x);
97 width: 28px;
98 }
99
100 .custom-slider.progress > input[type='range']::-webkit-slider-thumb:hover {
101 background-image: -webkit-image-set(
102 url(../assets/100/player_timeline_handler.png) 1x,
103 url(../assets/200/player_timeline_handler.png) 2x);
104 }
105
106 .custom-slider.progress > input[type='range']::-webkit-slider-thumb:active {
107 background-image: -webkit-image-set(
108 url(../assets/100/player_timeline_handler_pressed.png) 1x,
109 url(../assets/200/player_timeline_handler_pressed.png) 2x);
110 }
111
112 .custom-slider.progress.disabled > input[type='range']::-webkit-slider-thumb {
113 background-image: none;
114 }
115
116 .time-controls > .time {
117 cursor: default;
118 height: 100%;
119 position: relative;
120 width: 53px;
121 } 90 }
122 91
123 .time-controls > .time.disabled { 92 .time-controls > .time.disabled {
124 opacity: 0; 93 opacity: 0;
125 } 94 }
126 95
127 .custom-slider > input[type='range'] { 96 .time-controls > paper-slider {
128 -webkit-appearance: none !important; /* Hide the default thumb icon. */ 97 --paper-slider-knob-color: rgb(64, 138, 241);
129 background: transparent; /* Hide the standard slider bar */ 98 --paper-slider-active-color: rgb(66, 133, 244);
yawano 2015/10/30 01:59:53 nit: --paper-slider-active-... must be before --pa
fukino 2015/10/30 04:25:53 Done.
130 height: 100%; 99 flex: auto;
131 left: -2px; /* Required to align the input element with the parent. */
132 outline: none;
133 position: absolute;
134 top: -2px;
135 width: 100%;
136 }
137
138 /* Custom thumb icon. */
139 .custom-slider > input[type='range']::-webkit-slider-thumb {
140 -webkit-appearance: none;
141 background-position: center center;
142 background-repeat: no-repeat;
143 height: 24px;
144 position: relative;
145 z-index: 2;
146 }
147
148 /* Custom slider bar (we hide the standard one). */
149 .custom-slider > .bar {
150 background-image: -webkit-image-set(
151 url(../assets/100/player_timeline_base_center.png) 1x,
152 url(../assets/200/player_timeline_base_center.png) 2x);
153 /* In order to match the horizontal position of the standard slider bar
154 left and right must be equal to 1/2 of the thumb icon width. */
155 bottom: 15px;
156 left: 14px; /* Exactly 1/2 of the thumb width */
157 pointer-events: none; /* Mouse events pass through to the standard input. */
158 position: absolute;
159 right: 14px;
160 top: 15px;
161 }
162
163 .custom-slider > .bar > .filled,
164 .custom-slider > .bar > .cap {
165 bottom: 0;
166 position: absolute;
167 top: 0;
168 }
169
170 /* The filled portion of the slider bar to the left of the thumb. */
171 .custom-slider > .bar > .filled {
172 background-image: -webkit-image-set(
173 url(../assets/100/player_timeline_played_center.png) 1x,
174 url(../assets/200/player_timeline_played_center.png) 2x);
175 border-left-style: none;
176 border-right-style: none;
177 left: 0;
178 width: 0; /* The element style.width is manipulated from the code. */
179 }
180
181 /* Rounded caps to the left and right of the slider bar. */
182 .custom-slider > .bar > .cap {
183 width: 1px;
184 }
185
186 /* Left cap is always filled, should be the same color as .filled. */
187 .custom-slider > .bar > .cap.left {
188 background-image: -webkit-image-set(
189 url(../assets/100/player_timeline_played_left.png) 1x,
190 url(../assets/200/player_timeline_played_left.png) 2x);
191 right: 100%;
192 }
193
194 /* Right cap is always not filled. */
195 .custom-slider > .bar > .cap.right {
196 background-image: -webkit-image-set(
197 url(../assets/100/player_timeline_base_right.png) 1x,
198 url(../assets/200/player_timeline_base_right.png) 2x);
199 left: 100%;
200 } 100 }
201 101
202 .media-button.disabled, 102 .media-button.disabled,
203 .custom-slider.disabled, 103 paper-slider.disabled {
204 .custom-slider.readonly {
205 pointer-events: none; 104 pointer-events: none;
206 } 105 }
207 106
208 /* Progress seek marker (precise time shown on mouse hover. */
209
210 /* Thin vertical line across the slider bar */
211 .custom-slider > .bar > .seek-mark {
212 background-color: #202020;
213 bottom: -1px;
214 left: 0;
215 position: absolute;
216 top: -1px;
217 width: 0;
218 }
219
220 .custom-slider > .bar > .seek-mark.visible {
221 width: 1px;
222 }
223
224 .custom-slider > .bar > .seek-mark.inverted {
225 background-color: #808080;
226 }
227
228 /* Text label giving the precise time corresponding to the hover position. */
229 .custom-slider > .bar > .seek-mark > .seek-label {
230 align-items: center;
231 background: #202020;
232 border-top-left-radius: 2px;
233 border-top-right-radius: 2px;
234 bottom: 19px;
235 color: white;
236 display: flex;
237 flex-direction: row;
238 font-size: 12px;
239 height: 15px;
240 justify-content: center;
241 left: 0;
242 opacity: 0;
243 overflow: hidden;
244 position: absolute;
245 transition: opacity 150ms ease;
246 }
247
248 .custom-slider > .bar > .seek-mark.visible > .seek-label {
249 opacity: 1;
250 }
251
252 /* Media controls in order of appearance. */ 107 /* Media controls in order of appearance. */
253 108
254 .audio-controls { 109 .audio-controls {
255 align-items: center; 110 align-items: center;
256 display: flex; 111 display: flex;
257 flex-direction: row; 112 flex-direction: row;
258 height: 100%; 113 height: 100%;
259 justify-content: center; 114 justify-content: center;
260 } 115 }
261 116
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 top: 2px; 211 top: 2px;
357 width: 28px; 212 width: 28px;
358 pointer-events: none; 213 pointer-events: none;
359 } 214 }
360 215
361 .media-button files-toggle-ripple::shadow .ripple.activated { 216 .media-button files-toggle-ripple::shadow .ripple.activated {
362 opacity: 0.1; 217 opacity: 0.1;
363 } 218 }
364 219
365 /* Invisible div used to compute the width required for the elapsed time. */ 220 /* Invisible div used to compute the width required for the elapsed time. */
366 .time-controls > .time > .duration,
367 .time-controls > .time > .current { 221 .time-controls > .time > .current {
368 align-items: center; 222 align-items: center;
369 color: rgb(51, 51, 51);
370 display: flex; 223 display: flex;
371 flex-direction: row; 224 flex-direction: row;
372 font-size: 12px;
373 height: 100%; 225 height: 100%;
374 justify-content: flex-end; 226 justify-content: flex-end;
375 position: absolute; 227 position: absolute;
376 top: -1px; 228 top: -1px;
377 } 229 }
378 230
379 .time-controls > .time > .duration {
380 left: 0;
381 }
382
383 .time-controls > .time > .current {
384 right: 0;
385 }
386
387 /* Volume controls: sound button and volume slider */ 231 /* Volume controls: sound button and volume slider */
388 232
389 #volumeContainer { 233 #volumeContainer {
390 border: 1px solid #ddd; 234 border: 1px solid #ddd;
391 border-radius: 2px; 235 border-radius: 2px;
392 box-shadow: 0 2px 4px #777; 236 box-shadow: 0 2px 4px #777;
393 height: 110px; 237 height: 110px;
394 position: fixed; 238 position: fixed;
395 width: 32px; 239 width: 32px;
396 } 240 }
397 241
398 #volumeContainer.default-hidden { 242 #volumeContainer.default-hidden {
399 visibility: hidden; 243 visibility: hidden;
400 } 244 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698