From 0803a042a2b146be167bf8a47f0519f88cae332b Mon Sep 17 00:00:00 2001 From: MrOtherGuy Date: Fri, 27 Dec 2024 14:49:29 +0200 Subject: [PATCH 1/3] Add background to toolbars Because the toolbox has display: contents, we need to display the background separately for each toolbars. In addtion, on linux the main-window has transparent background-color so we need to set toolbar opacity to 1 to prevent transparent window areas. --- chrome/toolbars_below_content_v2.css | 35 ++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/chrome/toolbars_below_content_v2.css b/chrome/toolbars_below_content_v2.css index 58e0d7b..ee3554a 100644 --- a/chrome/toolbars_below_content_v2.css +++ b/chrome/toolbars_below_content_v2.css @@ -8,6 +8,10 @@ See the above repository for updates as well as full license text. */ #navigator-toolbox{ display: contents; + --uc-navbar-height: 40px; +} +:root[uidensity="compact"] #navigator-toolbox{ + --uc-navbar-height: 34px; } #main-window > body > #browser, .global-notificationbox, @@ -15,9 +19,40 @@ See the above repository for updates as well as full license text. */ #toolbar-menubar{ order: -1; } + #TabsToolbar{ max-height: calc((var(--tab-min-height) + 2 * var(--tab-block-margin,0px)) * var(--multirow-n-rows,1)); } +#toolbar-menubar, +#TabsToolbar{ + background: inherit !important; +} +@media (-moz-platform: linux){ + :root[sizemode="normal"][customtitlebar] #toolbar-menubar{ + border-top-left-radius: inherit; + border-top-right-radius: inherit; + } + #toolbar-menubar, + #TabsToolbar{ + opacity: 1 !important; + will-change: unset !important; + } +} + +#nav-bar, +#PersonalToolbar{ + background-image: linear-gradient(var(--toolbar-bgcolor),var(--toolbar-bgcolor)), var(--lwt-additional-images,var(--toolbar-bgimage)) !important; + background-position: top,var(--lwt-background-alignment); + background-position-y: calc(0px - var(--tab-min-height) - 2*var(--tab-block-margin,0px)); + background-repeat: repeat,var(--lwt-background-tiling); +} +:root[lwtheme-image] #nav-bar, +:root[lwtheme-image] #PersonalToolbar{ + background-image: linear-gradient(var(--toolbar-bgcolor),var(--toolbar-bgcolor)),var(--lwt-header-image), var(--lwt-additional-images,var(--toolbar-bgimage)) !important; +} +#PersonalToolbar{ + background-position-y: calc(0px - var(--tab-min-height) - 2*var(--tab-block-margin,0px) - var( --uc-navbar-height)); +} #urlbar[breakout][breakout-extend]{ display: flex !important; flex-direction: column-reverse !important; From ded579f2db07bdaa2f6b78e20c39f25de393ab53 Mon Sep 17 00:00:00 2001 From: MrOtherGuy Date: Fri, 27 Dec 2024 15:19:54 +0200 Subject: [PATCH 2/3] toolbar below content: move permissions popups upwards if needed At least on linux permissions-popup and notification-popup panels don't get side=bottom attribute so the open downwards which causes them to be drawn outside of screen. Fixes #493 --- chrome/navbar_below_content.css | 12 ++++++++++-- chrome/toolbars_below_content_v2.css | 6 ++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/chrome/navbar_below_content.css b/chrome/navbar_below_content.css index 30a3b5e..e450b70 100644 --- a/chrome/navbar_below_content.css +++ b/chrome/navbar_below_content.css @@ -37,5 +37,13 @@ See the above repository for updates as well as full license text. */ } .urlbarView-body-inner{ border-top-style: none !important; } - -} \ No newline at end of file + + @media (-moz-platform: linux){ + #notification-popup[side="top"]{ + margin-top: calc(-2 * var(--panel-padding-block) - 40px - 32px - 8.5em) !important; + } + #permission-popup[side="top"]{ + margin-top: calc(-2 * var(--panel-padding-block) - 2.5em); + } + } +} diff --git a/chrome/toolbars_below_content_v2.css b/chrome/toolbars_below_content_v2.css index ee3554a..4a8a3f0 100644 --- a/chrome/toolbars_below_content_v2.css +++ b/chrome/toolbars_below_content_v2.css @@ -37,6 +37,12 @@ See the above repository for updates as well as full license text. */ opacity: 1 !important; will-change: unset !important; } + #notification-popup[side="top"]{ + margin-top: calc(-2 * var(--panel-padding-block) - 40px - 32px - 8.5em) !important; + } + #permission-popup[side="top"]{ + margin-top: calc(-2 * var(--panel-padding-block) - 2.5em); + } } #nav-bar, From 8957a709e3abb7242fa89339c684f8027e66774c Mon Sep 17 00:00:00 2001 From: MrOtherGuy Date: Fri, 27 Dec 2024 15:30:18 +0200 Subject: [PATCH 3/3] nav-bar below content: apply background images to nav-bar --- chrome/navbar_below_content.css | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/chrome/navbar_below_content.css b/chrome/navbar_below_content.css index e450b70..d68df40 100644 --- a/chrome/navbar_below_content.css +++ b/chrome/navbar_below_content.css @@ -25,6 +25,15 @@ See the above repository for updates as well as full license text. */ z-index: 1; } #nav-bar-customization-target{ -webkit-box-flex: 1; } + + :root[lwtheme] #nav-bar{ + background-image: linear-gradient(var(--toolbar-bgcolor),var(--toolbar-bgcolor)), var(--lwt-additional-images,var(--toolbar-bgimage)) !important; + background-position: top,var(--lwt-background-alignment); + background-repeat: repeat,var(--lwt-background-tiling); + } + :root[lwtheme-image] #nav-bar{ + background-image: linear-gradient(var(--toolbar-bgcolor),var(--toolbar-bgcolor)),var(--lwt-header-image), var(--lwt-additional-images,var(--toolbar-bgimage)) !important; + } /* Fix panels sizing */ .panel-viewstack{ max-height: unset !important; }