From b2fa832fb8dddac03e1e202d7be2bce9c1ead9b3 Mon Sep 17 00:00:00 2001 From: Brieuc-brd Date: Thu, 3 Mar 2022 14:45:34 +0000 Subject: [PATCH] [IMP] mail: `AttachmentViewer`, keep consistency with classes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prior this commit,`o_AttachmentViewer_toolbar`, `o_AttachmentViewer_viewIframe` and buttons used CSS properties with arbitrary values. To keep the layout consistent and remove more raw css, this commit uses component and utility classes instead. task-2781992 closes odoo/odoo#85772 Signed-off-by: Alexandre Kühn (aku) --- .../attachment_viewer/attachment_viewer.scss | 39 +------------------ .../attachment_viewer/attachment_viewer.xml | 24 ++++++------ 2 files changed, 14 insertions(+), 49 deletions(-) diff --git a/addons/mail/static/src/components/attachment_viewer/attachment_viewer.scss b/addons/mail/static/src/components/attachment_viewer/attachment_viewer.scss index 689ae09abcf..b5769565a55 100644 --- a/addons/mail/static/src/components/attachment_viewer/attachment_viewer.scss +++ b/addons/mail/static/src/components/attachment_viewer/attachment_viewer.scss @@ -32,19 +32,6 @@ min-width: 0; } -.o_AttachmentViewer_toolbar { - bottom: $o-navbar-height * 1.125; - transform: translateY(100%); -} - -.o_AttachmentViewer_toolbarButton { - padding: 8px; -} - -.o_AttachmentViewer_viewIframe { - width: 90%; -} - .o_AttachmentViewer_zoomer { padding: ($o-navbar-height * 1.125) 0; } @@ -57,35 +44,13 @@ outline: none; } -.o_AttachmentViewer_buttonNavigation { - color: gray('400'); - background-color: lighten($black, 15%); - - &:hover { - color: lighten(gray('400'), 15%); - background-color: $black; - } -} - .o_AttachmentViewer_headerItemButton:hover { background-color: rgba($white, 0.1); color: lighten($gray-400, 15%); } -.o_AttachmentViewer_toolbarButton { - background-color: lighten($black, 15%); - - &.o_disabled { - filter: brightness(1.3); - } - - &:not(.o_disabled) { - @include o-hover-text-color($gray-400, lighten($gray-400, 15%)); - - &:hover { - background-color: $black; - } - } +.o_AttachmentViewer_toolbarButton.o_disabled { + filter: brightness(1.3); } .o_AttachmentViewer_view { diff --git a/addons/mail/static/src/components/attachment_viewer/attachment_viewer.xml b/addons/mail/static/src/components/attachment_viewer/attachment_viewer.xml index 52778243e1c..c8ca26fc17e 100644 --- a/addons/mail/static/src/components/attachment_viewer/attachment_viewer.xml +++ b/addons/mail/static/src/components/attachment_viewer/attachment_viewer.xml @@ -47,13 +47,13 @@ -