Browse Source

fix(filmstrip-only): vertically align center the toolbar (#1700)

* fix(filmstrip-only): vertically align center the toolbar

Use top 50% to position the toolbar's top at the vertical center
of the iframe. Then use transform 50% to move the toolbar itself
up 50% so its middle matches the middle of the iframe.

* squash: toolbox should center with filmstrip
efficient_tiling
virtuacoplenny 7 years ago
parent
commit
84ae7df8f1

+ 0
- 1
css/_filmstrip.scss View File

135
     &__videos-filmstripOnly {
135
     &__videos-filmstripOnly {
136
         margin-top: auto;
136
         margin-top: auto;
137
         margin-bottom: auto;
137
         margin-bottom: auto;
138
-        padding-right: $defaultFilmStripOnlyToolbarSize;
139
     }
138
     }
140
 
139
 
141
     .remote-videos-container {
140
     .remote-videos-container {

+ 8
- 3
css/_toolbars.scss View File

195
      */
195
      */
196
     &_filmstrip-only {
196
     &_filmstrip-only {
197
         border-radius: 3px;
197
         border-radius: 3px;
198
-        bottom: 0;
199
         display: inline-block;
198
         display: inline-block;
200
         height: auto;
199
         height: auto;
201
-        position: absolute;
202
-        right: 0;
203
         width: $defaultFilmStripOnlyToolbarSize;
200
         width: $defaultFilmStripOnlyToolbarSize;
204
 
201
 
205
         .button {
202
         .button {
228
     }
225
     }
229
 }
226
 }
230
 
227
 
228
+.filmstrip-only {
229
+    .toolbox,
230
+    .toolbox-toolbars {
231
+        align-items: center;
232
+        display: flex;
233
+    }
234
+}
235
+
231
 .subject {
236
 .subject {
232
     background: linear-gradient(to bottom, rgba(255,255,255,.85) , rgba(255,255,255,.35));
237
     background: linear-gradient(to bottom, rgba(255,255,255,.85) , rgba(255,255,255,.35));
233
     border-bottom-left-radius: 12px;
238
     border-bottom-left-radius: 12px;

+ 23
- 0
css/_vertical_filmstrip_overrides.scss View File

93
         }
93
         }
94
     }
94
     }
95
 
95
 
96
+    &.filmstrip-only {
97
+        .filmstrip {
98
+            flex-direction: row-reverse;
99
+        }
100
+        .filmstrip__videos-filmstripOnly {
101
+            height: 100%;
102
+        }
103
+
104
+        /**
105
+         * In filmstrip only mode, the toolbar is normally displayed in the
106
+         * vertical center of the filmstrip strip. In vertical filmstrip mode,
107
+         * that alignment makes the toolbar appear floating and detached from
108
+         * the filmstrip. So, instead anchor the toolbar next to the local
109
+         * video.
110
+         */
111
+        .toolbar_filmstrip-only {
112
+            bottom: 0;
113
+            top: auto;
114
+            transform: none;
115
+        }
116
+
117
+    }
118
+
96
     /**
119
     /**
97
      * These styles are for the video labels that display on the top right. The
120
      * These styles are for the video labels that display on the top right. The
98
      * styles adjust the labels' positioning as the filmstrip itself or
121
      * styles adjust the labels' positioning as the filmstrip itself or

+ 5
- 2
react/features/conference/components/Conference.web.js View File

13
 
13
 
14
 declare var $: Function;
14
 declare var $: Function;
15
 declare var APP: Object;
15
 declare var APP: Object;
16
+declare var interfaceConfig: Object;
16
 
17
 
17
 /**
18
 /**
18
  * The conference page of the Web application.
19
  * The conference page of the Web application.
65
      * @returns {ReactElement}
66
      * @returns {ReactElement}
66
      */
67
      */
67
     render() {
68
     render() {
69
+        const { filmStripOnly } = interfaceConfig;
70
+
68
         return (
71
         return (
69
             <div id = 'videoconference_page'>
72
             <div id = 'videoconference_page'>
70
                 <div id = 'videospace'>
73
                 <div id = 'videospace'>
71
                     <LargeVideo />
74
                     <LargeVideo />
72
-                    <Filmstrip />
75
+                    <Filmstrip displayToolbox = { filmStripOnly } />
73
                 </div>
76
                 </div>
74
 
77
 
75
-                <Toolbox />
78
+                { filmStripOnly ? null : <Toolbox /> }
76
 
79
 
77
                 <DialogContainer />
80
                 <DialogContainer />
78
                 <OverlayContainer />
81
                 <OverlayContainer />

+ 10
- 0
react/features/filmstrip/components/Filmstrip.web.js View File

2
 
2
 
3
 import React, { Component } from 'react';
3
 import React, { Component } from 'react';
4
 
4
 
5
+import { Toolbox } from '../../toolbox';
6
+
5
 /**
7
 /**
6
  * Implements a React {@link Component} which represents the filmstrip on
8
  * Implements a React {@link Component} which represents the filmstrip on
7
  * Web/React.
9
  * Web/React.
9
  * @extends Component
11
  * @extends Component
10
  */
12
  */
11
 export default class Filmstrip extends Component {
13
 export default class Filmstrip extends Component {
14
+    static propTypes = {
15
+        /**
16
+         * Whether or not the toolbox should be displayed within the filmstrip.
17
+         */
18
+        displayToolbox: React.PropTypes.bool
19
+    };
20
+
12
     /**
21
     /**
13
      * Implements React's {@link Component#render()}.
22
      * Implements React's {@link Component#render()}.
14
      *
23
      *
18
     render() {
27
     render() {
19
         return (
28
         return (
20
             <div className = 'filmstrip'>
29
             <div className = 'filmstrip'>
30
+                { this.props.displayToolbox ? <Toolbox /> : null }
21
                 <div
31
                 <div
22
                     className = 'filmstrip__videos'
32
                     className = 'filmstrip__videos'
23
                     id = 'remoteVideos'>
33
                     id = 'remoteVideos'>

+ 2
- 2
react/features/toolbox/components/Toolbox.web.js View File

108
      */
108
      */
109
     render(): ReactElement<*> {
109
     render(): ReactElement<*> {
110
         return (
110
         return (
111
-            <div>
111
+            <div className = 'toolbox'>
112
                 {
112
                 {
113
                     this._renderSubject()
113
                     this._renderSubject()
114
                 }
114
                 }
171
         }
171
         }
172
 
172
 
173
         return (
173
         return (
174
-            <div>
174
+            <div className = 'toolbox-toolbars'>
175
                 <Notice />
175
                 <Notice />
176
                 <PrimaryToolbar />
176
                 <PrimaryToolbar />
177
                 <SecondaryToolbar />
177
                 <SecondaryToolbar />

Loading…
Cancel
Save