Bladeren bron

fix(virtual-background): Responsive virtual background dialog

Fixes: https://github.com/jitsi/jitsi-meet/issues/9202
j8
Tudor D. Pop 4 jaren geleden
bovenliggende
commit
d7a6a48acd
No account linked to committer's email address

+ 45
- 16
css/modals/virtual-background/_virtual-background.scss Bestand weergeven

1
 .virtual-background-dialog {
1
 .virtual-background-dialog {
2
+    margin-left:-10px;
2
     position: relative;
3
     position: relative;
3
     max-height: 300px;
4
     max-height: 300px;
4
     color: white;
5
     color: white;
5
     display: inline-grid;
6
     display: inline-grid;
6
     grid-template-columns: auto auto auto auto auto;
7
     grid-template-columns: auto auto auto auto auto;
7
-    column-gap: 8px;
8
+    column-gap: 9px;
8
     cursor: pointer;
9
     cursor: pointer;
9
     .thumbnail:hover, .blur:hover, .slight-blur:hover, .virtual-background-none:hover{
10
     .thumbnail:hover, .blur:hover, .slight-blur:hover, .virtual-background-none:hover{
10
         height: 56px;
11
         height: 56px;
11
         width: 103px;
12
         width: 103px;
12
         opacity: .5;
13
         opacity: .5;
13
         border: 2px solid #99bbf3;
14
         border: 2px solid #99bbf3;
14
-        @media (min-width: 432px) and (max-width: 632px) {
15
+        @media (min-width: 432px) and (min-width: 432px) and (max-width: 632px) {
16
+            height: 56px;
17
+            width: 56px;
18
+        }
19
+        @media (max-width: 432px){
15
             height: 56px;
20
             height: 56px;
16
             width: 56px;
21
             width: 56px;
17
         }
22
         }
31
         margin-top: 8px;
36
         margin-top: 8px;
32
         border-radius: 6px;
37
         border-radius: 6px;
33
         object-fit: cover;
38
         object-fit: cover;
34
-        height: 60px;
35
-        width: 107px;
39
+        height: 56px;
40
+        width: 103px;
36
         border: 2px solid #246FE5;
41
         border: 2px solid #246FE5;
37
     }
42
     }
38
     .blur{
43
     .blur{
52
         margin-top: 8px;
57
         margin-top: 8px;
53
         background: #7E8287;
58
         background: #7E8287;
54
         font-weight: bold;
59
         font-weight: bold;
55
-        height: 60px;
56
-        width: 107px;
60
+        height: 56px;
61
+        width: 103px;
57
         border-radius: 6px;
62
         border-radius: 6px;
58
         border: 2px solid #246FE5;
63
         border: 2px solid #246FE5;
59
         text-align: center;
64
         text-align: center;
77
         margin-top: 8px;
82
         margin-top: 8px;
78
         background: #A4A4A4;
83
         background: #A4A4A4;
79
         font-weight: bold;
84
         font-weight: bold;
80
-        height: 60px;
81
-        width: 107px;
85
+        height: 56px;
86
+        width: 103px;
82
         border-radius: 6px;
87
         border-radius: 6px;
83
         border: 2px solid #246FE5;
88
         border: 2px solid #246FE5;
84
         text-align: center;
89
         text-align: center;
100
         margin-top: 8px;
105
         margin-top: 8px;
101
         background: #525252;
106
         background: #525252;
102
         font-weight: bold;
107
         font-weight: bold;
103
-        height: 60px;
104
-        width: 107px;
108
+        height: 56px;
109
+        width: 103px;
105
         border-radius: 6px;
110
         border-radius: 6px;
106
         border: 2px solid #246FE5;
111
         border: 2px solid #246FE5;
107
         text-align: center;
112
         text-align: center;
111
 
116
 
112
     @media (min-width: 432px) and (max-width: 632px) {
117
     @media (min-width: 432px) and (max-width: 632px) {
113
         font-size: 1.5vw;
118
         font-size: 1.5vw;
114
-        .virtual-background-none, .thumbnail, .thumbnail-selected, .none-selected, .blur, .blur-selected, .slight-blur, .slight-blur-selected{
119
+        .virtual-background-none, .thumbnail, .blur, .slight-blur{
115
             height: 60px;
120
             height: 60px;
116
             width: 60px;
121
             width: 60px;
117
         }
122
         }
123
+        .thumbnail-selected, .none-selected, .blur-selected, .slight-blur-selected{
124
+            height: 56px;
125
+            width: 56px;
126
+        }
127
+    }
128
+    @media (max-width: 432px){
129
+        font-size: 1.5vw;
130
+        .virtual-background-none, .thumbnail, .blur, .slight-blur{
131
+            height: 60px;
132
+            width: 60px;
133
+        }
134
+        .thumbnail-selected, .none-selected, .blur-selected, .slight-blur-selected{
135
+            height: 56px;
136
+            width: 56px;
137
+        }
118
     }
138
     }
119
 }
139
 }
120
 
140
 
135
     font-size: 14px;
155
     font-size: 14px;
136
     font-weight: 600;
156
     font-weight: 600;
137
     line-height: 20px;
157
     line-height: 20px;
158
+    margin-left: -10px;
138
     margin-top: 16px;
159
     margin-top: 16px;
139
     margin-bottom: 8px;
160
     margin-bottom: 8px;
140
     color: #669AEC;
161
     color: #669AEC;
151
     @media (min-width: 432px) and (max-width: 632px) {
172
     @media (min-width: 432px) and (max-width: 632px) {
152
         left: 51px
173
         left: 51px
153
     }
174
     }
175
+    @media (min-width: 432px) {
176
+        left: 51px
177
+    }
154
 }
178
 }
155
 .delete-image-icon:hover {
179
 .delete-image-icon:hover {
156
     display: block;
180
     display: block;
170
  }
194
  }
171
 
195
 
172
  .video-background-preview-entry{
196
  .video-background-preview-entry{
197
+    margin-left:5px;
173
     height: 250px;
198
     height: 250px;
199
+    width: 94%;
174
     margin-bottom: 8px;
200
     margin-bottom: 8px;
175
-    width: 572px;
176
-    position: fixed;
201
+    position: absolute;
177
     z-index: 2;
202
     z-index: 2;
178
-    @media (min-width: 432px) and (max-width: 632px) {
179
-        width: 340px;
180
-    }
181
  }
203
  }
182
 
204
 
205
+ .virtual-background-preview-video{
206
+    margin-left: -10;
207
+    border-radius: 6px;
208
+    height: 100%;
209
+    object-fit: cover;
210
+    width: 100%;
211
+ }
183
  .video-preview-loader{
212
  .video-preview-loader{
184
      border-radius: 6px;
213
      border-radius: 6px;
185
      background-color: transparent;
214
      background-color: transparent;

+ 1
- 2
react/features/virtual-background/components/VirtualBackgroundDialog.js Bestand weergeven

180
             okKey = { 'virtualBackground.apply' }
180
             okKey = { 'virtualBackground.apply' }
181
             onSubmit = { applyVirtualBackground }
181
             onSubmit = { applyVirtualBackground }
182
             submitDisabled = { !options || loading }
182
             submitDisabled = { !options || loading }
183
-            titleKey = { 'virtualBackground.title' }
184
-            width = '640px'>
183
+            titleKey = { 'virtualBackground.title' } >
185
             <VirtualBackgroundPreview options = { options } />
184
             <VirtualBackgroundPreview options = { options } />
186
             {loading ? (
185
             {loading ? (
187
                 <div className = 'virtual-background-loading'>
186
                 <div className = 'virtual-background-loading'>

+ 1
- 1
react/features/virtual-background/components/VirtualBackgroundPreview.js Bestand weergeven

10
 import { createLocalTracksF } from '../../base/tracks/functions';
10
 import { createLocalTracksF } from '../../base/tracks/functions';
11
 import { toggleBackgroundEffect } from '../actions';
11
 import { toggleBackgroundEffect } from '../actions';
12
 
12
 
13
-const videoClassName = 'video-preview-video flipVideoX';
13
+const videoClassName = 'virtual-background-preview-video flipVideoX';
14
 
14
 
15
 /**
15
 /**
16
  * The type of the React {@code PureComponent} props of {@link VirtualBackgroundPreview}.
16
  * The type of the React {@code PureComponent} props of {@link VirtualBackgroundPreview}.

Laden…
Annuleren
Opslaan