From 6b242379ec8e8be2c91fb3b156625eee3c9c75b0 Mon Sep 17 00:00:00 2001 From: MrOtherGuy Date: Wed, 1 Jun 2022 00:19:19 +0300 Subject: [PATCH] Remove Windows specific extra titlbar paddings from codebase Firefox 101 doesn't need those anymore :) --- chrome/autohide_toolbox.css | 12 ------------ chrome/classic_firefox_menu_button.css | 7 ------- chrome/combined_tabs_and_main_toolbars.css | 8 -------- chrome/fake_statusbar_w_menubar.css | 8 +------- chrome/hide_tabs_toolbar_w_alltabs_button.css | 12 +----------- chrome/hide_tabs_with_one_tab.css | 8 -------- ...de_tabs_with_one_tab_w_window_controls.css | 9 +-------- chrome/menubar_in_main_toolbar.css | 8 +------- chrome/multi-row_oneliner_combo_patch.css | 2 +- chrome/multi-row_tabs_below_content.css | 8 +------- chrome/overlay_menubar.css | 6 ------ chrome/show_navbar_on_focus_only.css | 19 ------------------- chrome/show_window_title_in_menubar.css | 5 ----- chrome/tabs_below_content.css | 3 --- chrome/tabs_on_bottom.css | 13 +------------ .../tabs_on_bottom_menubar_on_top_patch.css | 6 +++--- chrome/toolbars_below_content.css | 12 ------------ 17 files changed, 10 insertions(+), 136 deletions(-) diff --git a/chrome/autohide_toolbox.css b/chrome/autohide_toolbox.css index 1fe4719..df5d8af 100644 --- a/chrome/autohide_toolbox.css +++ b/chrome/autohide_toolbox.css @@ -22,17 +22,6 @@ See the above repository for updates as well as full license text. */ (-moz-os-version: windows-win7), (-moz-os-version: windows-win10){ - :root[tabsintitlebar][sizemode="maximized"]:not([inDOMFullscreen]) > body > box{ margin-top: 8px !important; } - - @media screen and (min-resolution: 1.25dppx){ - :root[tabsintitlebar][sizemode="maximized"]:not([inDOMFullscreen]) > body > box{ margin-top: 7px !important; } - } - @media screen and (min-resolution: 1.5dppx){ - :root[tabsintitlebar][sizemode="maximized"]:not([inDOMFullscreen]) > body > box{ margin-top: 6px !important; } - } - @media screen and (min-resolution: 2dppx){ - :root[tabsintitlebar][sizemode="maximized"] #navigator-toolbox{ margin-top: -1px; } - } #navigator-toolbox:not(:-moz-lwtheme){ background-color: -moz-dialog !important; } } @@ -92,7 +81,6 @@ See the above repository for updates as well as full license text. */ /* Uncomment the following for compatibility with tabs_on_bottom.css - this isn't well tested though */ /* -:root{ --uc-titlebar-padding: 0px !important; } #navigator-toolbox{ flex-direction: column; display: flex; } #titlebar{ order: 2 } */ \ No newline at end of file diff --git a/chrome/classic_firefox_menu_button.css b/chrome/classic_firefox_menu_button.css index 58d0893..76edc55 100644 --- a/chrome/classic_firefox_menu_button.css +++ b/chrome/classic_firefox_menu_button.css @@ -56,11 +56,4 @@ See the above repository for updates as well as full license text. */ padding-left: 94px !important; } -@media (-moz-platform: windows), - (-moz-os-version: windows-win7), - (-moz-os-version: windows-win10){ - :root[tabsintitlebar][sizemode="maximized"] #PanelUI-button{ - top:7px !important; - } -} */ \ No newline at end of file diff --git a/chrome/combined_tabs_and_main_toolbars.css b/chrome/combined_tabs_and_main_toolbars.css index 153b5be..20f4a87 100644 --- a/chrome/combined_tabs_and_main_toolbars.css +++ b/chrome/combined_tabs_and_main_toolbars.css @@ -27,14 +27,6 @@ See the above repository for updates as well as full license text. */ #navigator-toolbox{ --tab-min-height: 40px } :root[uidensity="compact"] #navigator-toolbox{ --tab-min-height: 32px } -@media (-moz-platform: windows), - (-moz-os-version: windows-win7), - (-moz-os-version: windows-win10){ - :root[tabsintitlebar][sizemode="maximized"] > body > box{ - margin-top: 8px; - } -} - #navigator-toolbox{ display: flex; flex-direction: row-reverse; diff --git a/chrome/fake_statusbar_w_menubar.css b/chrome/fake_statusbar_w_menubar.css index 4a95db2..3725215 100644 --- a/chrome/fake_statusbar_w_menubar.css +++ b/chrome/fake_statusbar_w_menubar.css @@ -25,14 +25,8 @@ See the above repository for updates as well as full license text. */ /* Dummy variable to support versions 94-96, can be removed when 96 lands */ :root{ --lwt-frame: var(--lwt-accent-color) } - :root{ --uc-fake-titlebar-padding: 0px } - @media (-moz-platform: windows), - (-moz-os-version: windows-win7), - (-moz-os-version: windows-win10){ - :root[sizemode="maximized"][tabsintitlebar]{ --uc-fake-titlebar-padding: 8px } - } #navigator-toolbox{ - margin-top: calc(var(--tab-min-height) + 2 * var(--tab-block-margin,0px) + var(--uc-fake-titlebar-padding)) + margin-top: calc(var(--tab-min-height) + 2 * var(--tab-block-margin,0px)) } #titlebar, diff --git a/chrome/hide_tabs_toolbar_w_alltabs_button.css b/chrome/hide_tabs_toolbar_w_alltabs_button.css index 1e61ba1..726970a 100644 --- a/chrome/hide_tabs_toolbar_w_alltabs_button.css +++ b/chrome/hide_tabs_toolbar_w_alltabs_button.css @@ -25,14 +25,4 @@ See the above repository for updates as well as full license text. */ #TabsToolbar > .titlebar-spacer{ display: none } #TabsToolbar{ margin-bottom: calc(0px - var(--tab-min-height) - 2 * var(--tab-block-margin))} -:root{ --uc-titlebar-padding: 0px; } - -@media (-moz-platform: windows), - (-moz-os-version: windows-win7), - (-moz-os-version: windows-win10){ - :root[sizemode="maximized"][tabsintitlebar]{ - --uc-titlebar-padding: 8px; - } -} - -#titlebar{ -moz-appearance: none !important; margin-top: var(--uc-titlebar-padding) } +#titlebar{ -moz-appearance: none !important; } diff --git a/chrome/hide_tabs_with_one_tab.css b/chrome/hide_tabs_with_one_tab.css index 927c971..3d5cccb 100644 --- a/chrome/hide_tabs_with_one_tab.css +++ b/chrome/hide_tabs_with_one_tab.css @@ -53,14 +53,6 @@ See the above repository for updates as well as full license text. */ transform: scale(0.6); background-color: transparent !important; } -/* Extra top padding in maximized window */ -@media (-moz-platform: windows), - (-moz-os-version: windows-win7), - (-moz-os-version: windows-win10){ - :root[tabsintitlebar][sizemode="maximized"] #navigator-toolbox{ - padding-top: var(--uc-titlebar-padding,7px); - } -} /* Fix window controls not being clickable */ :root[tabsintitlebar] #toolbar-menubar[autohide="true"][inactive]{ transition: height 0ms steps(1) 80ms; diff --git a/chrome/hide_tabs_with_one_tab_w_window_controls.css b/chrome/hide_tabs_with_one_tab_w_window_controls.css index 881b31b..4bd2b2e 100644 --- a/chrome/hide_tabs_with_one_tab_w_window_controls.css +++ b/chrome/hide_tabs_with_one_tab_w_window_controls.css @@ -60,14 +60,7 @@ Window controls will be all wrong without it transform: scale(0.6); background-color: transparent !important; } -/* Extra top padding in maximized window */ -@media (-moz-platform: windows), - (-moz-os-version: windows-win7), - (-moz-os-version: windows-win10){ - :root[tabsintitlebar][sizemode="maximized"] #navigator-toolbox{ - padding-top:7px !important; - } -} + /* Window controls in nav-bar */ :root:not([customizing]) #toolbar-menubar[inactive]{ height: initial !important; diff --git a/chrome/menubar_in_main_toolbar.css b/chrome/menubar_in_main_toolbar.css index c169d5e..086bbef 100644 --- a/chrome/menubar_in_main_toolbar.css +++ b/chrome/menubar_in_main_toolbar.css @@ -7,13 +7,7 @@ See the above repository for updates as well as full license text. */ :root[uidensity="compact"] #navigator-toolbox{ --uc-menubar-height: 30px } #titlebar{ -moz-box-direction: reverse; -moz-appearance: none !important; } -@media (-moz-platform: windows), - (-moz-os-version: windows-win7), - (-moz-os-version: windows-win10){ - :root[sizemode="maximized"][tabsintitlebar] #TabsToolbar{ - margin-top: 8px !important; - } -} + #toolbar-menubar{ margin-bottom: calc(0px - var(--uc-menubar-height)); height: var(--uc-menubar-height); diff --git a/chrome/multi-row_oneliner_combo_patch.css b/chrome/multi-row_oneliner_combo_patch.css index 82ac4d5..bd3778a 100644 --- a/chrome/multi-row_oneliner_combo_patch.css +++ b/chrome/multi-row_oneliner_combo_patch.css @@ -32,7 +32,7 @@ chrome/urlbar_full_width.css .urlbarView{ position: fixed !important; - top: calc(var(--uc-titlebar-padding,0px) + var(--uc-toolbar-height)) + top: calc(var(--uc-toolbar-height)) } #nav-bar{ border-right-width: 0px !important } #TabsToolbar{ diff --git a/chrome/multi-row_tabs_below_content.css b/chrome/multi-row_tabs_below_content.css index c43bdcb..823c4c4 100644 --- a/chrome/multi-row_tabs_below_content.css +++ b/chrome/multi-row_tabs_below_content.css @@ -30,13 +30,7 @@ See the above repository for updates as well as full license text. */ --uc-window-drag-space-width: 30px; --uc-window-control-width: 138px; } - @media (-moz-platform: windows), - (-moz-os-version: windows-win7), - (-moz-os-version: windows-win10){ - :root[tabsintitlebar][sizemode="maximized"]{ - --multirow-top-padding: 8px; - } - } + :root[uidensity="compact"]{ --multirow-toolbar-height: 34px } :root{ border-top-width: 0px !important } diff --git a/chrome/overlay_menubar.css b/chrome/overlay_menubar.css index 28c8f16..7e6547e 100644 --- a/chrome/overlay_menubar.css +++ b/chrome/overlay_menubar.css @@ -14,12 +14,6 @@ See the above repository for updates as well as full license text. */ #toolbar-menubar[autohide="true"][inactive="true"]{ height: 0px !important; } -@media (-moz-platform: windows), - (-moz-os-version: windows-win7), - (-moz-os-version: windows-win10){ - :root[tabsintitlebar][sizemode="maximized"] #toolbar-menubar{ top: 8px; } -} - #toolbar-menubar > spacer{ flex-grow: 1 } #toolbar-menubar[inactive] > .titlebar-buttonbox-container{ display: none } diff --git a/chrome/show_navbar_on_focus_only.css b/chrome/show_navbar_on_focus_only.css index 90f78df..53c64b6 100644 --- a/chrome/show_navbar_on_focus_only.css +++ b/chrome/show_navbar_on_focus_only.css @@ -9,25 +9,6 @@ See the above repository for updates as well as full license text. */ :root:not([customizing]) #navigator-toolbox > *{ grid-area: 1/1; } :root:not([customizing]) #titlebar{ -moz-appearance: none !important; } -/* -moz-appearance: none on titlebar breaks window margins, so re-adjust that */ -@media (-moz-platform: windows), - (-moz-os-version: windows-win7), - (-moz-os-version: windows-win10){ - - :root[sizemode="maximized"]{ margin-top: 8px !important; } - - @media screen and (min-resolution: 1.25dppx){ - :root[sizemode="maximized"]{ margin-top: 7px !important; } - } - @media screen and (min-resolution: 1.5dppx){ - :root[sizemode="maximized"]{ margin-top: 6px !important; } - } - @media screen and (min-resolution: 2dppx){ - :root[sizemode="maximized"]{ margin-top: 5px !important; } - } - :root:not([tabsintitlebar]), - :root[inDOMFullscreen]{ margin-top: 0 !important; } -} #urlbar-container{ margin-top: 1px } :root[sessionrestored] #nav-bar:not([customizing]){ transform: rotateX(90deg); diff --git a/chrome/show_window_title_in_menubar.css b/chrome/show_window_title_in_menubar.css index a792328..2c6a8e6 100644 --- a/chrome/show_window_title_in_menubar.css +++ b/chrome/show_window_title_in_menubar.css @@ -21,9 +21,4 @@ See the above repository for updates as well as full license text. */ overflow-x: -moz-hidden-unscrollable; text-overflow: ellipsis; } - @media (-moz-platform: windows), - (-moz-os-version: windows-win7), - (-moz-os-version: windows-win10){ - :root[sizemode="maximized"] > head > title { padding-top: 10px } - } } \ No newline at end of file diff --git a/chrome/tabs_below_content.css b/chrome/tabs_below_content.css index 0b5a5ef..4dbc159 100644 --- a/chrome/tabs_below_content.css +++ b/chrome/tabs_below_content.css @@ -37,9 +37,6 @@ linux_gtk_window_control_patch.css (-moz-os-version: windows-win7), (-moz-os-version: windows-win10){ #titlebar{ -moz-appearance: none !important; } - /* Counteract -moz-appearance when maximized */ - :root[tabsintitlebar][sizemode="maximized"] #navigator-toolbox{ padding-top: 8px !important; } - :root[sizemode="maximized"] #toolbar-menubar:not([autohide="false"]) .titlebar-buttonbox-container{ top: 8px } } /* Move tabs below content */ :root:not([inDOMFullscreen]) #browser-bottombox{ margin-bottom: calc(var(--tab-min-height) + 2 * var(--tab-block-margin,0px)) } diff --git a/chrome/tabs_on_bottom.css b/chrome/tabs_on_bottom.css index 33ad552..cf3ac30 100644 --- a/chrome/tabs_on_bottom.css +++ b/chrome/tabs_on_bottom.css @@ -15,25 +15,16 @@ Additionally on Linux, you may need to get: linux_gtk_window_control_patch.css */ -:root{ --uc-titlebar-padding: 0px; } -@media (-moz-platform: windows), - (-moz-os-version: windows-win7), - (-moz-os-version: windows-win10){ - :root[sizemode="maximized"][tabsintitlebar]{ - --uc-titlebar-padding: 8px; - } -} #toolbar-menubar[autohide="true"] > .titlebar-buttonbox-container, #TabsToolbar > .titlebar-buttonbox-container{ position: fixed; display: block; - top: var(--uc-titlebar-padding,0px); + top: 0px; right:0; height: 40px; } /* Mac specific. You should set that font-smoothing pref to true if you are on any platform where window controls are on left */ @supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled"){ - :root{ --uc-titlebar-padding: 0px !important } .titlebar-buttonbox-container{ left:0; right: unset !important; } } @@ -41,8 +32,6 @@ linux_gtk_window_control_patch.css #toolbar-menubar[inactive] > .titlebar-buttonbox-container{ opacity: 0 } -#navigator-toolbox{ padding-top: var(--uc-titlebar-padding,0px) !important; } - .titlebar-buttonbox-container > .titlebar-buttonbox{ height: 100%; } #titlebar{ diff --git a/chrome/tabs_on_bottom_menubar_on_top_patch.css b/chrome/tabs_on_bottom_menubar_on_top_patch.css index 922c50e..7916d39 100644 --- a/chrome/tabs_on_bottom_menubar_on_top_patch.css +++ b/chrome/tabs_on_bottom_menubar_on_top_patch.css @@ -20,18 +20,18 @@ See the above repository for updates as well as full license text. */ #navigator-toolbox{ -moz-window-dragging: drag; - padding-top: calc(var(--uc-menubar-height) + var(--uc-titlebar-padding, 0px)) !important; + padding-top: var(--uc-menubar-height) !important; } /* Remove window dragging from notification boxes */ #tab-notification-deck, .global-notificationbox{ -moz-window-dragging: no-drag; } -:root[sizemode="fullscreen"] #navigator-toolbox{ padding-top: 0px !important; } + #toolbar-menubar{ position: fixed; display: flex; - top: var(--uc-titlebar-padding,0px); + top: 0px; height: var(--uc-menubar-height); width: 100%; overflow: hidden; diff --git a/chrome/toolbars_below_content.css b/chrome/toolbars_below_content.css index adce037..f862039 100644 --- a/chrome/toolbars_below_content.css +++ b/chrome/toolbars_below_content.css @@ -12,18 +12,6 @@ See the above repository for updates as well as full license text. */ #titlebar{ -moz-appearance: none !important; } - @media (-moz-platform: windows), - (-moz-os-version: windows-win7), - (-moz-os-version: windows-win10){ - /* Next two variables are used by autohide_menubar.css */ - #toolbar-menubar{ --uc-menubar-extra-margin: 0px } - :root[tabsintitlebar][sizemode="maximized"] #toolbar-menubar{ - --uc-menubar-extra-margin: 8px - } - - :root[sizemode="maximized"][tabsintitlebar] :where(#browser,#customization-container,#toolbar-menubar){ margin-top: 8px } - } - #navigator-toolbox > div{ display: contents } .global-notificationbox, #mainPopupSet,