From a3c16af58d651e13e76e16e5a32b784ba627917a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Mon, 16 Dec 2024 13:05:59 +0100 Subject: [PATCH] MOBILE-3063 reading-mode: Auto height --- src/core/directives/reading-mode.ts | 2 +- .../reading-mode-settings/reading-mode-settings.html | 6 +++--- src/core/features/viewer/lang.json | 3 ++- src/theme/components/ion-modal.scss | 9 ++------- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/core/directives/reading-mode.ts b/src/core/directives/reading-mode.ts index 4c0594351..5c5085d3f 100644 --- a/src/core/directives/reading-mode.ts +++ b/src/core/directives/reading-mode.ts @@ -193,7 +193,7 @@ export class CoreReadingModeDirective implements AfterViewInit, OnDestroy { const exit = await CoreModals.openModal({ component: CoreReadingModeSettingsModalComponent, - initialBreakpoint: 0.5, + initialBreakpoint: 1, breakpoints: [0, 1], cssClass: 'core-modal-auto-height', }); diff --git a/src/core/features/viewer/components/reading-mode-settings/reading-mode-settings.html b/src/core/features/viewer/components/reading-mode-settings/reading-mode-settings.html index db01839d5..f50e182ba 100644 --- a/src/core/features/viewer/components/reading-mode-settings/reading-mode-settings.html +++ b/src/core/features/viewer/components/reading-mode-settings/reading-mode-settings.html @@ -7,7 +7,7 @@ - +
{{ 'core.settings.fontsize' | translate }}
@@ -29,7 +29,7 @@
- Theme + {{ 'core.viewer.theme' | translate }} @@ -50,4 +50,4 @@
diff --git a/src/core/features/viewer/lang.json b/src/core/features/viewer/lang.json index ab263e5ab..a13928951 100644 --- a/src/core/features/viewer/lang.json +++ b/src/core/features/viewer/lang.json @@ -10,5 +10,6 @@ "readingthemehcm": "High contrast", "readingthemelight": "Light", "readingthemesepia": "Sepia", - "showmedia": "Show images and media" + "showmedia": "Show images and media", + "theme": "Theme" } diff --git a/src/theme/components/ion-modal.scss b/src/theme/components/ion-modal.scss index 852ac0384..9b56548c6 100644 --- a/src/theme/components/ion-modal.scss +++ b/src/theme/components/ion-modal.scss @@ -124,17 +124,12 @@ ion-modal { } &.core-modal-auto-height { + --height: auto; display: flex; flex-direction: column; justify-content: flex-end; - &::part(content) { - position: relative; - display: block; - contain: content; - } - - .inner-content { + .content-auto-height { max-height: 80vh; overflow: auto; }