From bfa5a3d4b760610bec317468f73924f2e75a67f6 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Thu, 30 Jun 2022 01:51:25 +0900 Subject: [PATCH] Fix: Option - Default to `userChrome.compatibility.os.windows_maximized` #414 --- css/leptonChrome.css | 22 ++++++++++++---------- src/compatibility/_os.scss | 16 +++++++++------- user.js | 1 + 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/css/leptonChrome.css b/css/leptonChrome.css index 5e0f1a97..4e9a9792 100644 --- a/css/leptonChrome.css +++ b/css/leptonChrome.css @@ -317,16 +317,18 @@ } } /*= Titlebar Container Size at maximized #384 ================================*/ - @media (-moz-os-version: windows-win7), - (-moz-platform: windows-win7), - (-moz-os-version: windows-win8), - (-moz-platform: windows-win8), - (-moz-os-version: windows-win10), - (-moz-platform: windows-win10) { - :root[tabsintitlebar][sizemode="maximized"] #titlebar { - /* -moz-default-appearance: -moz-window-titlebar */ - appearance: none !important; - padding-top: 8px; + @supports -moz-bool-pref("userChrome.compatibility.os.windows_maximized") { + @media (-moz-os-version: windows-win7), + (-moz-platform: windows-win7), + (-moz-os-version: windows-win8), + (-moz-platform: windows-win8), + (-moz-os-version: windows-win10), + (-moz-platform: windows-win10) { + :root[tabsintitlebar][sizemode="maximized"] #titlebar { + /* -moz-default-appearance: -moz-window-titlebar */ + appearance: none !important; + padding-top: 8px; + } } } } diff --git a/src/compatibility/_os.scss b/src/compatibility/_os.scss index 2137dc79..26d8e87a 100644 --- a/src/compatibility/_os.scss +++ b/src/compatibility/_os.scss @@ -181,12 +181,14 @@ $_os_linuxDefaultShadow: 0 0 4px rgba(128, 128, 142, 0.5); } /*= Titlebar Container Size at maximized #384 ================================*/ -@include OS($win) { - :root[tabsintitlebar][sizemode="maximized"] #titlebar { - /* -moz-default-appearance: -moz-window-titlebar */ - appearance: none !important; - - // Prevent sideeffect #370 - padding-top: 8px; // Don't use margin-top for reserved fullscreen animation +@include Option("userChrome.compatibility.os.windows_maximized") { + @include OS($win) { + :root[tabsintitlebar][sizemode="maximized"] #titlebar { + /* -moz-default-appearance: -moz-window-titlebar */ + appearance: none !important; + + // Prevent sideeffect #370 + padding-top: 8px; // Don't use margin-top for reserved fullscreen animation + } } } diff --git a/user.js b/user.js index 75b6d71f..c5d9fa4c 100644 --- a/user.js +++ b/user.js @@ -61,6 +61,7 @@ user_pref("userChrome.tab.bottom_rounded_corner", true); // user_pref("userChrome.compatibility.dynamic_separator", true); // Need dynamic_seperator // user_pref("userChrome.compatiblity.os.linux_non_native_titlebar_button", true); +// user_pref("userChrome.compatibility.os.windows_maximized, true"); // == Theme Custom Settings ==================================================== // -- User Chrome --------------------------------------------------------------