From 123cff422c9225d314e1d717f51fccc90a56ff4d Mon Sep 17 00:00:00 2001 From: bmFtZQ <62812711+bmFtZQ@users.noreply.github.com> Date: Mon, 19 Feb 2024 13:17:12 +0800 Subject: [PATCH] Fix missing window controls in FF123+ #135 Fixes missing window controls when the hide-tabs-bar tweak is enabled. --- chrome/toolbar/urlbar.css | 4 ++-- chrome/tweaks/hide-tabs-bar.css | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/chrome/toolbar/urlbar.css b/chrome/toolbar/urlbar.css index 12c5b11..1b1f852 100644 --- a/chrome/toolbar/urlbar.css +++ b/chrome/toolbar/urlbar.css @@ -9,8 +9,8 @@ --urlbar-icon-padding: calc(var(--toolbarbutton-inner-padding) - 2px) !important; --urlbar-margin-inline: 6px !important; --identity-box-margin-inline: 6px !important; - --uc-urlbar-icon-inline-padding: calc(var(--uc-toolbarbutton-inner-inline-padding) - 2px); - --uc-urlbar-inline-padding: 6px; + --uc-urlbar-icon-inline-padding: var(--uc-toolbarbutton-inner-inline-padding); + --uc-urlbar-inline-padding: 5px; --uc-urlbar-shadow: 0 0 4px rgb(0 0 0 / .1); --urlbarView-rich-suggestion-default-icon-size: 32px !important; diff --git a/chrome/tweaks/hide-tabs-bar.css b/chrome/tweaks/hide-tabs-bar.css index dfd0581..21e25db 100644 --- a/chrome/tweaks/hide-tabs-bar.css +++ b/chrome/tweaks/hide-tabs-bar.css @@ -19,6 +19,11 @@ visibility: collapse !important; } + /* Fix issue with missing window controls. */ + &[tabsintitlebar] #titlebar { + will-change: auto !important; + } + /* Add some padding to the top of the navbar */ &[tabsintitlebar] #nav-bar { padding-top: var(--uc-tab-top-margin, 0) !important; @@ -117,7 +122,7 @@ &:where([inFullscreen], [tabsintitlebar]) #nav-bar { /* Window controls on the right. */ @media not (-moz-gtk-csd-reversed-placement) { - padding-inline: 0 calc(var(--uc-window-controls-width, 0px) + var(--uc-titlebar-drag-space)) !important; + padding-inline-end: calc(var(--uc-window-controls-width, 0px) + var(--uc-titlebar-drag-space)) !important; /* Remove the padding from the side of the navbar */ & #PanelUI-menu-button { @@ -127,7 +132,7 @@ /* Window controls on the left. */ @media (-moz-gtk-csd-reversed-placement) { - padding-inline: calc(var(--uc-window-controls-width, 0px) + var(--uc-titlebar-drag-space)) 0 !important; + padding-inline-start: calc(var(--uc-window-controls-width, 0px) + var(--uc-titlebar-drag-space)) !important; /* Remove the padding from the side of the navbar */ & #nav-bar-customization-target > :is(toolbarbutton, toolbaritem):first-child {