Skip to content

Commit 4c202da

Browse files
committed
Editor design fixes
Signed-off-by: John Molakvoæ <[email protected]>
1 parent 34f2a29 commit 4c202da

File tree

4 files changed

+48
-24
lines changed

4 files changed

+48
-24
lines changed

js/viewer-main.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/viewer-main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/ImageEditor.vue

Lines changed: 43 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -194,36 +194,53 @@ export default {
194194
left: 0;
195195
position: absolute;
196196
z-index: 10100;
197+
}
198+
</style>
197199

198-
&::v-deep * {
200+
<style lang="scss">
201+
// Make sure the editor and its modals are above everything
202+
.SfxModal-Wrapper {
203+
z-index: 10101 !important;
204+
}
205+
206+
.SfxPopper-wrapper {
207+
z-index: 10102 !important;
208+
}
209+
210+
// Default styling
211+
.viewer__image-editor,
212+
.SfxModal-Wrapper,
213+
.SfxPopper-wrapper {
214+
* {
199215
// Fix font size for the entire image editor
200216
font-size: var(--default-font-size) !important;
201217
}
202218
203-
&::v-deep label,
204-
&::v-deep button {
219+
label,
220+
button {
205221
color: var(--color-main-text);
206222
> span {
207223
font-size: var(--default-font-size) !important;
208224
}
209225
}
210-
}
211-
</style>
212226
213-
<style lang="scss">
214-
// Make sure the editor and its modals are above everything
215-
.SfxModal-Wrapper {
216-
z-index: 10101 !important;
217-
}
218-
.SfxPopper-wrapper {
219-
z-index: 10102 !important;
227+
// Fix button ratio and center content
228+
button {
229+
padding: 6px 12px;
230+
min-width: 44px;
231+
min-height: 44px;
232+
display: flex;
233+
justify-content: center;
234+
align-items: center;
235+
}
220236
}
221237
222238
// Input styling
223239
.SfxInput-root {
224240
height: auto !important;
225241
padding: 0 !important;
226242
}
243+
227244
.SfxInput-root .SfxInput-Base {
228245
margin: 0 !important;
229246
}
@@ -260,6 +277,13 @@ export default {
260277
// Menu items
261278
.SfxMenuItem-root {
262279
height: 44px;
280+
padding-left: 0 !important;
281+
// Center the menu entry icon and fix width
282+
> div {
283+
cursor: pointer;
284+
margin-right: 0;
285+
padding: 14px;
286+
}
263287
}
264288
265289
// Modal
@@ -272,6 +296,7 @@ export default {
272296
.SfxModalTitle-root {
273297
flex: 1 1 100%;
274298
justify-content: center;
299+
color: var(--color-main-text);
275300
}
276301
.SfxModalTitle-Icon {
277302
background: none !important;
@@ -297,14 +322,6 @@ export default {
297322
}
298323
299324
// Header buttons
300-
.FIE_topbar button {
301-
padding: 6px 12px;
302-
min-width: 44px;
303-
min-height: 44px;
304-
display: flex;
305-
justify-content: center;
306-
align-items: center;
307-
}
308325
.FIE_topbar-center-options > button,
309326
.FIE_topbar-center-options > label {
310327
margin-left: 6px !important;
@@ -314,6 +331,7 @@ export default {
314331
.FIE_tabs {
315332
padding: 6px !important;
316333
}
334+
317335
.FIE_tab {
318336
padding: 8px;
319337
width: 80px !important;
@@ -358,6 +376,8 @@ export default {
358376
border: none !important;
359377
padding: 5px !important;
360378
padding-left: 10px !important;
379+
// override default button width
380+
min-width: 0px !important;
361381
}
362382
363383
// Force icon-only style
@@ -417,7 +437,7 @@ export default {
417437
}
418438
419439
// Disable jpeg saving (jpg is already here)
420-
.SfxMenuItem-root[value="jpeg"] {
440+
.SfxMenuItem-root[value='jpeg'] {
421441
display: none;
422442
}
423443
@@ -431,9 +451,11 @@ export default {
431451
.FIE_spinner-label {
432452
display: none !important;
433453
}
454+
434455
.FIE_spinner-wrapper {
435456
background-color: transparent !important;
436457
}
458+
437459
.FIE_spinner::before {
438460
z-index: 2;
439461
content: '';

src/views/Viewer.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,7 @@ export default {
396396
397397
// prevent scrolling while opened
398398
document.body.style.overflow = 'hidden'
399+
document.documentElement.style.overflow = 'hidden'
399400
400401
// swap title with original one
401402
const title = document.getElementsByTagName('head')[0].getElementsByTagName('title')[0]
@@ -693,6 +694,7 @@ export default {
693694
694695
// restore default
695696
document.body.style.overflow = null
697+
document.documentElement.style.overflow = null
696698
697699
// Callback before updating the title
698700
// If the callback creates a new entry in browser history

0 commit comments

Comments
 (0)