From 879abab4446e12463ba68ac43c4c30a5406e2499 Mon Sep 17 00:00:00 2001 From: bmFtZQ <62812711+bmFtZQ@users.noreply.github.com> Date: Wed, 25 Oct 2023 20:35:15 +0800 Subject: [PATCH] Fix window buttons not working #101 --- README.md | 2 ++ chrome/global/tweaks.css | 1 + chrome/icons/icons.css | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 48500de..c8eefad 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,7 @@ To disable a tweak, set the key to `false` or delete it, then restart the browse | enable Mica toolbar background *(Windows 11 only)* | | ------------------------------------------------------------------- | +| **BROKEN ON NEWER VERSIONS OF FIREFOX** | | **See [Mica Tweak Instructions][3] for installation instructions.** | | **NOTE: Only works on default theme: 'System theme - auto'** | | `uc.tweak.win11-mica` | @@ -105,6 +106,7 @@ To disable a tweak, set the key to `false` or delete it, then restart the browse | `uc.tweak.show-tab-close-button-on-hover` | ## Mica Tweak Instructions (Windows 11 Only) +NOTE: Broken on newer versions of Firefox. 1. Download and install [Mica For Everyone][2]. 2. Create a custom process rule with the following: 1. Name: `firefox` diff --git a/chrome/global/tweaks.css b/chrome/global/tweaks.css index e9550f1..8fe2624 100644 --- a/chrome/global/tweaks.css +++ b/chrome/global/tweaks.css @@ -142,6 +142,7 @@ bugs with certain themes eg. dark text on dark background.) */ } } +/* Mica broken on newer versions of Firefox */ @media (-moz-windows-compositor) { @supports -moz-bool-pref("uc.tweak.win11-mica") { /* enable mica appearance */ diff --git a/chrome/icons/icons.css b/chrome/icons/icons.css index 2868cb1..42bda9f 100644 --- a/chrome/icons/icons.css +++ b/chrome/icons/icons.css @@ -2,7 +2,7 @@ /* windows 11 style window controls (no known way to detect between windows 10 and 11 so applied to both) */ -@media (-moz-windows-compositor), +@media (-moz-platform: windows), (-moz-gtk-csd-available) { .titlebar-min { list-style-image: url("win11-minimize.svg") !important; @@ -23,7 +23,7 @@ and 11 so applied to both) */ /* darkmode icon that uses thicker strokes and is easier to see (only needed at 1x scale) */ @media (max-resolution: 1dppx) { - :root[lwtheme-brighttext="true"] .titlebar-close, + toolbar[brighttext] .titlebar-close, .titlebar-close:hover { list-style-image: url("win11-close-dark.svg") !important; }