From 927d6b9ae79d4573641a13709afcdc2ae761532f Mon Sep 17 00:00:00 2001 From: "Xavier BOL (xbo)" Date: Mon, 14 Nov 2022 16:29:28 +0000 Subject: [PATCH] [FIX] project: display 2 stat buttons per row in mobile in right side panel Before this commit, in project right side panel (when the user goes to project update of a project) when the screen width is below then 1600px the number of stat buttons is reduced to 3 stat buttons instead of 4. The problem is in mobile view, there is no enough space to display 3 stat buttons in a row. This commit reduces the number of stat buttons to 2 instead of 3 when the user is in a mobile view. task-2968326 X-original-commit: 50d710993d0a37526f75430f87310b2a2d67d69d Part-of: odoo/odoo#105801 --- .../project_right_side_panel.scss | 14 ++++++++++++-- .../project_right_side_panel.xml | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/addons/project/static/src/components/project_right_side_panel/project_right_side_panel.scss b/addons/project/static/src/components/project_right_side_panel/project_right_side_panel.scss index f364c0b6b3b..67a50c78b92 100644 --- a/addons/project/static/src/components/project_right_side_panel/project_right_side_panel.scss +++ b/addons/project/static/src/components/project_right_side_panel/project_right_side_panel.scss @@ -50,12 +50,12 @@ $o-rightpanel-p-tiny: $o-rightpanel-p-small*0.5; } } - @media screen and (max-width: 1600px) { + @include media-breakpoint-down(lg) { .oe_stat_button { flex-basis: 33.33%; &:nth-child(3n):not(:last-child) { - border-right-width: 0px !important; + border-right-width: 0px; } &:nth-child(4n):not(:last-child){ @@ -63,6 +63,16 @@ $o-rightpanel-p-tiny: $o-rightpanel-p-small*0.5; } } } + + @include media-breakpoint-down(md) { + .oe_stat_button { + flex-basis: 50%; + + &:nth-child(2n) { + border-right-width: 0px; + } + } + } } } diff --git a/addons/project/static/src/components/project_right_side_panel/project_right_side_panel.xml b/addons/project/static/src/components/project_right_side_panel/project_right_side_panel.xml index 12a2d4dddda..e6e772049b5 100644 --- a/addons/project/static/src/components/project_right_side_panel/project_right_side_panel.xml +++ b/addons/project/static/src/components/project_right_side_panel/project_right_side_panel.xml @@ -14,7 +14,7 @@