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

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

Issue 1442583002: Revert of 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: 96px; 11 height: 64px;
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
17 .controls .lower-controls { 21 .controls .lower-controls {
18 box-sizing: border-box; 22 height: 32px;
19 height: 48px; 23 width: 100%
20 padding: 8px;
21 width: 100%;
22 } 24 }
23 25
24 .audio-controls { 26 .audio-controls {
25 align-items: center; 27 align-items: center;
26 display: flex; 28 display: flex;
27 flex-direction: row; 29 flex-direction: row;
28 justify-content: center; 30 justify-content: center;
29 padding: 0; 31 padding: 0;
30 } 32 }
31 33
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 /* Time controls: a slider and a text time display. */ 75 /* Time controls: a slider and a text time display. */
74 76
75 .time-controls { 77 .time-controls {
76 align-items: center; 78 align-items: center;
77 display: flex; 79 display: flex;
78 flex-direction: row; 80 flex-direction: row;
79 height: 100%; 81 height: 100%;
80 justify-content: center; 82 justify-content: center;
81 } 83 }
82 84
83 .time-controls > .time-container { 85 .custom-slider.progress {
84 color: rgb(51, 51, 51); 86 display: flex;
85 cursor: default; 87 flex: 1 1 auto;
86 flex: none; 88 height: 100%;
87 font-size: 12px;
88 padding: 8px;
89 position: relative; 89 position: relative;
90 z-index: 0; /* Make a layer which includes the thumb on slider. */
90 } 91 }
91 92
92 .time-container > .time { 93 .custom-slider.progress > input[type='range']::-webkit-slider-thumb {
93 position: absolute; 94 background-image: -webkit-image-set(
94 right: 8px; /* Should be same as time-container's right padding. */ 95 url(../assets/100/player_timeline_handler.png) 1x,
95 top: 8px; /* Should be same as time-container's top padding. */ 96 url(../assets/200/player_timeline_handler.png) 2x);
97 width: 28px;
96 } 98 }
97 99
98 .time-container > .time.disabled { 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 }
122
123 .time-controls > .time.disabled {
99 opacity: 0; 124 opacity: 0;
100 } 125 }
101 126
102 .time-container > .time-spacer { 127 .custom-slider > input[type='range'] {
103 opacity: 0; /* This class is intended to be used as invisible spacer. */ 128 -webkit-appearance: none !important; /* Hide the default thumb icon. */
129 background: transparent; /* Hide the standard slider bar */
130 height: 100%;
131 left: -2px; /* Required to align the input element with the parent. */
132 outline: none;
133 position: absolute;
134 top: -2px;
135 width: 100%;
104 } 136 }
105 137
106 .time-controls > paper-slider { 138 /* Custom thumb icon. */
107 --paper-slider-active-color: rgb(66, 133, 244); 139 .custom-slider > input[type='range']::-webkit-slider-thumb {
108 --paper-slider-knob-color: rgb(64, 138, 241); 140 -webkit-appearance: none;
109 flex: auto; 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%;
110 } 200 }
111 201
112 .media-button.disabled, 202 .media-button.disabled,
113 paper-slider.disabled { 203 .custom-slider.disabled,
204 .custom-slider.readonly {
114 pointer-events: none; 205 pointer-events: none;
115 } 206 }
116 207
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
117 /* Media controls in order of appearance. */ 252 /* Media controls in order of appearance. */
118 253
119 .audio-controls { 254 .audio-controls {
120 align-items: center; 255 align-items: center;
121 display: flex; 256 display: flex;
122 flex-direction: row; 257 flex-direction: row;
123 height: 100%; 258 height: 100%;
124 justify-content: center; 259 justify-content: center;
125 } 260 }
126 261
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 top: 2px; 356 top: 2px;
222 width: 28px; 357 width: 28px;
223 pointer-events: none; 358 pointer-events: none;
224 } 359 }
225 360
226 .media-button files-toggle-ripple::shadow .ripple.activated { 361 .media-button files-toggle-ripple::shadow .ripple.activated {
227 opacity: 0.1; 362 opacity: 0.1;
228 } 363 }
229 364
230 /* Invisible div used to compute the width required for the elapsed time. */ 365 /* Invisible div used to compute the width required for the elapsed time. */
366 .time-controls > .time > .duration,
231 .time-controls > .time > .current { 367 .time-controls > .time > .current {
232 align-items: center; 368 align-items: center;
369 color: rgb(51, 51, 51);
233 display: flex; 370 display: flex;
234 flex-direction: row; 371 flex-direction: row;
372 font-size: 12px;
235 height: 100%; 373 height: 100%;
236 justify-content: flex-end; 374 justify-content: flex-end;
237 position: absolute; 375 position: absolute;
238 top: -1px; 376 top: -1px;
239 } 377 }
240 378
379 .time-controls > .time > .duration {
380 left: 0;
381 }
382
383 .time-controls > .time > .current {
384 right: 0;
385 }
386
241 /* Volume controls: sound button and volume slider */ 387 /* Volume controls: sound button and volume slider */
242 388
243 #volumeContainer { 389 #volumeContainer {
244 border: 1px solid #ddd; 390 border: 1px solid #ddd;
245 border-radius: 2px; 391 border-radius: 2px;
246 box-shadow: 0 2px 4px #777; 392 box-shadow: 0 2px 4px #777;
247 height: 110px; 393 height: 110px;
248 position: fixed; 394 position: fixed;
249 width: 32px; 395 width: 32px;
250 } 396 }
251 397
252 #volumeContainer.default-hidden { 398 #volumeContainer.default-hidden {
253 visibility: hidden; 399 visibility: hidden;
254 } 400 }
OLDNEW
« no previous file with comments | « ui/file_manager/audio_player/elements/audio_player.js ('k') | ui/file_manager/audio_player/elements/control_panel.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698